changeset 222b47ef39a3 in modules/analytic_account:5.0
details:
https://hg.tryton.org/modules/analytic_account?cmd=changeset&node=222b47ef39a3
description:
Use empty set when no roots for company
issue10541
review350031002
(grafted from aa6e68375f59a52ed5fe3547e91347303d2cc0a0)
diffstat:
line.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r a1543d00c68b -r 222b47ef39a3 line.py
--- a/line.py Thu Jun 17 21:51:49 2021 +0200
+++ b/line.py Mon Jul 05 11:39:39 2021 +0200
@@ -286,7 +286,7 @@
for analytic_line in line.analytic_lines:
amount = analytic_line.debit - analytic_line.credit
amounts[analytic_line.account.root] += amount
- roots = company2roots[line.move.company]
+ roots = company2roots.get(line.move.company, set())
if not roots <= set(amounts.keys()):
line.analytic_state = 'draft'
continue