odoo/odoo#206913

Created by fw-bot
Merged at f4c9e1f4a362f487a44e0e07133234dda20403c2

Statuses:

label
odoo-dev:master-18.0-opw-4669340-archived_bank_account_not_deleted-gute-430945-fw
head
ac55b99ee0015c58bef8992f37eec4745f3bfd96
merged
5 months ago by Guillaume Teboul-Tornezy (gute)
odoo/odoo
18.0 #203474
saas-18.1 #206180
saas-18.2 #206907
saas-18.3
saas-18.4
19.0
master #206913

[FW][FIX] base: introduce user error for archived bank account

Commit ebb09234e6444576e7e934f53de1d23a0d9760d2 made it so that bank account are archived instead of deleted meaning that they are never deleted in the DB.

If a user tries to create a new bank account for the same partner with the same account number, the following validation error is raised:

"The operation cannot be completed: The combination Account Number/Partner must be unique."

This commit introduces a new UserError when a user attempts to create an account that was previously archived. It also updates the message in the chatter from "deleted" to "archived."

opw-4669340


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #206180
Forward-Port-Of: #203474