Sunday, July 27, 2025
1 change · saas-18.1
Resolved issues and error corrections
This fixes a point of sale issue where transferring a restaurant table on a slow connection could briefly show the wrong table, switch to Direct Sale, or lose the current order. Staff should now see the correct order consistently after a table transfer, reducing checkout confusion and operational errors.
Original PR description
Steps to reproduce: - open a pos with network set to 3g - trasfert a table - short after the product screen is shown the curent order is unset and Direct Sale or the original table is shown. Issue:…
Steps to reproduce: - open a pos with network set to 3g - trasfert a table - short after the product screen is shown the curent order is unset and Direct Sale or the original table is shown. Issue: When the tranfert is done, it opens the floor_screen. When the floor_screen is mounted it calls resetTable that will call syncAllOrders on the current state (before the table is changed) of the order inside the unsetTable function. If the network is slow, the resolve of the syncAllOrders will restore the old table. Also it would set the order to null after in the end of the resetTable function. Since all this happens after the product_screen is mounted it will rerender it's coponents with the no order / order table. Fix: Remove the syncAllOrders on the unsetTable when tranfer mode. Ensure that syncAllOrders is called in prepareOrderTransfer function if the dest table is empty. syncAllOrders is already called if the destination table has order when calling mergeOrder This commit also ensure that subcomponents always receive a valid order prop, even when re-rendered independently. Since ProductScreen creates an order if none exists, passing it down explicitly guarantees consistency and avoids relying getting the order with getOrder. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr