[FIX] sale_stock: cancelled moves should not block product modification

This commit is contained in:
Wolfgang Taferner
2017-11-27 12:50:10 +01:00
committed by Arnold Moyaux
parent d3efda05fd
commit 2fbbf0b1ff
+1 -1
View File
@@ -129,7 +129,7 @@ class SaleOrderLine(models.Model):
@api.depends('move_ids')
def _compute_product_updatable(self):
for line in self:
if not line.move_ids:
if not line.move_ids.filtered(lambda m: m.state != 'cancel'):
super(SaleOrderLine, line)._compute_product_updatable()
else:
line.product_updatable = False