changeset d6452f9535e6 in modules/analytic_account:6.0
details: 
https://hg.tryton.org/modules/analytic_account?cmd=changeset&node=d6452f9535e6
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 4409e1cb62af -r d6452f9535e6 line.py
--- a/line.py   Thu Jun 17 21:34:27 2021 +0200
+++ b/line.py   Mon Jul 05 11:39:39 2021 +0200
@@ -276,7 +276,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

Reply via email to