Skip to content
Snippets Groups Projects
Commit d3ee7a7a authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] sale_mrp, sale_stock: procurement qty of kits

- Create a BOM kit for product F with:
  2 Unit(s) of A
  1 Unit(s) of B
- Create a SO for 1 Unit(s) of F, confirm
  => a picking with 2 Unit(s) of A and 1 Unit(s) of B is created
- Modify the Ordered Qty to 2 Unit(s)

The picking is not updated.

This is because `_get_qty_procurement` wrongly computed the product
quantity based on the moves' quantities. This is not correct since the
moves are for products A and B, not product F.

At this point, it is not possible to make sure of the real procurement
quantity. therefore, we use a very simple approach: we compare the sold
quantity before and after modification, and return the difference.

opw-1881227

closes odoo/odoo#27064
parent 8a88bbeb
No related branches found
No related tags found
Loading
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