Skip to content
Snippets Groups Projects
Commit 6edfadbd authored by larisa's avatar larisa Committed by Martin Trigaux
Browse files

[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
parent 9c6d9697
Branches
Tags
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment