Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
9043 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

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/

Tác giả

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.

Tác giả

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

Tác giả

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

Tác giả

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 23
1936
0
thg 12 23
1870
0
thg 2 22
2011
1
thg 7 19
8485
0
thg 8 24
796