[IMP] payslip line created by holidays will also consider the amount_type=code

bzr revid: psi@tinyerp.co.in-20110317125547-lj532yj9wy79uz2a
This commit is contained in:
psi (Open ERP) 2011-03-17 18:25:47 +05:30
parent aeb88e7675
commit a3d4555688
1 changed files with 4 additions and 0 deletions

View File

@ -1105,6 +1105,10 @@ class hr_payslip(osv.osv):
raise osv.except_osv(_('Variable Error !'), _('Variable Error: %s ') % (e))
elif salary_rule.amount_type == 'fix':
value = salary_rule.amount * days
elif salary_rule.amount_type=='code':
localdict = {'basic':amt, 'employee':employee_id, 'contract':contract}
exec salary_rule.python_compute in localdict
value = localdict['result'] * days
res['amount'] = salary_rule.amount
res['type'] = salary_rule.type.id
leave += days