856f0f481cf224b065b1cc1bfdde21a83e7547e7
Steps to reproduce: ------------------- - create two employees (A and B); - create a user; - add the user in Related User of employee A; - remove the user; - add the user in Related User of employee B; - change the Work Email of the employee B. Issue: ------ The Work Email of the employee A is also updated. Cause: ------ When we add a `user_id` to an employee, we update the `work_contact_id` field. Fields `mobile_phone` and `work_email` are inverse fields. When we modify them, the `_inverse_work_contact_details` method is called. We update the `work_contact_id` linked to the employee. When we delete an employee's `user_id`, we don't update the `work_contact_id`. Therefore, when we update an employee's `work_contact_id`, we call the `_compute_work_contact_details` method method for all employees who have the same `work_contact_id`. The result is that we modify the `mobile_phone` and `ẁork_email` fields for all employees linked to the `work_contact_id`. Solution: --------- Differentiate the case where the `user_id` is `False` (>< `None`) when it is modified and does not contain a value to "synchronise" the `work_contact_id`. opw-3338188 closes odoo/odoo#123965 X-original-commit: 85ab51c7cf7c8ee011a903a9460e2aff1296f215 Signed-off-by: Kevin Baptiste <kba@odoo.com> Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%