From 3a0f05f3341aacad9be08736df787882addccfd4 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 19 Apr 2019 08:00:25 +0000 Subject: [PATCH] [FIX] website_sale: multi-website - Create 2 companies A & B - For each company, create a website linked to a specific URL - As a public user, visit website of B - Buy a product, register your address The partner is in company A (the company of the superuser) instead of company B (the company of the website). opw-1962197 closes odoo/odoo#32822 Signed-off-by: Nicolas Martinelli (nim) --- addons/website_sale/controllers/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 25c0cdd42b6..ae79e8a141f 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -605,6 +605,7 @@ class WebsiteSale(ProductConfiguratorController): new_values['customer'] = True 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 + new_values['company_id'] = request.website.company_id.id new_values['website_id'] = request.website.id lang = request.lang if request.lang in request.website.mapped('language_ids.code') else None