summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_view.js
diff options
context:
space:
mode:
authorFlorian Gilbert <flg@odoo.com>2020-04-16 09:41:02 +0000
committerFlorian Gilbert <flg@odoo.com>2020-04-17 06:45:27 +0000
commit25f157efc02aeb82103d55c5f1fa8f35f287cd9a (patch)
treecdbce20ba14f915de62c5296c4ca23be0e050ae1 /addons/web/static/src/js/views/basic/basic_view.js
parent7e2971d080145b732708e8c992e74569e03302e1 (diff)
[IMP] account: Verify if res_partner_bank exists in set_bank_account.
When creating or writing on a account.journal model, it is possible to pass a char representing the bank account number into bank_acc_number instead of passing directly a res.partner.bank. In case we pass bank_acc_number the system will try to create automatically a new res.partner.bank for us, however if a res.partner.bank already exists with the same account number it will result in an error as we have a unicity constraint for that. Therefore it is best to first seach for such an existing res.partner.bank before trying to create it. The search is done on the sanitized_account_number field as the unicity constraint is on that field. closes odoo/odoo#49637 Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_view.js')
0 files changed, 0 insertions, 0 deletions