Skip to Content
Menu
This question has been flagged
3213 Zobrazenia

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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
sep 24
2082
0
mar 22
1800
1
jan 22
4993
8
feb 19
11112
1
mar 15
6204