[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
This commit is contained in:
Joseph Caburnay
2023-10-13 23:20:15 +00:00
parent 874c7fc6b5
commit 5fc63dea81
+1 -1
View File
@@ -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;
}