Do not fetch start balance if there is no previous fiscal year

PostgreSQL does not support IN clause with an empty list.

issue7720
review60361002
This commit is contained in:
Cédric Krier
2018-09-24 14:37:31 +02:00
parent a4bd3249a6
commit ee07505ffc
+2
View File
@@ -204,6 +204,8 @@ class AccountFrFEC(Wizard):
('company', '=', company.id),
])
fiscalyear_ids = list(map(int, fiscalyears))
if not fiscalyear_ids:
return
query = (account
.join(line, condition=line.account == account.id)