Tuesday, November 21, 2023
1 change · 17.0
Resolved issues and error corrections
This fix resolves a critical error that prevented German restaurant and bar locations from processing payments in the Point of Sale system. The issue occurred because price formatting was being handled incorrectly between the backend and frontend systems. By moving all price formatting to the frontend, payments now process smoothly without errors.
Original PR description
Steps to reproduce: Set up German localization for PoS, make a PoS that is bar / restaurant, make an order and proceed to pay. Error pop up: `Unknown Error, Please Contact Odoo Support` When synchronizing, get traceback: ``` TypeError: (value || 0).toFixed is not a function ``` The issue is that before saas-16.3, unit price was converted to string and was processed to have correct formating on the Python side. In saas-16.3, this string was passed into `formatCurrency` method which did a similar functionality. However `formatCurrency` expects a number and not a string which causes the issue. To fix this, it is better to do all the string processing in JavaScript code. opw-3499791 Forward-Port-Of: odoo/enterprise#48659