[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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user