[FIX] mrp: use correct qty variable/term
A "quantity_done" removal was missed in the MO Overview report, which made it so the report would throw an error when opened for a done MO. Also replace "Reserved" with "Quantity" in the overview so that it is more consistent with pickings + is more intuitive since it is currently confusing that when the qty produced is updated, then it appears that the qty reserved changes (rather than a qty being done) closes odoo/odoo#140246 Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
@@ -403,7 +403,7 @@ 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 production.state == 'done' and float_is_zero(move_raw.quantity, 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}"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<th t-if="data['show_replenishments']" class="text-center">Status</th>
|
||||
<th t-attf-class="{{ 'text-center' if data['show_uom'] else 'text-end' }}" t-attf-colspan="{{ 2 if data['show_uom'] else 1 }}">Quantity</th>
|
||||
<th t-if="data['show_availabilities']" class="text-end">Free to use / On Hand</th>
|
||||
<th t-if="data['show_availabilities']" class="text-end">Reserved</th>
|
||||
<th t-if="data['show_availabilities']" class="text-end">Quantity</th>
|
||||
<th t-if="data['show_receipts']" class="text-end">Receipt</th>
|
||||
<th class="text-end" t-if="data['show_unit_costs']">Unit Cost</th>
|
||||
<th t-if="data['show_mo_costs']" class="text-end">MO Cost</th>
|
||||
|
||||
Reference in New Issue
Block a user