d1b0ab32bf16789cc6b9117e86e546e103d79aa5
The traceback arises when the user removes the 'product' from 'stock.move' and try to add the product in 'mrp.production'. To reproduce this issue: 1) Install 'MRP' 2) Create a new record for 'Manufacturing Order' 3) First add a line in 'Components' 4) Remove the 'product_id' from component 5) Now try to add 'Product' in mrp Error:-"AssertionError: precision_rounding must be positive, got 0.0" on the '_compute_state' method when the state is in 'draft' and the user added a line in 'move_raw_ids'. In this case, precision_rounding is getting value from 'product_uom.rounding' or 'product_id.uom_id.rounding' through 'move_raw_ids'. See:- https://github.com/odoo/odoo/blob/10e0ac377cc235d81819eaa2a4ec2b6a60fffd70/addons/mrp/models/mrp_production.py#L478-#L479 When the user removed 'product_id' from 'move_raw_ids', 'precision_rounding' will be '0.00'. Which leads to the above traceback. Applying this commit will resolve the issue by giving a default value of '0.01', when the 'precision_rounding' value is '0.00'. sentry-4220927307 closes odoo/odoo#137904 X-original-commit: 5c238bbb18c682ff2d25f740aad604feb7bb5bbc Signed-off-by: Djamel Touati (otd) <otd@odoo.com> Signed-off-by: Altaf Shaik (alsh) <alsh@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%