Skip to content
Snippets Groups Projects
Commit f874fd46 authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] mrp: clear component when the BoM Changes


Steps to Reproduce the Bug:

- Create a storable product "P1" with 2 Bills of Materials:
   - BoM 1:
     - Component: C1
   - BoM 2:
     - Component: C2

- Create a MO:
   - Select BoM 1.
   - Save.
   - Select BoM 2 without saving. Result: The component C1 is deleted
   and replaced by the component of BoM 2.
   - Select BoM 1.

Problem:
The component of BoM 2 is not cleared. Because we check if the new BoM
is different from the original one, but since we didn't save the change
when selecting BoM 2, the `move_raw_ids` are not cleared.

Solution:
Clear the `move_raw_ids` if any move with `bom_line` is not linked to
the current BoM.

OPW-3473387

closes odoo/odoo#134718

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent db3bb58e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment