From ee07505ffc1d1b5505252e2504eda45a228ea10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 24 Sep 2018 14:37:31 +0200 Subject: [PATCH] Do not fetch start balance if there is no previous fiscal year PostgreSQL does not support IN clause with an empty list. issue7720 review60361002 --- account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/account.py b/account.py index 783cc532d4..44691fa852 100644 --- a/account.py +++ b/account.py @@ -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)