Replies: 6 comments
-
Can you provide more details? Stack trace, repro scenario, etc. |
Beta Was this translation helpful? Give feedback.
-
Scenario: Almost every report we try. And we can’t find the difference that makes some reports run as expected.
Error:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/src/odoo/http.py", line 653, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/src/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/src/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/odoo/src/odoo/http.py", line 695, in dispatch
result = self._call_function(**self.params)
File "/odoo/src/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/src/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/src/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/src/odoo/http.py", line 939, in __call__
return self.method(*args, **kw)
File "/odoo/src/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/odoo/src/addons/web/controllers/main.py", line 934, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/src/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/src/odoo/api.py", line 699, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/odoo/src/odoo/api.py", line 690, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report_instance.py", line 811, in compute
kpi_matrix = self._compute_matrix()
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report_instance.py", line 803, in _compute_matrix
self._add_column(aep, kpi_matrix, period, period.name, description)
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report_instance.py", line 771, in _add_column
return self._add_column_actuals(aep, kpi_matrix, period, label, description)
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report_instance.py", line 726, in _add_column_actuals
no_auto_expand_accounts=self.no_auto_expand_accounts,
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report.py", line 842, in declare_and_compute_period
date_from, date_to, target_move, additional_move_line_filter, aml_model
File "/odoo/external-src/mis-builder/mis_builder/models/aep.py", line 356, in do_queries
rate, dp = company_rates[acc["company_id"][0]]
TypeError: 'bool' object is not subscriptable
Met vriendelijke groet/Kind regards/Distinti saluti,
Magnus Red
Willem Hulshof
+31 88 696 60 00 | +31 651 243 710 | www.magnus.nl<http://www.magnus.nl/red/>
[signature_141150109][id:4FD331F6-E3AE-4679-826C-9D6015959C97]
Van: "Stéphane Bidoul (ACSONE)" <[email protected]>
Beantwoorden - Aan: OCA/mis-builder <[email protected]>
Datum: vrijdag 6 december 2019 om 15:13
Aan: OCA/mis-builder <[email protected]>
CC: Willem Hulshof <[email protected]>, Author <[email protected]>
Onderwerp: Re: [OCA/mis-builder] TypeError: 'bool' object is not subscriptable in 11.0 (#249)
Can you provide more details? Stack trace, repro scenario, etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#249?email_source=notifications&email_token=ACWWXKMI3TFTTXA5GLWTA7LQXJMZNA5CNFSM4JWXKWV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGEGJTI#issuecomment-562586829>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACWWXKLAIA7GMHMMAKXHGKDQXJMZNANCNFSM4JWXKWVQ>.
|
Beta Was this translation helpful? Give feedback.
-
That is weird. The error message Could it be you have a move line with |
Beta Was this translation helpful? Give feedback.
-
OK, will check!
Met vriendelijke groet/Kind regards/Distinti saluti,
Magnus Red
Willem Hulshof
+31 88 696 60 00 | +31 651 243 710 | www.magnus.nl<http://www.magnus.nl/red/>
[signature_2006108712][id:4FD331F6-E3AE-4679-826C-9D6015959C97]
Van: "Stéphane Bidoul (ACSONE)" <[email protected]>
Beantwoorden - Aan: OCA/mis-builder <[email protected]>
Datum: zaterdag 7 december 2019 om 12:56
Aan: OCA/mis-builder <[email protected]>
CC: Willem Hulshof <[email protected]>, Author <[email protected]>
Onderwerp: Re: [OCA/mis-builder] TypeError: 'bool' object is not subscriptable in 11.0 (#249)
That is weird. The error message 'bool' object is not subscriptable says that some part of company_rates[acc["company_id"][0]] is a boolean (most probably False). company_rates cannot be a boolean (it might be an empty dict). acc cannot be a boolean either or Odoo's read_group would behave very stragely.
Could it be you have a move line with company_id that is not set?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#249?email_source=notifications&email_token=ACWWXKKIOW3MKSB44J7H2FTQXOFOLA5CNFSM4JWXKWV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGFJPI#issuecomment-562844861>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACWWXKLYI4WJBGTHQ2GGQLLQXOFOLANCNFSM4JWXKWVQ>.
|
Beta Was this translation helpful? Give feedback.
-
Hi Stephane, I'm working together with Willem and I want thank you for that valuable hint - you were absolutely correct. It turns out that we have some move lines for which the company_id was not set. Good thing is that this was on a test system, where we did some experimentation with record rules. In any case this explain the root cause of the issue. Best regards, Stephan van den Berg |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback. Closing this, then. |
Beta Was this translation helpful? Give feedback.
-
We get above error in fairly standard 11.0 environment with latest mis-builder repo and really standard BS/PL reports, which work perfectly in 10.0
Anybody recognise it?
Beta Was this translation helpful? Give feedback.
All reactions