[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) <nim@odoo.com>
This commit is contained in:
Loan (lse)
2020-05-22 15:49:02 +00:00
parent 1879e9b7a9
commit c62c33cd60
+1 -1
View File
@@ -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 = {