Skip to content

[FIX] account_invoice_overdue_reminder: use correct report action XML ID - #570

Open
jans23 wants to merge 1 commit into
OCA:18.0from
Nitrokey:18.0-fix-account_invoice_overdue_reminder
Open

[FIX] account_invoice_overdue_reminder: use correct report action XML ID#570
jans23 wants to merge 1 commit into
OCA:18.0from
Nitrokey:18.0-fix-account_invoice_overdue_reminder

Conversation

@jans23

@jans23 jans23 commented Jul 9, 2026

Copy link
Copy Markdown

The method _get_attachment_ids() was calling iaro._render() with 'account.report_invoice_with_payments', which is the XML ID of an ir.ui.view (QWeb template), not an ir.actions.report. Odoo 18 enforces a strict type check in ir.actions.report._get_report(), causing a ValueError at runtime.

Fix: use the correct ir.actions.report XML ID 'account.account_invoices' instead.

The method _get_attachment_ids() was calling iaro._render() with
'account.report_invoice_with_payments', which is the XML ID of an
ir.ui.view (QWeb template), not an ir.actions.report. Odoo 18 enforces
a strict type check in ir.actions.report._get_report(), causing a
ValueError at runtime.

Fix: use the correct ir.actions.report XML ID 'account.account_invoices'
instead.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @alexis-via,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:account_invoice_overdue_reminder Module account_invoice_overdue_reminder labels Jul 9, 2026
for inv in self.invoice_ids:
report_bin, report_format = iaro._render(
"account.report_invoice_with_payments", [inv.id]
"account.account_invoices", [inv.id]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a real issue with the module as the _render function uses _get_report (here) which has a lot of fallbacks.

In a fresh database the following is used:

<record id="account_invoices" model="ir.actions.report">
    ...
    <field name="report_name">account.report_invoice_with_payments</field>
    <field name="report_file">account.report_invoice_with_payments</field>
    ...
</record>

Usually L664 is used. If you edit the report in your database it goes further and tries to resolve it as a reference and this fails with the given exception.

Nevertheless it change seems to be more inline with the current account code as only account.account_invoices is referenced directly in multiple cases and not the report_name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:account_invoice_overdue_reminder Module account_invoice_overdue_reminder series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants