Skip to content

[11.0] ir_actions_report: assert len(outlines_pages) == len(res_ids) AssertionError: No extras <h?> html tags accpeted #35191

@hugho-ad

Description

@hugho-ad

Impacted versions:

Steps to reproduce:

  • Go to invoice report template account.report_invoice_document

  • Add an extra <h?> html tag like following image:
    image

  • Go to invoices, select more than one, and print them

Current behavior:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/data/build/odoo/addons/web/controllers/main.py", line 1620, in report_download
    response = self.report_routes(reportname, docids=docids, converter='pdf')
  File "/data/build/odoo/odoo/http.py", line 517, in response_wrap
    response = f(*args, **kw)
  File "/data/build/odoo/addons/web/controllers/main.py", line 1569, in report_routes
    pdf = report.with_context(context).render_qweb_pdf(docids, data=data)[0]
  File "/data/build/odoo/odoo/addons/base/ir/ir_actions_report.py", line 657, in render_qweb_pdf
    return self._post_pdf(save_in_attachment, pdf_content=pdf_content, res_ids=html_ids), 'pdf'
  File "/data/build/odoo/odoo/addons/base/ir/ir_actions_report.py", line 537, in _post_pdf
    assert len(outlines_pages) == len(res_ids)
AssertionError

image

Expected behavior:

Video/Screenshot link (optional):
https://youtu.be/vzPih9RX5N0

OPW
2042727

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions