d7488f56f477f7f596127e080c72c03cb76ab721
Move the sanity check from the `button_validate()` outside so it can be run premptively in a different context. Basically it allows batches to run the santiy_check as a whole. This means that when the function checks if there is at least one quantity done to check only those move_lines for the lot/serial numbers, it is now able to check the pickings independantly from each others like before, but also as if they were a single entity. This can avoid this weird behavior in the following batch : Picking | product_name | qty | done_qty --------|----------------|-----|--------- Pick_1 | product_1 | 2 | 0 Pick_1 | product_serial | 1 | 0 Pick_2 | product_2 | 2 | 0 Setting a done_qty on product_1 would be fine to validate the batch, since at least one done_qty would be found within Pick_1. But setting a done_qty on product_2 would raise an error for missing serial numbers since then no done_qty would be found within Pick_1. This commit evens the behavior of the sanitizer in this case. While keeping the way it works outside of a batch validation. Task-2971346 X-original-commit: 3a3b5d90d58339f65b1db0b52a2c81e02b5a3f17 Part-of: odoo/odoo#102382
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%