diff --git a/models/account_move.py b/models/account_move.py index e5009af..66b1b2b 100644 --- a/models/account_move.py +++ b/models/account_move.py @@ -11,8 +11,8 @@ class AccountMove(models.Model): if invoice.payment_state == 'paid' and invoice.is_invoice(include_receipts=True): term_lines = invoice.line_ids.filtered(lambda l: l.display_type == 'payment_term' and l.account_id.account_type == 'liability_current') if term_lines and invoice.currency_id.is_zero(invoice.amount_residual): - payments = (term_lines.matched_debit_ids.debit_move_id.move_id.payment_id | - term_lines.matched_credit_ids.credit_move_id.move_id.payment_id) + payments = (term_lines.matched_debit_ids.debit_move_id.payment_id | + term_lines.matched_credit_ids.credit_move_id.payment_id) if any(not p.is_matched for p in payments if p): invoice.payment_state = invoice._get_invoice_in_payment_state() diff --git a/models/res_partner.py b/models/res_partner.py index ea1fd66..213f59b 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -7,7 +7,6 @@ class ResPartner(models.Model): 'account.account', company_dependent=True, string="Account Payable", - domain="[('account_type', 'in', ('liability_payable', 'liability_current')), ('deprecated', '=', False)]", + domain="[('account_type', 'in', ('liability_payable', 'liability_current')), ('active', '=', True)]", help="This account will be used instead of the default one as the payable account for the current partner. Extended to allow Current Liabilities.", - required=True )