70d292afd8a8388f6abdf51052cd558639651fcf
Steps to reproduce the bug:
- Enable the “byproduct” option in the settings
- Enable 3 steps for manufacturing operation
- Create a storable product “P1”:
- Component: C1, qty: 1 unit
- By-product: C2, qty: 0 unit
- Create a MO:
- Confirm it
- Update the qty produced of C2 to 1
- Mark as done the MO
- Go to the picking
Problem:
The quantity of the byproduct (C2) is not updated to 1.
When the MO is marked as done, the "_action_done" for finished moves is
called:
https://github.com/odoo/odoo/blob/34c192761fa375b56d617fec78fb63d8008f6451/addons/mrp/models/mrp_production.py#L1465
Then, we will check, if we should create an extra move:
https://github.com/odoo/odoo/blob/6a114cc97e0ee0648751194c1ffe3e70d900062c/addons/stock/models/stock_move.py#L1507
However, since we ignore moves with a product_uom_qty of 0, we do not
check if this move has a different done quantity and thus do not create
an extra move:
https://github.com/odoo/odoo/blob/eb4f5fc929217dea7d97a66b6aeeaa8b0bd1e3f1/addons/stock/models/stock_move.py#L1779-L1780
opw-3815481
closes odoo/odoo#161127
Signed-off-by: Quentin Wolfs (quwo) <quwo@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%