From 484f6ed8d23cf0caedbcc385ef64e8f67c5b9ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 21 Oct 2015 18:28:07 +0200 Subject: [PATCH] Don't check line with supply_on_sale issue5058 review22561003 --- sale.py | 4 +++- tryton.cfg | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sale.py b/sale.py index b857db5602..549696ec5a 100644 --- a/sale.py +++ b/sale.py @@ -89,7 +89,9 @@ class Sale: def filter_line(line): return (line.product and line.product.type == 'goods' - and line.quantity > 0) + and line.quantity > 0 + # Use getattr as supply_on_sale comes from sale_supply module + and not getattr(line, 'supply_on_sale', False)) def get_delta(date): 'Compute quantity delta at the date' diff --git a/tryton.cfg b/tryton.cfg index 66bb2ef41f..4901606d6f 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -5,6 +5,7 @@ depends: sale stock extras_depend: + sale_supply stock_supply xml: sale.xml