Monday, April 21, 2025
2 changes · saas-18.1
Resolved issues and error corrections
This fix prevents an error when replenishing products that have supplier records without a unit of measure. If the supplier unit is missing, Odoo now uses the product's unit instead, allowing replenishment to continue normally.
Original PR description
Currently, a traceback will occur when the user tries to replenish a product that has a supplier record without UOM. To reproduce this issue: 1) Install Purchase_stock and enable UOM from settings 2) Create a supplier record with no UOM from the product 3) Now try to replenish the product. Error:- ``` ValueError: Expected singleton: uom.uom() ``` Clearly `product_uom_id` is not a required field in the `product.supplier` So the user can create a supplier record with no `product_uom_id` value. This will result in the traceback mentioned above when the `_compute_price_discounted` method attempts to calculate the value of `price_discounted`. https://github.com/odoo/odoo/blob/4f58eb9db55c102786010efe3c1fb74edefaf8f3/addons/product/models/product_supplierinfo.py#L71-L73 We can resolve this issue by taking the `UOM` from product if there is no uom sentry-6307994434
This fix prevents an error when multiple restaurant self-ordering users place orders for the same table and one pays after a POS session has been closed and reopened. It keeps the payment flow working reliably by using the available order tracking reference during internal logging.
Original PR description
This error occurs when two users scan the same table and place separate orders. [Steps to Reproduce](https://drive.google.com/file/d/1xW_V2XR0RRihGl8EOEa-5Q_mVRAGRvbh/view?usp=sharing) - Install the…
This error occurs when two users scan the same table and place separate orders. [Steps to Reproduce](https://drive.google.com/file/d/1xW_V2XR0RRihGl8EOEa-5Q_mVRAGRvbh/view?usp=sharing) - Install the `pos_restaurant module`. - Set `Self Ordering` to `QR Menu + Ordering` from `settings.` - Open `Register` and `Create` two new users and log in with them. - Open `Mobile Menus` for each user. User 1 places an order. - User 2 places an order on the same table but `don`t click on pay.` - Close the POS session and From User 2, click `Pay` - Reopen the `POS session` and click `Pay again` from User 2. KeyError - `name` This error occurs due to current changes at [1] `name` key is removed from the order but later accessed during logging. This commit resolves error by accessing the tracking number instead of the Order name. Link [1]: https://github.com/odoo/odoo/blob/e151c9b25908868ab47c4e9f3faf581dfaac8da5/addons/pos_self_order/controllers/orders.py#L36 Sentry - 6485026613 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr