diff options
| author | Florimond Husquinet (fhu) <fhu@odoo.com> | 2020-09-15 11:42:15 +0000 |
|---|---|---|
| committer | Florimond Husquinet (fhu) <fhu@odoo.com> | 2020-09-15 11:42:15 +0000 |
| commit | 5879f7dede16c8ba574ed648e4c91ca438eb93fa (patch) | |
| tree | 43bc6e202a533a3e4174bccf9693be8f24a830b4 /addons | |
| parent | 6ae421f551ee36afa836494bc8563fc9276ab31e (diff) | |
[FIX] mail_client_extension: link new company with existing partner
If the partner was created then the company, the api would return the
partner, find the corresponding company and return it with the
partner, but not actually link the newly found/created company with
the partner in the db.
Would happen for example if the user had no reveal credit when he
added the partner. Then credited his account and opened an email from
the same partner again, triggering the creation and enrichment of the
company.
closes odoo/odoo#57731
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mail_client_extension/controllers/main.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mail_client_extension/controllers/main.py b/addons/mail_client_extension/controllers/main.py index e04c4a26972..2a59c3d1f2f 100644 --- a/addons/mail_client_extension/controllers/main.py +++ b/addons/mail_client_extension/controllers/main.py @@ -220,6 +220,7 @@ class MailClientExtensionController(http.Controller): if not company: # create and enrich company company, enrichment_info = self._create_company_from_iap(sender_domain) response['enrichment_info'] = enrichment_info + partner.write({'parent_id': company}) response['partner']['company'] = self._get_company_dict(company) else: #no partner found response['partner'] = { |
