Use lines attribute from grouped Line class

The lines from the scopes contain all the lines instead of only the grouped
lines.

issue8236
review263351002
This commit is contained in:
Cédric Krier committed 2019-04-23 12:03:21 +02:00
1 parent 2b3f4108b2
commit 5e8e0b1af9
1 file changed
+2 -2
+2 -2
View File
@@ -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