From 188ddec890adbdf830ec18e480bae0718e0a84f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Wed, 13 Feb 2019 16:26:20 +0000 Subject: [PATCH] [FIX] website_sale: prevent compute_image on /shop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On /shop, we access the image field to generate the image widget, but we don't actually need the image content, we just need its url. When `bin_size` is added we don't compute all the resize for nothing. opw-1923999 task-1922055 PR: #30274 Signed-off-by: Jérémy Kersten (jke) --- addons/website_sale/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 4f0f84cebf6..603d0176086 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -230,7 +230,7 @@ class WebsiteSale(ProductConfiguratorController): if attrib_list: post['attrib'] = attrib_list - Product = request.env['product.template'] + Product = request.env['product.template'].with_context(bin_size=True) Category = request.env['product.public.category'] search_categories = False