Wednesday, March 27, 2024
2 changes · saas-17.1
Resolved issues and error corrections
This fix restores the Point of Sale connection to IoT Box printers after a prior change caused the system to miss the proxy setting. It also corrects device status tracking so configured hardware is recognized reliably, allowing receipts to print as expected instead of falling back to browser printing.
Original PR description
Current behavior: After this refactor https://github.com/odoo/odoo/pull/142566 the use_proxy became undefined. And so the pos is not able to connect to the proxy and use the printer connected to the IoT Box. Steps to reproduce: - Install the PoS IoT module - Configure the IoT Box with a printer - Select the printer from the IoT Box in the PoS configuration - Try to print a receipt - Nothing happens, it only try to print via the browser print popups Note: There was also an issue in the StatusLoop that was not correctly getting the ids of the devices. This was fixed in the same commit. opw-3800437 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue in Restaurant Point of Sale where printing or cancelling a bill print could incorrectly mark the order as printed. Staff can now return to the order and add more items without losing the existing order lines.
Original PR description
### Steps to reproduce: - Install **Restaurant** app. - Go to **Point of Sale** app and open a new **Restaurant** session. - Add items to the order. - Click on the **Bill** button, the receipt window…
### Steps to reproduce: - Install **Restaurant** app. - Go to **Point of Sale** app and open a new **Restaurant** session. - Add items to the order. - Click on the **Bill** button, the receipt window appears. - Click on the **Print** button, the print window appears. Cancel it - U don't have to print it or save it-. - Close the receipt window. - Add another item to the order, the older items are removed -the order is cleared-. ### Investigation: - When the **Print** button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19 - which do two actions simultaneously: - calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17 - set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 _NOW order.`_printed` IS FALSE._ - Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. _NOW order.`_printed` IS TRUE_. - When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been `false`! opw-3796605