summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2017-11-07 11:03:52 +0100
committerJeremy Kersten <jke@odoo.com>2017-11-07 11:38:12 +0100
commitf8bf66b6def30b5738d91da564fda0a8eb8eeead (patch)
treed7b3f4d10ea3874db31f727fe98e27d24fbd5e6c
parent5f9c3f51a8be5e9c399228d5589d86d7bec94bc8 (diff)
[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.
-rw-r--r--addons/website_crm_partner_assign/models/crm_lead.py2
1 files changed, 1 insertions, 1 deletions
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)]