Steps to reproduce:
-------------------
- install `account` module;
- create an employee;
- add a bank account;
- add a related user and save;
- remove the user and save;
Issue:
------
A traceback occurs.
Cause:
------
We synchronize the `partner_id` of the `bank_account`
with the `work_contact_id`.
If the latter is `False`, this triggers an error.
Solution:
---------
Do not trigger the logic that updates the `partner_id` of
the `bank_account` if the value is `False`.
This keeps the logic that the `partner_id` field
in the `res.partner.bank` model is required.
opw-3558983
closesodoo/odoo#139570
X-original-commit: c19574e26d8814a745152489eb16915f13b2a6c0
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>