Use empty set when no roots for company

issue10541
review350031002
(grafted from aa6e68375f59a52ed5fe3547e91347303d2cc0a0)

--HG--
branch : 6.0
This commit is contained in:
Sergi Almacellas Abellana committed 2021-07-05 11:39:39 +02:00
1 parent e6f7a6308a
commit 47d3d18d3e
1 file changed
+1 -1
+1 -1
View File
@@ -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