[FIX] sale_mrp: use previous_product_uom_qty
Since revision cb618e9a99, `previous_product_uom_qty` is not
set in the context anymore but passed as parameter.
opw-2146706
closes odoo/odoo#42820
X-original-commit: 33741910e32680e644e2509d108b0cd4a4138013
Related: odoo/enterprise#7565
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -68,6 +68,6 @@ class SaleOrderLine(models.Model):
|
||||
# and after update, and return the difference. We don't take into account what was already
|
||||
# sent, or any other exceptional case.
|
||||
bom = self.env['mrp.bom']._bom_find(product=self.product_id, bom_type='phantom')
|
||||
if bom and 'previous_product_uom_qty' in self.env.context:
|
||||
if bom and previous_product_uom_qty:
|
||||
return previous_product_uom_qty and previous_product_uom_qty.get(self.id, 0.0)
|
||||
return super(SaleOrderLine, self)._get_qty_procurement(previous_product_uom_qty=previous_product_uom_qty)
|
||||
|
||||
Reference in New Issue
Block a user