Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hr_payroll_account_community/models/hr_payroll_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def action_payslip_done(self):
continue
debit_account_id = line.salary_rule_id.account_debit.id
credit_account_id = line.salary_rule_id.account_credit.id

cost_center = slip.contract_id.analytic_account_id.id or line.salary_rule_id.analytic_account_id.id
if debit_account_id:
debit_line = (0, 0, {
'name': line.name,
Expand All @@ -86,7 +86,7 @@ def action_payslip_done(self):
'date': date,
'debit': amount > 0.0 and amount or 0.0,
'credit': amount < 0.0 and -amount or 0.0,
'analytic_account_id': line.salary_rule_id.analytic_account_id.id,
'analytic_account_id': cost_center,
'tax_line_id': line.salary_rule_id.account_tax_id.id,
})
line_ids.append(debit_line)
Expand All @@ -100,7 +100,7 @@ def action_payslip_done(self):
'date': date,
'debit': amount < 0.0 and -amount or 0.0,
'credit': amount > 0.0 and amount or 0.0,
'analytic_account_id': line.salary_rule_id.analytic_account_id.id,
'analytic_account_id': cost_center,
'tax_line_id': line.salary_rule_id.account_tax_id.id,
})
line_ids.append(credit_line)
Expand Down