Application Error / Fault: (180, 133) with a filter on GL party accounts
[I find it odd, and a bug, that the bug reporting system seems to lose issues... I already reported this one recently]
Now retrying under released 5.8 I get the following Application Error trying to apply the same filter used on GL accounts directly, namely: "Balance de départ": !0 or (Débit: !0 or Crédit:!0)
Traceback (most recent call last):
File "/trytond/wsgi.py", line 111, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 47, in rpc
return methods.get(request.rpc_method, _dispatch)(
File "/trytond/wsgi.py", line 78, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 181, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/model/modelsql.py", line 1268, in search
tables, expression = cls.search_domain(domain)
File "/trytond/model/modelsql.py", line 1454, in search_domain
expression = convert(domain)
File "/trytond/model/modelsql.py", line 1451, in convert
return And((convert(d) for d in (
File "/trytond/model/modelsql.py", line 1451, in <genexpr>
return And((convert(d) for d in (
File "/trytond/model/modelsql.py", line 1451, in convert
return And((convert(d) for d in (
File "/trytond/model/modelsql.py", line 1451, in <genexpr>
return And((convert(d) for d in (
File "/trytond/model/modelsql.py", line 1449, in convert
return Or((convert(d) for d in domain[1:]))
File "/trytond/model/modelsql.py", line 1449, in <genexpr>
return Or((convert(d) for d in domain[1:]))
File "/trytond/model/modelsql.py", line 1442, in convert
expression = field.convert_domain(domain, tables, cls)
File "/trytond/model/fields/function.py", line 79, in convert_domain
return getattr(Model, self.searcher)(self.name, domain)
File "/trytond/modules/account/account.py", line 1758, in search_debit_credit
ids = [a.id for a in accounts
File "/trytond/modules/account/account.py", line 1759, in <listcomp>
if operator_(getattr(a, name), operand)]
File "/trytond/model/fields/function.py", line 130, in __get__
return super().__get__(inst, cls)
File "/trytond/model/fields/field.py", line 339, in __get__
return inst.__getattr__(self.name)
File "/trytond/model/modelstorage.py", line 1585, in __getattr__
read_data = self.read(list(index.keys()), list(ffields.keys()))
File "/trytond/model/modelsql.py", line 859, in read
getter_results = field.get(ids, cls, field_list, values=result)
File "/trytond/model/fields/function.py", line 105, in get
return call(names)
File "/trytond/model/fields/function.py", line 99, in call
return method(records, name)
File "/trytond/modules/account/account.py", line 1396, in get_credit_debit
id_ = account_party2id[tuple(row[0:2])]
KeyError: (180, 133)
Fault: (180, 133)
This is the only way to get rid of all the noise of zéro records listed... for example, for one account there are only two out of the fifteen entries listed that have movements in the fiscal.
As in the previously lost issue, a reminder that the GL with party report is still needed. Doing one by one is tedious with dozens and dozens of parties under multiple accounts with party_required set.