Files
odoo_source/addons/mrp/wizard
Tiffany Chang (tic) 1db43edebb [FIX] mrp: correctly set consumption warning values
Previous fix odoo/odoo#121602 did not correctly handle the case when not
all of the qty to manufacture is manufactured (the qtys to change to
were miscalculated in this case).

Additionally, it missed fixing a few more use cases when setting the
qtys to match the wizard's lines/qtys:
- if the UoM of a MO's component line is changed => the correct qty was
  not correctly converted into the move.product_uom's qty (now it is)
- if a component's move is deleted before the MO is confirmed => the
  move (i.e. the missing component) was not correctly added back into
  the MO (now it is)
- if there are 2 MO component moves with the same product => both were
  set to the same "correct qty" value (now we only set the first move to
  that qty, others are set to 0 since we have no way of knowing how to
  distribute the qtys otherwise)

Also, since an UserError needed to be added in case of a missing comp
move for a tracked product, existing error logic has been updated to
list all applicable products and the message has been improved to be
more helpful.

Note that the fix for saas-16.4 and earlier is slightly different from
this fix due to the change in how stock move original demand qtys no
longer change like they used to (see: odoo/odoo#130342) and because a
backorder bug was also exposed by this change.

closes odoo/odoo#135796

Task: 3456604
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-20 14:36:56 +00:00
..