Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
1322 Widoki

Hi,

I would like to create a new external layout to have the customer address on the same line as the company address for my sale order pdf report

I went to Settings > Technical > User Interface > Views and duplicated the external_layout_folder in order to personalize the layout through code, using a custom <t t-name="web.external_layout_folder_custom"> in this view.
Then, I call this template with <t t-call="web.external_layout_folder_custom"> in my pdf sale order report

But the field External ID is greyed out in my view external_layout_folder_custom and when I try to save my sale order pdf report, I have this error in odoo.sh logs

odoo.addons.base.models.ir_qweb.QWebException: Error while render the template

ValueError: External ID not found in the system: web.external_layout_folder_custom

I have created a new external identifier though Settings > Technical > Sequences & identifiers > External identifiers

Is it the right way to do it ?

I am on Odoo 18, running on Odoo.sh

Awatar
Odrzuć
Najlepsza odpowiedź

Hello Benjamin ROCHE,

Try to add xpath in the external layout with needed XML id of templates where you want to have that in report and thus u can get it.

rather than creating a whole new it would be better.

Thanks

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Thank you Jainil for your answer !

I have finally created a whole new as there were too many modifications, and just applying change with xpath would be a mess

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
kwi 25
1188
4
lis 24
7047
1
mar 24
1962
3
wrz 23
24762
0
lut 24
2977