[FIX] hr_payroll_account: correct account move lines creation

The super call of action_payslip_done executes the method compute_sheet.
Without this compute_sheet call, there is no salary lines and no accounting
move is created.

closes odoo/odoo#29737
This commit is contained in:
larisa
2019-01-14 15:16:44 +00:00
committed by Martin Trigaux
parent 9c6d969775
commit 6edfadbdd2
@@ -53,6 +53,7 @@ class HrPayslip(models.Model):
@api.multi
def action_payslip_done(self):
res = super(HrPayslip, self).action_payslip_done()
precision = self.env['decimal.precision'].precision_get('Payroll')
for slip in self:
@@ -138,7 +139,7 @@ class HrPayslip(models.Model):
move = self.env['account.move'].create(move_dict)
slip.write({'move_id': move.id, 'date': date})
move.post()
return super(HrPayslip, self).action_payslip_done()
return res
class HrSalaryRule(models.Model):