Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2025 Vizualizări

I often get confused how I should be making templates in Odoo because I have seen a couple different ways.

#1
?xml version="1.0" encoding="UTF-8" ?>

templates xml:space="preserve">

​t t-name="some_asset" t-inherit="web.assets_backend" name="Some Layout">


#2

?xml version="1.0" encoding="UTF-8"?> 

odoo> 

​template id="some_other_asset" inherit_id="web.assets_backend" name="Some Other Layout">


And then I also see this

#3 

?xml version="1.0" encoding="UTF-8"?> 

odoo> 

​data>

​template id="some_other_asset" inherit_id="web.assets_backend" name="Some Other Layout">

Between those three, I never know what to use and where it MUST be used. For instance, does this template need to be in module/static/src/xml/ or does it need to be in module/views/ or maybe it needs to be in module/static/src/views.

Can somebody please help make this clear for me.


Imagine profil
Abandonează
Cel mai bun răspuns
For this and other cases it is always good to search the Odoo code. 

This is how the backend is planned 





You can save the frontend ones in static and the backend ones in views But all you have to do is tell Odoo where to find what it needs.
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
apr. 24
1569
0
mai 24
1353
1
mar. 24
1340
4
mai 25
2486
2
mai 25
5839