ccd66d3e18ebffe265c2e3680ec85dee2838f828
Steps to reproduce the bug:
- Create a storable product ”P1” with 2 BoM:
- BoM 1:
Type: manufacture
Component: C1
- BoM 2:
Type: manufacture
Component: C2
- Create a MO:
- Add the product “P1”
- The BoM 1 is automatically set and the component “C1” is added
- Save the MO
- Edit The MO:
- set the BoM 2 instead of BoM 1
Problem:
The component C2 is added, but the component “C1” linked to BoM 1 is
not deleted
To delete the existing lines, we check if the product has changed,
but we do not check if the BoM has changed:
https://github.com/odoo/odoo/blob/16.0/addons/mrp/models/mrp_production.py#L694
Solution:
clear “move_raws” if BoM change.
No need to check if the product has changed to clear component,because
if the product changes, the bom changes too
opw-3069283
closes odoo/odoo#105983
X-original-commit: 916449eb382715f341b05666cfec336e30c5db36
Signed-off-by: William Henrotin (whe) <whe@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%