[FIX] mrp: state of flexible MO
[FIX] mrp: state of flexible MO

- Create flexible BOM for product P
- Create a MO for 5 units
- Produce 3 units
- Post the inventory
- Cancel the MO

The MO remains 'In Progress'.

In case of a flexible BOM, the quantity produced is compared to the
quantity to produce to know whether the MO should be done. In this
specific case, however, the MO should be closed.

It's not possible to rely on the move states in this case, so we
force the MO state.

opw-2270279

closes odoo/odoo#53002

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

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