Use empty set when no roots for company
issue10541 review350031002 (grafted from aa6e68375f59a52ed5fe3547e91347303d2cc0a0) --HG-- branch : 6.0
This commit is contained in:
1 parent
e6f7a6308a
commit
47d3d18d3e
1 file changed
+1
-1
@@ -276,7 +276,7 @@ class MoveLine(ModelSQL, ModelView):
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user