diff --git a/account_payment_order/models/account_move_line.py b/account_payment_order/models/account_move_line.py index 3ee768280..f644ec60f 100644 --- a/account_payment_order/models/account_move_line.py +++ b/account_payment_order/models/account_move_line.py @@ -25,6 +25,11 @@ class AccountMoveLine(models.Model): string="Payment lines", ) + @api.onchange('partner_id') + def _onchange_partner_id(self): + """Empty partner bank for avoiding inconsistencies.""" + self.partner_bank_id = None + @api.multi def _prepare_payment_line_vals(self, payment_order): self.ensure_one()