Skip to Content
Menu
This question has been flagged

Hello, 

I am trying to change the default invoice template which to a new one which I have created. I have changed the template which is sent via the email template, which is all good.

However, the template which is used for the portal is still the original template which is used, I have looked at the code and can see that it is an IFrame which is returned from the controller found in the accounts module. 

The function returns:

return self._show_report(model=invoice_sudo, report_type=report_type, report_ref='account.account_invoices', download=download)

And the _show_report function gets the report using:

report_sudo = request.env.ref(report_ref).sudo()

The ORM document states that the XMl_ID of the document is used to search in the ref function. 

Where is the XML ID defined and would it be better to:

  1. Change the XML ID in the python code to the new invoice.

  2. Change the XML ID of the new template to "account.account_invoices" and change the XML ID of the original?


EDIT: I am using Studio, and a solution in Studio would be preferable,

Thanks, 

Avatar
Discard
Related Posts Replies Views Activity
1
Sep 24
346
0
Mar 22
1125
1
Jan 22
3703
8
Feb 19
9152
1
Mar 15
4576