0f841c07e0df9e353748671ce8c9636ece430b66
Current behaviour: Changing the package quantity may change the package type, leading to an incoherent product quantities in the SOL. (For ex: 20 uom in 2 packages of 20) Expected behaviour: When setting the package quantity, don't change the package type. If the user wants to change the package type they can do it by manually setting it or changing the product_uom. Steps to reproduce: - Install Sale and Inventory - Activate Packages in settings - Create 2 package types for a product of choice, one of 10, another of 20 - Create a new SO with that product - Set the quantity to 10 (a new package_qty=1 and packaging type of 10 should appear) - Save - Edit package_qty to 2 - Observe that we have 20 units of the product, 2 packages of 20, instead of 2 packages of 10 Reason for the problem: When setting the `product_packaging_qty`, the `product_uom_qty` compute is triggered. When `product_uom_qty` changes, it triggers `product_packaging_id`'s compute. When `product_packaging_id` is computed, it doesn't trigger `product_package_qty`, because it is protected, since we are writing to it. Fix: When we are writing the `product_packaging_qty` and the `product_uom_qty` we remove the compute for `product_packaging_id`. Affected versions: - saas-15.2 - saas-15.3 - 16.0 - master opw-3010703 closes odoo/odoo#106924 X-original-commit: acfa94b7aeea9f8efdc1886b094697ae3f0f1d2a Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
…
…
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%