From 954fb6da3c1ccc7453e434eaa652785df1988cd7 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Wed, 16 Nov 2016 12:21:25 +0100 Subject: [PATCH] [FIX] website_event_sale: Preserve context when updating cart Without this patch, when a product was added to cart, if this addon was installed, it always landed in English in the SO. This happened because the context, containing the current language, was being aborted here (`context=None` instead of `context=context`). This commit closes #14340 --- addons/website_event_sale/models/sale_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/website_event_sale/models/sale_order.py b/addons/website_event_sale/models/sale_order.py index 5cb7c486408..165fe553e42 100644 --- a/addons/website_event_sale/models/sale_order.py +++ b/addons/website_event_sale/models/sale_order.py @@ -19,7 +19,9 @@ class sale_order(osv.Model): return self.pool.get('sale.order.line').search(cr, SUPERUSER_ID, domain, context=context) def _website_product_id_change(self, cr, uid, ids, order_id, product_id, qty=0, line_id=None, context=None): - values = super(sale_order,self)._website_product_id_change(cr, uid, ids, order_id, product_id, qty=qty, line_id=line_id, context=None) + values = super(sale_order, self)._website_product_id_change( + cr, uid, ids, order_id, product_id, + qty=qty, line_id=line_id, context=context) event_ticket_id = None if context.get("event_ticket_id"):