Tuesday, August 27, 2024
1 change · saas-17.1
Resolved issues and error corrections
Fixes a problem where using "Put in pack" in barcode receipt operations could freeze the page and lead to a server error. This makes package handling more reliable for warehouse users working with lot-tracked products and decimal quantities.
Original PR description
Current behaviour: --- Sometimes when clicking "Put in pack", the whole page freezes and gives a 503 error. Steps to reproduce: --- 1. Go to Settings, Inventory 2. Activate Packages 3. Go to Products 4. Create a new product 5. Set inventory > Tracking: By Lots 6. Go to Operations > Receipts 7. Create a new receipt for the product 8. Set the Demand quantity to 13.5 9. Click on Mark as Todo 10. Go to Barcode, operations, receipts 11. Select the last created receipt 12. Edit the line, input 5.66, save 13. Click on Put in pack 14. The whole page freezes Cause of the issue: --- Caused by: https://github.com/odoo/enterprise/commit/42e9c378b0766e98a93605d0c2bc0797e3995734 The content of `pageLines` can be modified, thus the loop can never end. Fix: --- Shallow copy of `this.pageLines` (similar than in `get groupedLines()` in `BarcodeModel`) opw-4060843