Do not apply promotion on free or empty product

issue7570
review58331002
This commit is contained in:
Cédric Krier
2018-07-25 21:55:22 +02:00
parent adeab99a62
commit 4fa62b8d55
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -1,3 +1,4 @@
* Do not apply promotion on free or empty product
* Remove support for Python 2.7
Version 4.8.0 - 2018-04-23
+1 -1
View File
@@ -232,7 +232,7 @@ class SalePromotion(
yield category
category = category.parent
if line.quantity < 0:
if line.quantity <= 0 or line.unit_price <= 0:
return False
elif self.unit and line.unit.category != self.unit.category:
return False