Touati Djamel (otd) ccd66d3e18 [FIX] mrp: clear component if the BoM change
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>
2022-11-18 12:58:11 +01:00
2022-10-06 14:56:52 +02:00
2022-11-15 19:22:05 +01:00
…
…
…

Build Status Tech Doc Help Nightly Builds

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

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%