Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3300 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
set 24
2250
0
mar 22
1871
1
gen 22
5129
8
feb 19
11256
1
mar 15
6357