Review: Needs Fixing
in hr_payroll/wizard/hr_payroll_payslips_by_employees.py, abuot lines 335-346: 
the behavior seems really weird to me: you call the onchange with [] as ids, 
then create the payslip, then create the input lines...

you can do everything in one operation in you pass the good value for that 
field in the create. Check the example bellow (to create some order lines at 
the time of SO creation):
        vals.update({'order_line': [(0, 0, {'product_id': 1, 'product_uom_qty': 
3, 'product_uom': 1, 'name': 'test', 'price_unit': 100, 'type': 
'make_to_stock'}), (0, 0, {'product_id': 1, 'product_uom_qty': 3, 
'product_uom': 1, 'name': 'test', 'price_unit': 100, 'type': 
'make_to_stock'})]})
        res = super(sale_order, self).create(cr, uid, vals, context=context)


Also: when opening a payslip from the payslip.run object, i don't know why but 
the note and structure_id fields are readonly although they aren't if i open 
the same payslip from the payslip menu.

Something new: we need also to keep track of the state of payslip.run: [(draft, 
Draft), (close, Close)] and
*the button generate payslip is only visible if the run is draft
*on a payslip, we can only select a payslip.run in draft

Thanks,
Quentin
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-payroll-wizard_payslip_employee_category-wise-psi/+merge/58953
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-payroll.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help   : https://help.launchpad.net/ListHelp

Reply via email to