diff options
| author | Thibault Delavallée <tde@odoo.com> | 2020-08-04 13:10:18 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-08-04 15:08:56 +0000 |
| commit | e3b9ad64f6570f5358360adb723885df25b630fe (patch) | |
| tree | 9a14fe7df718c4d83ac313b05d2cdd9ab299662c /addons/crm/tests | |
| parent | 1aaed1ce6435b03bc47ac98525016ed22fc31a91 (diff) | |
[FIX] crm: do not propagate void email / phone of partner to lead
Consider a lead with valid email and/or phone. Some process assign a partner
to it, like mass convert. This partner has no email and/or phone. We should
not void lead values for email and/or phone, as this is information loss.
This is a followup of 89ca89ca9269aea9ce2850db28ef6a7477e1ef18 . Test cases are added to try to
avoid future regressions.
Task ID 2311981
PR #54619
X-original-commit: 0b69d98cf4cbd2c99d7c3fb510e324f49652eea5
Diffstat (limited to 'addons/crm/tests')
| -rw-r--r-- | addons/crm/tests/test_crm_lead_convert.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/crm/tests/test_crm_lead_convert.py b/addons/crm/tests/test_crm_lead_convert.py index 33115d34cdd..e7a99785825 100644 --- a/addons/crm/tests/test_crm_lead_convert.py +++ b/addons/crm/tests/test_crm_lead_convert.py @@ -30,6 +30,7 @@ class TestLeadConvert(crm_common.TestLeadConvertCommon): @users('user_sales_manager') def test_lead_convert_base(self): """ Test base method ``convert_opportunity`` or crm.lead model """ + self.assertFalse(self.contact_2.phone) lead = self.lead_1.with_user(self.env.user) lead.write({ 'phone': '123456789', @@ -43,7 +44,7 @@ class TestLeadConvert(crm_common.TestLeadConvertCommon): self.assertEqual(lead.partner_id, self.contact_2) self.assertEqual(lead.email_from, self.contact_2.email) self.assertEqual(lead.mobile, self.contact_2.mobile) - self.assertEqual(lead.phone, self.contact_2.phone) + self.assertEqual(lead.phone, '123456789') self.assertEqual(lead.team_id, self.sales_team_1) self.assertEqual(lead.stage_id, self.stage_team1_1) |
