Don't compare quantity if quantity is None

issue5303
review18971002
This commit is contained in:
Cédric Krier committed 2016-02-11 22:27:31 +01:00
1 parent 94ec39e492
commit b25b361e11
1 file changed
+2 -1
+2 -1
View File
@@ -144,7 +144,8 @@ class PriceListLine(ModelSQL, ModelView, MatchMixin):
def match(self, pattern):
if 'quantity' in pattern:
pattern = pattern.copy()
if self.quantity > pattern.pop('quantity'):
quantity = pattern.pop('quantity')
if self.quantity is not None and self.quantity > quantity:
return False
return super(PriceListLine, self).match(pattern)