From f8bf66b6def30b5738d91da564fda0a8eb8eeead Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Tue, 7 Nov 2017 11:03:52 +0100 Subject: [PATCH] [FIX] website_crm_partner_assign: assign opportunity to the commercial_partner_id Before this commit, an opp created from a contact via the portal was assign to himself instead of the commercial_partner_id. So the saleperson was not assigned to the opportunity, and the opp created was not for the company but for the contact only. That make sense to share the opp to the company and assign the saleman directly. Thanks to GBR for the reporting. --- addons/website_crm_partner_assign/models/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_crm_partner_assign/models/crm_lead.py b/addons/website_crm_partner_assign/models/crm_lead.py index 424919b05ab..bed1447a050 100644 --- a/addons/website_crm_partner_assign/models/crm_lead.py +++ b/addons/website_crm_partner_assign/models/crm_lead.py @@ -267,7 +267,7 @@ class CrmLead(models.Model): 'name': values['title'], 'description': values['description'], 'priority': '2', - 'partner_assigned_id': user.partner_id.id, + 'partner_assigned_id': user.commercial_partner_id.id, } if tag_own: values['tag_ids'] = [(4, tag_own.id, False)]