From 5fc63dea81d87337d8b7fa78ebc995ea0fb4aa49 Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Thu, 5 Oct 2023 14:24:55 +0200 Subject: [PATCH] [FIX] point_of_sale: make sure no trailing space in product name **Steps to reproduce:** - Install pos and pos_restaurant. - Make sure preparation display tracks a pos.category, e.g. 'Food'. - Open restaurant with the 'Food' category in mobile mode. - ISSUE: The product reminder just above the 2 switch pane buttons is not shown. **FIX:** The product reminder is not shown because the "change" name used in the calculation for comparison has a trailing space. We just have to make sure that the trailing space is not there. Part-of: odoo/odoo#138352 --- addons/point_of_sale/static/src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/utils.js b/addons/point_of_sale/static/src/utils.js index 20ab81ce39d..fa30d1cd12c 100644 --- a/addons/point_of_sale/static/src/utils.js +++ b/addons/point_of_sale/static/src/utils.js @@ -51,5 +51,5 @@ export function constructFullProductName(line, attribute_value_by_id, display_na attributeString = `(${attributeString})`; } - return `${display_name} ${attributeString}`; + return attributeString !== "" ? `${display_name} ${attributeString}` : display_name; }