supply_on_sale should not always return True if there is no moves

issue5017
review20441003
This commit is contained in:
Cédric Krier
2015-10-08 19:46:04 +02:00
parent 6aaf01553d
commit 62b9acbc37
+2 -2
View File
@@ -66,8 +66,8 @@ class SaleLine:
def supply_on_sale(self):
supply_on_sale = super(SaleLine, self).supply_on_sale
return (supply_on_sale
or all(m.from_location.type == 'drop'
for m in self.moves))
or (self.moves and all(m.from_location.type == 'drop'
for m in self.moves)))
def get_move(self, shipment_type):
result = super(SaleLine, self).get_move(shipment_type)