Skip to content
Snippets Groups Projects
Commit f7b8a07a authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] website_sale: Keep salesperson when editing portal partner


When editing the billing address of an existing portal partner P,
the salesperson of P was changed by the default website salesperson

BACKPORT of 52442484

opw:2649732

closes odoo/odoo#81043

Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
parent 5de45100
No related branches found
No related tags found
No related merge requests found
......@@ -614,14 +614,13 @@ class WebsiteSale(http.Controller):
if k not in ('field_required', 'partner_id', 'callback', 'submitted'): # classic case
_logger.debug("website_sale postprocess: %s value has been dropped (empty or not writable)" % k)
new_values['team_id'] = request.website.salesteam_id and request.website.salesteam_id.id
new_values['user_id'] = request.website.salesperson_id and request.website.salesperson_id.id
if request.website.specific_user_account:
new_values['website_id'] = request.website.id
if mode[0] == 'new':
new_values['company_id'] = request.website.company_id.id
new_values['team_id'] = request.website.salesteam_id and request.website.salesteam_id.id
new_values['user_id'] = request.website.salesperson_id.id
lang = request.lang.code if request.lang.code in request.website.mapped('language_ids.code') else None
if lang:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment