From 6edfadbdd2abf13aed42a9cd7392ca42edbbc52e Mon Sep 17 00:00:00 2001
From: larisa <larisa@merchise.org>
Date: Mon, 24 Dec 2018 20:17:47 +0000
Subject: [PATCH] [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
---
 addons/hr_payroll_account/models/hr_payroll_account.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/addons/hr_payroll_account/models/hr_payroll_account.py b/addons/hr_payroll_account/models/hr_payroll_account.py
index e76173d45a46..93d2ad307bf1 100644
--- a/addons/hr_payroll_account/models/hr_payroll_account.py
+++ b/addons/hr_payroll_account/models/hr_payroll_account.py
@@ -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):
-- 
GitLab