diff --git a/sale_order_add_bom/wizard/sale_add_phantom_bom.py b/sale_order_add_bom/wizard/sale_add_phantom_bom.py index b451441..801836b 100644 --- a/sale_order_add_bom/wizard/sale_add_phantom_bom.py +++ b/sale_order_add_bom/wizard/sale_add_phantom_bom.py @@ -28,8 +28,7 @@ class SaleAddPhantomBom(models.TransientModel): @api.model def _prepare_sale_order_line(self, bom_line, sale_order, wizard_qty): - qty_in_product_uom = self.env['product.uom']._compute_qty_obj( - bom_line.product_uom, + qty_in_product_uom = bom_line.product_uom_id._compute_quantity( bom_line.product_qty, bom_line.product_id.uom_id) vals = { @@ -56,10 +55,6 @@ class SaleAddPhantomBom(models.TransientModel): for line in self.bom_id.bom_line_ids: if float_is_zero(line.product_qty, precision_digits=prec): continue - if line.date_start and line.date_start > today: - continue - if line.date_stop and line.date_stop < today: - continue # The onchange is played in the inherit of the create() # of sale order line in the 'sale' module # TODO: if needed, we could increment existing order lines