Monday, September 9, 2024
2 changes · saas-17.4
Resolved issues and error corrections
This fixes an issue where a restaurant order paid from one browser could still appear as open on another browser using the same Point of Sale session. Orders are now refreshed when server updates arrive, so staff see the latest table and payment status across devices.
Original PR description
when opening the same PoS session on different browser. If you create an order on browser A but pay it on browser B, the order would remain on browser A. Steps to reproduce: ------------------- *…
when opening the same PoS session on different browser. If you create an order on browser A but pay it on browser B, the order would remain on browser A. Steps to reproduce: ------------------- * Install pos_restaurant module * Open the same PoS session on 2 browser A & B * Create an order on browser A but don't pay for it, and go back to floor screen * On browser B pay for the order > Observation: The order is still visible on browser A Why the fix: ------------ We now make sure to synchronize all the orders when we receive a notification from the server. This way we are sure to always have the most up to date versions of the orders. Note: ------------ It was also required to modify the `sendOrderInPreparationUpdateLastChange` function. Because when sending the order the first time to the server it was sent without any preparationChange, and it would be retrieved by all the pos and appear as not sent in preparation. So we had to make sure this first synch would not notify anyone. We also needed to add a new synchronisation after sending the preparationChanges to notify all the session with the correct order content. opw-4126174 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a Point of Sale issue where an order could fail if the same POS session was closed in another browser while a cashier was still working. The order now keeps the correct session information, helping avoid interruptions during sales.
Original PR description
When we try to add any product for order in the first browser and simultaneously close the session in the second browser, the error will occur in the first browser when we click on order. Steps to…
When we try to add any product for order in the first browser and simultaneously close the session in the second browser, the error will occur in the first browser when we click on order. Steps to reproduce: - Install the ``point_of_sale`` module(without demo data) - Open the ``Bar``, copy the URL, and Open a POS session on 2 different browsers - Now go to the second browser and then close the session there - Now come to the first browser and add any product - Click on ``Order`` Traceback: ``ValueError: Expected singleton: pos.config()`` This error occurred at [1] where we didn't find ``config_id`` in order. This commit will fix the error by passing the session ID of the existing session into the order if ``pos_session`` does not have any session ID, especially in the case of a rescue session. [1]- https://github.com/odoo/odoo/blob/42acdb4bffa5295ec834fc9d6258540683ab90ce/addons/pos_online_payment/models/pos_order.py#L16 sentry-5699019259 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr