[FIX] mrp: change product variant
[FIX] mrp: change product variant

- Create a product P with 2 variants A & B (e.g. 2 colors)
- Create the following BOM
  Component 1
  Component 2a, applies to variant A
  Component 2b, applies to variant B
- Create a MO
- Set the product to variant A
  => 2 components are added: 1 and 2a
- Change the product to variant B

The component 2b is added but 2a is not removed.

The issue is coming from the result of the onchange, when comparing the
2 snapshots. The result contains the following commands:
- [(5,)]: clear the lines
- [(1, ...): ]: update component 1
- [(4, ...)]: keep component 2a
- [(0, ...)]: add component 2b

In case we are changing the product, we clear the lines.

opw-2270990

closes odoo/odoo#53684

X-original-commit: 89d9e759ae0cc31ad1fc398d41fa7a638056309e
Signed-off-by: Nicolas Martinelli (nim) <771435c469f83f6aa9c405ac5e1ed06314a94f2d@odoo.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo