[FIX] hr_payroll_account : payroll_account: On payslip confirmation it should write the period_id on employee payslip.

lp bug: https://launchpad.net/bugs/893469 fixed

bzr revid: mdi@tinyerp.com-20111122121704-0wzjivii1mm65mx9
This commit is contained in:
Divyesh Makwana (Open ERP) 2011-11-22 17:47:04 +05:30
parent 2503908223
commit 0ddceaf772
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class hr_payslip(osv.osv):
line_ids.append(adjust_debit)
move.update({'line_id': line_ids})
move_id = move_pool.create(cr, uid, move, context=context)
self.write(cr, uid, [slip.id], {'move_id': move_id}, context=context)
self.write(cr, uid, [slip.id], {'move_id': move_id, 'period_id' : period_id}, context=context)
if slip.journal_id.entry_posted:
move_pool.post(cr, uid, [move_id], context=context)
return super(hr_payslip, self).process_sheet(cr, uid, [slip.id], context=context)