[FIX] mrp: fix byproduct list view

The stock.move.line view for byproducts displays the quant_id (Pick From).
It is more appropriate to display the destination location (Store To).

closes odoo/odoo#146604

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
JF Aubert
2023-12-20 08:35:43 +00:00
parent 41e55c446a
commit 6fe45e648d
+5
View File
@@ -218,6 +218,11 @@ class StockMove(models.Model):
continue
move.should_consume_qty = float_round((mo.qty_producing - mo.qty_produced) * move.unit_factor, precision_rounding=move.product_uom.rounding)
@api.depends('byproduct_id')
def _compute_show_info(self):
super()._compute_show_info()
self.filtered(lambda m: m.byproduct_id or m in self.production_id.move_finished_ids).show_quant = False
@api.onchange('product_uom_qty')
def _onchange_product_uom_qty(self):
if self.raw_material_production_id and self.has_tracking == 'none':