[FIX] sale_stock: incorrect return
- Create a SO with both 'service' and 'consu' products - Depending on the order of the lines, the 'Delivered qty' might not be editable consistently. This is because of an incorrect `return` statement in the `_compute_qty_delivered_updateable` method. opw-710561
This commit is contained in:
@@ -121,8 +121,9 @@ class SaleOrderLine(models.Model):
|
||||
def _compute_qty_delivered_updateable(self):
|
||||
for line in self:
|
||||
if line.product_id.type not in ('consu', 'product'):
|
||||
return super(SaleOrderLine, self)._compute_qty_delivered_updateable()
|
||||
line.qty_delivered_updateable = False
|
||||
super(SaleOrderLine, line)._compute_qty_delivered_updateable()
|
||||
else:
|
||||
line.qty_delivered_updateable = False
|
||||
|
||||
@api.onchange('product_id')
|
||||
def _onchange_product_id_set_customer_lead(self):
|
||||
|
||||
Reference in New Issue
Block a user