[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) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-04-19 08:00:25 +00:00
parent c423e5fe04
commit 3a0f05f334
+1
View File
@@ -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