-
- Downloads
[FIX] account: incorrect bank account domain
- Set 2 banks accounts for a partner A
- Create a credit note
- Choose partner A => a default bank account is chosen, and both are
available in the list.
- Save, go back to the tree view, then reopen the same credit note
It is not possible to choose among both bank accounts anymore.
It is due to the domain set on the view, which is valid for customer
invoices but not for credit notes. It works at creation since
`_onchange_partner_id` overrides the domain for `out_refund`.
In this specific case, a domain in the view is not appropriate: the same
view is used for 2 invoice types although they require a different
domain. Therefore we set the domain only in the onchange. The drawback
is that all bank accounts are shown when we reopen a customer invoice or
a credit note from the tree view since the onchange is not triggered.
However, the constraint `validate_partner_bank_id` still protects
against an incorrect configuration.
opw-2010017
closes odoo/odoo#34292
Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
Loading
Please register or sign in to comment