Skip to content

Commit

Permalink
[FIX] payroll_account: hr.payslip.line _get_partner_id()
Browse files Browse the repository at this point in the history
  • Loading branch information
norlinhenrik committed May 30, 2024
1 parent 4b8c2c6 commit 4976035
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions payroll_account/models/hr_payslip_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,9 @@ def _get_partner_id(self, credit_account):
partner_id = (
register_partner_id.id or self.slip_id.employee_id.address_home_id.id
)
acc_type = self.salary_rule_id.account_debit.account_type
if credit_account:
if (
register_partner_id
or self.salary_rule_id.account_credit.internal_type
in ("receivable", "payable")
):
return partner_id
else:
if (
register_partner_id
or self.salary_rule_id.account_debit.internal_type
in ("receivable", "payable")
):
return partner_id
acc_type = self.salary_rule_id.account_credit.account_type
if register_partner_id or acc_type in ("asset_receivable", "liability_payable"):
return partner_id
return False

0 comments on commit 4976035

Please sign in to comment.