Tuesday, May 14, 2024
1 change · master
New functionality added to Odoo
The Point of Sale customer display is now a separate app that renders order details itself instead of receiving a full webpage from the cashier screen. This reduces data sent during order updates, improves performance especially with IoT displays, and makes the display easier to maintain and reuse.
Original PR description
In this pr we refactor the customer display code from pos such that the customer display now becomes it's own standalone owl app. Before, the pos app would generate all the html code for the customer…
In this pr we refactor the customer display code from pos such that the customer display now becomes it's own standalone owl app. Before, the pos app would generate all the html code for the customer display and it would send this text to the customer display window or to the iot box. This approach was messy and wasteful, as all the data would have to be resent for each change in the order. ( for example if the order consisted of 10 items, each with an image, the pos would render all the html and would send all the 10 images again for just an increase in the quantity of one of the orderlines ) Now, the pos just sends the order details ( product names, quantities, etc. ) and the customer display owl app handles the rendering. This massively simplifies the code and also allows reusability of components between the pos and the customer display. Depending on the configuration, the pos sends the data in the following ways: - Config local: broadcast channel api - Config remote: the pos calls a rpc method on the server and this rpc sends a websocket notification to the customer display - Config proxy: the pos sends a http request to the iot box on the local network; with the new implementation, the amount of data that is sent from the pos browser window to the iot box is immensely diminished. For each change in the order, the pos sends the new order data, but now sends aprox 15 times less data for each change. This is due to the fact that we now only send the actual order data ( an object containing product names, quantities, etc ) instead of the full html representation of the customer display. ( as an example, for an order with 10 items, we now send 3kb of data instead of 47kb ) Task: 3684195 https://github.com/odoo/enterprise/pull/54501 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr