diff options
| author | ijas ahammed <ija@odoo.com> | 2020-11-26 11:31:52 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-12-17 09:10:41 +0000 |
| commit | 5154f40544e7913f7bcd0ff73f034d111700f580 (patch) | |
| tree | 96399e5eecab3b1a699d1c889d814da745b7ecdc /addons/website/static | |
| parent | 9b3c4d07b3832bf99c6a9603985b687124fed033 (diff) | |
[FIX] crm: do not propagate lead phone to partner if formatting differs
With a recent commit[1], we fixed the issue of false warning while changing
the partner on lead. But that fix ignored the fact that the lead has an
automatic formatting that may lead to false warning.
Right way to detect a phone number change is
* lead phone is different from partner phone;
* lead formatted phone is different from partner formatted phone;
If those two conditions are met we are quite sure numbers are different and
not only differs in their formatting.
In this commit we also fix inverse of phone number. When updating lead phone
value we have to use the same heuristic to update partner phone value. That
was we avoid unnecessary partner update when only formatting differs.
Tests are added to ensure new behavior and that ribbon message is effectively
trig erred with correct content.
LINKS
Task ID-2390287
[1] - https://github.com/odoo/odoo/commit/d29862c1de6208f7fdb7c8104afe0d35241d130b
closes odoo/odoo#62397
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Ijas Ahammed <ija@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
Diffstat (limited to 'addons/website/static')
0 files changed, 0 insertions, 0 deletions
