[IMP] hr_payroll_account: improved code to assigned analytic account on payslip line from salary rule

bzr revid: mtr@mtr-20110420085519-emevo3dufjvso7w6
This commit is contained in:
mtr 2011-04-20 14:25:19 +05:30
parent eb36f0c726
commit 2447cd56dd
1 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,8 @@ class hr_payslip(osv.osv):
else:
emp_account_id = [record.employee_id.employee_account.id for record in self.browse(cr, uid, [payslip_id], context=context)]
value['account_id'] = emp_account_id[0]
if rule.analytic_account_id:
value['analytic_account_id'] = rule.analytic_account_id.id
return result
def create_voucher(self, cr, uid, ids, name, voucher, sequence=5):