Do not created purchase request when moves exist for the sale line

issue3651
review3191004
(transplanted from a7db0cb0f2509471b958347e0c583cc4606317a8)
This commit is contained in:
Cédric Krier committed 2014-02-18 18:56:26 +01:00
1 parent 96f92843c5
commit 4bbc4247fc
1 file changed
+2 -1
+2 -1
View File
@@ -75,7 +75,8 @@ class SaleLine:
if (self.type != 'line'
or not self.product
or self.quantity <= 0
or not self.product.purchasable):
or not self.product.purchasable
or any(m.state != 'cancel' for m in self.moves)):
return False
return self.product.supply_on_sale