syntax error when no previous fiscal year on FEC generation
With only one fiscalyear (the current one), when requesting FEC generation, the following error occurs:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 73, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 46, in rpc
request, database_name, *request.rpc_params)
File "/trytond/wsgi.py", line 44, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 122, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 176, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/wizard/wizard.py", line 287, in execute
return wizard._execute(state_name)
File "/trytond/wizard/wizard.py", line 318, in _execute
result = self._execute(transition())
File "/trytond/modules/account_fr/account.py", line 114, in transition_generate
for row in self.get_start_balance():
File "/trytond/modules/account_fr/account.py", line 227, in get_start_balance
cursor.execute(*query)
File "/trytond/backend/postgresql/database.py", line 65, in execute
cursor.execute(self, sql, args)
psycopg2.ProgrammingError: syntax error at or near ")"
LINE 1: ...b"."state" != 'draft')) AND ("d"."fiscalyear" IN ())) GROUP ...
^