[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.
This commit is contained in:
Jeremy Kersten
2017-11-07 11:38:12 +01:00
parent 5f9c3f51a8
commit f8bf66b6de
@@ -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)]