Exclude lines without quantity when computing carrier context

issue8108
review56601002
This commit is contained in:
Sergi Almacellas Abellana committed 2019-02-22 19:50:07 +01:00
1 parent 16eaf96163
commit 1a09c72be6
1 file changed
+1 -1
+1 -1
View File
@@ -28,7 +28,7 @@ class Sale(metaclass=PoolMeta):
weights = []
context['weights'] = weights
lines = [l for l in self.lines or [] if l.quantity > 0]
lines = [l for l in self.lines or [] if l.quantity and l.quantity > 0]
keyfunc = partial(self._group_parcel_key, lines)
lines = sorted(lines, key=keyfunc)