From cb3887be7865a9dce6ce64747bc304a83121958f Mon Sep 17 00:00:00 2001 From: JF Aubert Date: Thu, 23 Nov 2023 08:43:54 +0100 Subject: [PATCH] [FIX] mrp: fix show mass produce backend/shopfloor Shop Floor introduces a restriction on how the show_serial_mass_produce flag is computed : the components cannot consist of more than 1 lot/serial. However, this has a side effect on backend views where it is still required to have full 'Mass Produce' functionalities. closes odoo/odoo#143286 Signed-off-by: William Henrotin (whe) --- addons/mrp/models/mrp_production.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index b56df4d4899..1706115273a 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -688,9 +688,6 @@ class MrpProduction(models.Model): if order.state in ['confirmed', 'progress', 'to_close'] and order.product_id.tracking == 'serial' and \ float_compare(order.product_qty, 1, precision_rounding=order.product_uom_id.rounding) > 0 and \ float_compare(order.qty_producing, order.product_qty, precision_rounding=order.product_uom_id.rounding) < 0: - moves_with_tracking = order.move_raw_ids.filtered(lambda m: m.has_tracking) - if any(len(m.move_line_ids.lot_id) > 1 for m in moves_with_tracking): - continue order.show_serial_mass_produce = True @api.depends('state', 'move_finished_ids')