Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def _get_attachment_ids(self, mail):
iaro = self.env["ir.actions.report"]
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.

)
filename = f"{inv._get_report_base_filename()}.{report_format}"
attach = iao.create(
Expand Down
Loading