From c62c33cd604354a099a8bd13fc5e2a316c99de1d Mon Sep 17 00:00:00 2001 From: "Loan (lse)" Date: Fri, 22 May 2020 08:54:26 +0000 Subject: [PATCH] [FIX] website_sale: code displayed in product name in "recently viewed product" Before this commit: The `display_name` of the product was showing the code in the "Recently viewed products", the code value isn't needed to be seen in the website. After this commit: More user-friendly product name is shown OPW-2258774 closes odoo/odoo#51719 X-original-commit: be4d0d58081bea1b75ceee8f90372ed8cedbee2e Signed-off-by: Nicolas Martinelli (nim) --- 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 ee86c8369fb..49e17c584d1 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -1229,7 +1229,7 @@ class WebsiteSale(http.Controller): ['product_id', 'visit_datetime:max'], ['product_id'], limit=max_number_of_product_for_carousel, orderby='visit_datetime DESC') products_ids = [product['product_id'][0] for product in products] if products_ids: - viewed_products = request.env['product.product'].browse(products_ids) + viewed_products = request.env['product.product'].with_context(display_default_code=False).browse(products_ids) FieldMonetary = request.env['ir.qweb.field.monetary'] monetary_options = {