Created on 2020-10-25.17:20:50 by risto3, last changed 1 month ago by roundup-bot.
New changeset aa9386014e59 by Cédric Krier in branch '5.8': Skip unrequested combination of account-party https://hg.tryton.org/modules/account/rev/aa9386014e59
That's better. Thanks
BTW, this filter should be by default as it seems somewhat rediculous to output null records if there have been no movements nor balance open for the party... on our base the filter takes on the order of 15 seconds to operate on a local test system!
Thanks for test too late.
I grafted this onto 5.8 where it seems to make no difference:
Traceback (most recent call last):
File "/opt/trytond/trytond/protocols/dispatcher.py", line 181, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/opt/trytond/trytond/model/modelsql.py", line 1268, in search
tables, expression = cls.search_domain(domain)
File "/opt/trytond/trytond/model/modelsql.py", line 1454, in search_domain
expression = convert(domain)
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in convert
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in <genexpr>
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in convert
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in <genexpr>
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1449, in convert
return Or((convert(d) for d in domain[1:]))
File "/opt/trytond/trytond/model/modelsql.py", line 1449, in <genexpr>
return Or((convert(d) for d in domain[1:]))
File "/opt/trytond/trytond/model/modelsql.py", line 1442, in convert
expression = field.convert_domain(domain, tables, cls)
File "/opt/trytond/trytond/model/fields/function.py", line 79, in convert_domain
return getattr(Model, self.searcher)(self.name, domain)
File "/opt/trytond/trytond/modules/account/account.py", line 1724, in search_account
ids = [a.id for a in accounts
File "/opt/trytond/trytond/modules/account/account.py", line 1725, in <listcomp>
if operator_(getattr(a, fname), operand)]
File "/opt/trytond/trytond/model/fields/function.py", line 130, in __get__
return super().__get__(inst, cls)
File "/opt/trytond/trytond/model/fields/field.py", line 339, in __get__
return inst.__getattr__(self.name)
File "/opt/trytond/trytond/model/modelstorage.py", line 1585, in __getattr__
read_data = self.read(list(index.keys()), list(ffields.keys()))
File "/opt/trytond/trytond/model/modelsql.py", line 859, in read
getter_results = field.get(ids, cls, field_list, values=result)
File "/opt/trytond/trytond/model/fields/function.py", line 106, in get
return dict((name, call(name)) for name in names)
File "/opt/trytond/trytond/model/fields/function.py", line 106, in <genexpr>
return dict((name, call(name)) for name in names)
File "/opt/trytond/trytond/model/fields/function.py", line 99, in call
return method(records, name)
File "/opt/trytond/trytond/modules/account/account.py", line 1358, in get_balance
return Account._cumulate(
File "/opt/trytond/trytond/modules/account/account.py", line 1034, in _cumulate
previous_result = func(accounts, names)
File "/opt/trytond/trytond/modules/account/account.py", line 1357, in func
return {names[0]: cls.get_balance(records, names[0])}
File "/opt/trytond/trytond/modules/account/account.py", line 1344, in get_balance
id_ = account_party2id[(account_id, party_id)]
KeyError: (588, 713)
New changeset a371949e7e46 by Cédric Krier in branch 'default': Skip unrequested combination of account-party https://hg.tryton.org/tryton-env/rev/a371949e7e46
New changeset bd55a6757068 by Cédric Krier in branch 'default': Skip unrequested combination of account-party https://hg.tryton.org/modules/account/rev/bd55a6757068
unfortunately, we tried to use this on a copy of our production base to generate auxiliaire GL & balance reports but it seems they're not yet implemented (nor is l10n yet)... cannot select multiple accounts GL accounts (perhaps that's TBD too)
But there is a problem with filters once in the account parties screen to filter out all the zero records.
(what could these possibly mean in an auxiliairy report anyway?)
With the following filter line : "Start Balance": !0 or Debit: !0 or Credit: !0
Traceback (most recent call last):
File "/opt/trytond/trytond/protocols/dispatcher.py", line 181, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/opt/trytond/trytond/model/modelsql.py", line 1268, in search
tables, expression = cls.search_domain(domain)
File "/opt/trytond/trytond/model/modelsql.py", line 1454, in search_domain
expression = convert(domain)
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in convert
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in <genexpr>
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in convert
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1451, in <genexpr>
return And((convert(d) for d in (
File "/opt/trytond/trytond/model/modelsql.py", line 1449, in convert
return Or((convert(d) for d in domain[1:]))
File "/opt/trytond/trytond/model/modelsql.py", line 1449, in <genexpr>
return Or((convert(d) for d in domain[1:]))
File "/opt/trytond/trytond/model/modelsql.py", line 1442, in convert
expression = field.convert_domain(domain, tables, cls)
File "/opt/trytond/trytond/model/fields/function.py", line 79, in convert_domain
return getattr(Model, self.searcher)(self.name, domain)
File "/opt/trytond/trytond/modules/account/account.py", line 1719, in search_account
ids = [a.id for a in accounts
File "/opt/trytond/trytond/modules/account/account.py", line 1720, in <listcomp>
if operator_(getattr(a, fname), operand)]
File "/opt/trytond/trytond/model/fields/function.py", line 130, in __get__
return super().__get__(inst, cls)
File "/opt/trytond/trytond/model/fields/field.py", line 339, in __get__
return inst.__getattr__(self.name)
File "/opt/trytond/trytond/model/modelstorage.py", line 1585, in __getattr__
read_data = self.read(list(index.keys()), list(ffields.keys()))
File "/opt/trytond/trytond/model/modelsql.py", line 859, in read
getter_results = field.get(ids, cls, field_list, values=result)
File "/opt/trytond/trytond/model/fields/function.py", line 106, in get
return dict((name, call(name)) for name in names)
File "/opt/trytond/trytond/model/fields/function.py", line 106, in <genexpr>
return dict((name, call(name)) for name in names)
File "/opt/trytond/trytond/model/fields/function.py", line 99, in call
return method(records, name)
File "/opt/trytond/trytond/modules/account/account.py", line 1358, in get_balance
return Account._cumulate(
File "/opt/trytond/trytond/modules/account/account.py", line 1034, in _cumulate
previous_result = func(accounts, names)
File "/opt/trytond/trytond/modules/account/account.py", line 1357, in func
return {names[0]: cls.get_balance(records, names[0])}
File "/opt/trytond/trytond/modules/account/account.py", line 1344, in get_balance
id_ = account_party2id[(account_id, party_id)]
KeyError: (588, 713)
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-12-13 12:47:01 | roundup-bot | set | keyword:
- backport messages: + msg63048 status: testing -> resolved |
2020-11-28 23:35:30 | risto3 | set | messages: + msg62282 |
2020-11-28 22:26:59 | reviewbot | set | messages: + msg62277 |
2020-11-28 22:20:43 | ced | set | reviews: 308671002 -> 308671002,308741002 status: in-progress -> testing |
2020-11-28 22:18:21 | ced | set | messages:
+ msg62276 status: chatting -> in-progress |
2020-11-28 17:55:43 | risto3 | set | messages:
+ msg62275 status: resolved -> chatting |
2020-11-27 22:38:57 | roundup-bot | set | messages: + msg62262 |
2020-11-27 22:38:53 | roundup-bot | set | messages:
+ msg62261 nosy: + roundup-bot status: testing -> resolved |
2020-11-21 10:22:51 | reviewbot | set | messages:
+ msg62080 nosy: + reviewbot |
2020-11-21 10:22:28 | ced | set | assignedto: ced keyword: + backport, review nosy: + ced reviews: 308671002 status: unread -> testing |
2020-11-17 00:39:16 | ced | set | type: crash |
2020-11-17 00:25:46 | ced | link | issue9837 superseder |
2020-10-26 17:54:00 | pokoli | set | nosy: + pokoli |
2020-10-25 17:20:50 | risto3 | create |