[FIX] website_sale: ensure lang and website_id on partner creation

by using the `request.website` context

closes odoo/odoo#88374

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Valentin Chevalier
2023-04-13 11:44:50 +02:00
parent d43c5689b2
commit acbdb07c98
+1
View File
@@ -1328,6 +1328,7 @@ class WebsiteSale(http.Controller):
:param dict custom_values: Optional custom values for the creation or edition.
:return int: The id of the partner created or edited
"""
request.update_env(context=request.website.env.context)
values = self.values_preprocess(partner_details)
# Ensure that we won't write on unallowed fields.