콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
9049 화면

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

아바타
취소

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/

작성자

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.

작성자

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

작성자

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

작성자

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

베스트 답변

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).

아바타
취소
관련 게시물 답글 화면 활동
2
12월 23
1938
0
12월 23
1870
0
2월 22
2013
1
7월 19
8491
0
8월 24
801