Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] accounting reports: Memory errors because of shows a lot of records opening them #81266

Open
moylop260 opened this issue Dec 11, 2021 · 3 comments

Comments

@moylop260
Copy link
Contributor

moylop260 commented Dec 11, 2021

Impacted versions:

Tested in 14.0

Steps to reproduce:

  1. Create 100k partners with invoices
  2. Open the menu Accounting -> Reporting -> Partner Ledger (From enterprise/account_reports module)

Current behavior:

The following traceback is raised

  File "odoo/http.py", line 532, in response_wrap
    response = f(*args, **kw)
  File "addons/web/controllers/main.py", line 1389, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "addons/web/controllers/main.py", line 1381, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "odoo/api.py", line 396, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "odoo/api.py", line 383, in _call_kw_multi
    result = method(recs, *args, **kwargs)                                                                                                                                             File "enterprise/account_reports/models/account_report.py", line 1167, in get_report_informations
    'main_html': self.get_html(options),
  File "enterprise/account_reports/models/account_report.py", line 1229, in get_html
    html = self.env.ref(template)._render(render_values)
  File "addons/website/models/ir_ui_view.py", line 411, in _render
    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "addons/web_editor/models/ir_ui_view.py", line 28, in _render
    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "odoo/addons/base/models/ir_ui_view.py", line 1717, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "odoo/addons/base/models/ir_qweb.py", line 55, in _render
    result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
  File "odoo/addons/base/models/qweb.py", line 259, in _render
    return u''.join(body).encode('utf8')
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "odoo/http.py", line 640, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "odoo/http.py", line 316, in _handle_exception
    raise exception.with_traceback(None) from new_cause
MemoryError

Expected behavior:

What about using a limit and pages similar to tree views?
In order to be able to filter the records or increase the quantity of records to see

Similar way for unfolded option like a o2m field in form view showing only 80 records by default with pages

@fmdl
Copy link
Contributor

fmdl commented Dec 13, 2021

same as : #77529

@moylop260
Copy link
Contributor Author

Thank you @fmdl

I was worried that the ticket support team says me again: "I can not reproduced in runbot"

Similar to MemoryError with messages:

@fmdl
Copy link
Contributor

fmdl commented Dec 14, 2021

@qdp-odoo can you check this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants