diff --git a/addons/mrp/models/stock_move.py b/addons/mrp/models/stock_move.py index 058765a1ae1..9ce77a986dc 100644 --- a/addons/mrp/models/stock_move.py +++ b/addons/mrp/models/stock_move.py @@ -361,7 +361,7 @@ class StockMove(models.Model): if not bom: moves_ids_to_return.add(move.id) continue - if move.picking_id.immediate_transfer or float_is_zero(move.product_uom_qty, precision_rounding=move.product_uom.rounding): + if float_is_zero(move.product_uom_qty, precision_rounding=move.product_uom.rounding): factor = move.product_uom._compute_quantity(move.quantity_done, bom.product_uom_id) / bom.product_qty else: factor = move.product_uom._compute_quantity(move.product_uom_qty, bom.product_uom_id) / bom.product_qty diff --git a/addons/mrp/tests/test_stock.py b/addons/mrp/tests/test_stock.py index 27f6a4c0c32..5416cbf3d3e 100644 --- a/addons/mrp/tests/test_stock.py +++ b/addons/mrp/tests/test_stock.py @@ -308,7 +308,7 @@ class TestKitPicking(common.TestMrpCommon): move_receipt_1 = self.env['stock.move'].create({ 'name': self.kit_parent.name, 'product_id': self.kit_parent.id, - 'quantity_done': 3, + 'product_uom_qty': 3, 'product_uom': self.kit_parent.uom_id.id, 'picking_id': picking.id, 'picking_type_id': self.env.ref('stock.picking_type_in').id, diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index d9d73321a27..07742956a15 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -393,8 +393,6 @@ context="{'default_company_id': company_id, 'default_product_id': product_id}" domain="[('product_id','=',product_id)]"/> -