From 77c6524f69a0aebe467702d1b96f892bb6f6f77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 28 Feb 2018 19:01:20 +0100 Subject: [PATCH] Do not apply promotions on return lines issue7161 review37021002 --- sale.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sale.py b/sale.py index a9a95d3f60..be1e440fb6 100644 --- a/sale.py +++ b/sale.py @@ -234,7 +234,9 @@ class SalePromotion(ModelSQL, ModelView, MatchMixin): yield category category = category.parent - if self.unit and line.unit.category != self.unit.category: + if line.quantity < 0: + return False + elif self.unit and line.unit.category != self.unit.category: return False elif self.products and line.product not in self.products: return False