[REF] hr_payroll: small code refactoring in compute_sheet() method
bzr revid: qdp-launchpad@openerp.com-20110406125421-owo9vuxjldb9ddoo
This commit is contained in:
parent
27b3cf53c6
commit
a6fb80e028
|
@ -431,11 +431,8 @@ class hr_payslip(osv.osv):
|
|||
else:
|
||||
#if we don't give the contract, then the rules to apply should be for all current contracts of the employee
|
||||
contract_ids = self.get_contract(cr, uid, payslip.employee_id, payslip.date_from, payslip.date_to, context=context)
|
||||
lines = self.pool.get('hr.payslip').get_payslip_lines(cr, uid, contract_ids, payslip.id, context=context)
|
||||
for line in lines:
|
||||
line.update({'slip_id': payslip.id})
|
||||
slip_line_pool.create(cr, uid, line, {})
|
||||
# self.write(cr, uid, [payslip.id], {'line_ids': lines}, context=context)
|
||||
lines = [(0,0,line) for line in self.pool.get('hr.payslip').get_payslip_lines(cr, uid, contract_ids, payslip.id, context=context)]
|
||||
self.write(cr, uid, [payslip.id], {'line_ids': lines}, context=context)
|
||||
return True
|
||||
|
||||
def get_input_lines(self, cr, uid, contract_ids, date_from, date_to, context=None):
|
||||
|
|
Loading…
Reference in New Issue