diff --git a/__pycache__/__init__.cpython-312.pyc b/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..44b82ad Binary files /dev/null and b/__pycache__/__init__.cpython-312.pyc differ diff --git a/models/__pycache__/__init__.cpython-312.pyc b/models/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..d18949d Binary files /dev/null and b/models/__pycache__/__init__.cpython-312.pyc differ diff --git a/models/__pycache__/account_payment.cpython-312.pyc b/models/__pycache__/account_payment.cpython-312.pyc new file mode 100644 index 0000000..ca30f8b Binary files /dev/null and b/models/__pycache__/account_payment.cpython-312.pyc differ diff --git a/models/__pycache__/account_payment_register.cpython-312.pyc b/models/__pycache__/account_payment_register.cpython-312.pyc new file mode 100644 index 0000000..7754b99 Binary files /dev/null and b/models/__pycache__/account_payment_register.cpython-312.pyc differ diff --git a/models/account_payment.py b/models/account_payment.py index be57fe4..3327aff 100644 --- a/models/account_payment.py +++ b/models/account_payment.py @@ -165,12 +165,15 @@ class AccountPayment(models.Model): )) if counterpart_lines: - if counterpart_lines[0].account_id.account_type == 'asset_receivable': + account_type = counterpart_lines[0].account_id.account_type + if account_type == 'asset_receivable': partner_type = 'customer' - else: + elif account_type == 'liability_payable': partner_type = 'supplier' + else: + partner_type = 'customer' if pay.payment_type == 'inbound' else 'supplier' else: - partner_type = 'customer' + partner_type = 'customer' if pay.payment_type == 'inbound' else 'supplier' liquidity_amount = sum(liquidity_lines.mapped('amount_currency')) if len(liquidity_lines) > 1 else liquidity_lines.amount_currency