Skip to content
Snippets Groups Projects
Commit 1d548c7e authored by std-odoo's avatar std-odoo
Browse files

[FIX] crm: sync the email / phone with the partner


Bug
===
If we
1. Open a lead with an email but without partner
2. Set a partner without email on the lead
3. The warning "The email will be propagated" is visible
4. When saving the form, the email is not propagated even if the
   warning message was visible

Solution
========
The reason is that, as the email was not changed, the inverse method
of this field was not called and so the email was not propagated.

The best solution would be to use "force_save" on those fields. But
this feature only works on readonly fields.

So, we simulate a real "force_save" on the email / phone, directly in
JS. That way the inverse will be called, and if necessary, the email /
phone will be propagated.

Task-2704904

closes odoo/odoo#84426

X-original-commit: 72718877
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: default avatarflch-odoo <flch@odoo.com>
parent ce2a538e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment