Skip to Content
Menu
This question has been flagged
3 Replies
8032 Views

Hello all,

New user (longterm dev),I have a small question, When i set my html in my template xml, it's directly overridden by the website builder when i reload the theme.
If i have <li>option1</li> and later on add <li>option2</li>,the change will never show on the front page (after theme reload).
I can however go to the edit mode and add them there...

Is it a normal behavious? And if yes, why write the html in the XML in the first place?Why not just write the structure and edit it in the website builder since it's overriding it eitherways?Would highly appreciate any input on thisand advice on the workflow..

Best

Joe

Avatar
Discard

Please use a meaningful title. Additionally, do you know about the documentation and did you read it already? Please check this: https://www.odoo.com/documentation/10.0/

Author

Indeed I was trying to adjust the title but was receiving a privileges error, probably because the question was still under moderation.

I did read the documentation and everything is working as intended,

I'm just asking about best practices, something that the documentation doesn't provide.

In a module template, is it better to include all needed markup, or rely on the editor.

Thanks

what is your actual problem the changes is not reflected in html page ? you should upgrade your addon whenever you make changes.

Author

Thanks for the input.

I'm actually talking about page layouts.

I'll take the example from the tutorial:

<!-- === Services Page === -->

<template name="Services page" id="website.services" page="True">

<t t-call="website.layout">

<div id="wrap">

<div class="container">

<h1>Our Services</h1>

<ul class="services">

<li>Cloud Hosting</li>

<li>Support</li>

<li>Unlimited space</li>

</ul>

<!-- === Snippets' area === -->

<div class="oe_structure" />

</div>

</div>

</t>

</template>

This template works wonderfully, but no matter how many times i upgrade the theme, whatever i add to this template doesn't reflect, only what I wrote the "first" time.

I can however edit it from the website builder edit (for instance if i want to add more <li> elements.

Hope this is clearer.

Thanks again

Author

And sorry about the lack of format, i don't have any formatting tools in this text editor.

Author

I believe it's similar to this issue, but I don't have access to the database i'm on windows:

https://www.odoo.com/forum/help-1/question/odoo-cache-and-updating-qweb-templates-84492

Best Answer

If you are creating a module, you are update-safe and you can easily deploy your customization to other databases too (if I did understand your question properly).

Avatar
Discard
Related Posts Replies Views Activity
2
Dec 23
696
0
Dec 23
691
0
Feb 22
1338
1
Jul 19
7466
0
Aug 24
159