Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3261 Zobrazení

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šit
Related Posts Odpovědi Zobrazení Aktivita
1
zář 24
2151
0
bře 22
1853
1
led 22
5038
8
úno 19
11163
1
bře 15
6265