Monday, May 27, 2024
4 changes · saas-17.2
Resolved issues and error corrections
This change prevents an error when staff open the restaurant Mobile View after a register has been closed and there are no active orders. It keeps the self-ordering page accessible instead of triggering a backend failure, improving reliability for restaurant operations.
Original PR description
This error usually occurs when there are no active orders present, and we've closed the register and then tried to access the ``Mobile View`` feature. Steps to reproduce: - Install the…
This error usually occurs when there are no active orders present, and we've closed the register and then tried to access the ``Mobile View`` feature. Steps to reproduce: - Install the ``pos_restaurant`` and ``point_of_sale`` modules - Make sure there are no active orders in the restaurant - Dashboard > Open Register > Open session > Close Register - Dashboard > Restaurant > Dropdown Menu > Mobile View - An Error will be generated in the terminal Traceback : ``ValueError: bus.Bus only string channels are allowed.`` This situation arises because we have two self-ordering modes: i) ``Mobile`` and ii) ``kiosk``. When the condition at [1] is evaluated, it will become false because the session has been closed, causing ``pos_config.has_active_session`` to be false. Additionally, since the mode is ``Mobile``, the condition in the ``elif`` statement at [1] also evaluates to false. As a result, we will get the value of ``config_access_token`` as a boolean value from line [2] because the value of ``config_access_token`` will not be set from both of the above conditions. Due to ``config_access_token`` being a boolean value, the value of ``channels`` ends up being a boolean value. This commit will fix the above error by providing an empty string within ``config_access_token``, rather than boolean values. So, the value of ``channels`` will consistently be a string. [1]: https://github.com/odoo/odoo/blob/16120774d6e7b16b44f771ca8224426e78676295/addons/pos_self_order/controllers/self_entry.py#L35-L47 [2]: https://github.com/odoo/odoo/blob/16120774d6e7b16b44f771ca8224426e78676295/addons/pos_self_order/controllers/self_entry.py#L16C8-L23C50 sentry-5136273134 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change reverts a previous update that could incorrectly switch an online shopper's cart customer to OdooBot in some website shop requests. Reverting it prevents wrong customer assignments while a cleaner long-term solution is prepared separately.
Original PR description
This reverts commit 4246d6e93e8450adc727981f3bb2b8c24aebafc9. This commit included changes that triggered sale_get_order calls in routes/requests that did not use it previously. Since those routes were using an environment sudoed with the superuser, the call to sale_get_order wrongly changed the customer to OdooBot. This will be addressed in a cleaner way in a separate PR, but for now, we only revert the wrong commit. opw-3949391 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Settings page now properly activates developer mode when users click the option. This ensures administrators can access advanced configuration tools without needing a manual workaround or page refresh.
Original PR description
Steps to reproduce ================== - Go to settings - Click on "Activate the developer mode" => Nothing happens Cause of the issue ================== The page isn't reloaded Solution ======== Use the router and pass the reload option. The same call is done in debug_provider.js opw-3922717
Fixed an issue where gift cards sold in Point of Sale could fail to generate when product loading was restricted by category. The checkout now includes the required gift card products from the start of the session, ensuring customers receive the expected generated gift card.
Original PR description
Steps: --- - Install pos_loyalty with demo. - Configure shop to restrict product loading, only chairs. - Also make sure the setting is "Generate PDF Cards". - Open pos. - Search for the gift card (search more to load the product from server). - Sell the gift card. Issue: --- At checkout, there should be a generated gift card. Cause: --- Gift card product was not being loaded at the start of the POS session due to category restrictions. This caused `trigger_product_ids` to be empty since the product with the matching ID wasn't loaded. FIX: --- When loading data at the start of the session, load all products listed in `trigger_product_ids`. task-3911737