[FIX] account_invoice_overdue_reminder: use correct report action XML ID - #570
Open
jans23 wants to merge 1 commit into
Open
[FIX] account_invoice_overdue_reminder: use correct report action XML ID#570jans23 wants to merge 1 commit into
jans23 wants to merge 1 commit into
Conversation
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.
Contributor
|
Hi @alexis-via, |
fkantelberg
approved these changes
Jul 17, 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] |
Member
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.