From 5e8e0b1af9f177bc3353cca697ee7970d4e46e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 23 Apr 2019 12:03:21 +0200 Subject: [PATCH] Use lines attribute from grouped Line class The lines from the scopes contain all the lines instead of only the grouped lines. issue8236 review263351002 --- statement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/statement.py b/statement.py index 63a6a2abc0..47c18c30aa 100644 --- a/statement.py +++ b/statement.py @@ -386,12 +386,12 @@ class Statement(Workflow, ModelSQL, ModelView): @property def amount(self): - return sum((l.amount for l in lines)) + return sum((l.amount for l in self.lines)) @property def descriptions(self): done = set() - for line in lines: + for line in self.lines: if line.description and line.description not in done: done.add(line.description) yield line.description