[FIX] mrp: hide components that weren't consumed in done MO Overview
If a component wasn't consumed at all during the manufacturing process, we don't want to see it on the final Overview. Task-3251506 Part-of: odoo/odoo#114536
This commit is contained in:
@@ -292,6 +292,9 @@ class ReportMoOverview(models.AbstractModel):
|
||||
else:
|
||||
replenish_data = self._get_replenishments_from_forecast(production, replenish_data)
|
||||
for count, move_raw in enumerate(production.move_raw_ids):
|
||||
if production.state == 'done' and float_is_zero(move_raw.quantity_done, precision_rounding=move_raw.product_uom.rounding):
|
||||
# If a product wasn't consumed in the MO by the time it is done, no need to display it on the final Overview.
|
||||
continue
|
||||
component_index = f"{current_index}{count}"
|
||||
replenishments = self._get_replenishment_lines(production, move_raw, replenish_data, level, component_index)
|
||||
# If not enough replenishment -> To Order / Might get "non-available" in summary since all component won't be there in time
|
||||
|
||||
Reference in New Issue
Block a user