Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
109 มุมมอง

Hello,

I am currently building a theme for a website that will be hosted on an Odoo instance that contains multiple websites. I want the ability for a page record to only be visible when a specific theme applied to it (Or limit it to website id). According to documentation online

I added

<field name="website_id" eval="1"/>

But the page disappears, even though I updated theme and even went as far as to drop and reinstall database. The issue still remains. I made sure to check the website_id is what is intended by checking the website metadata.

I tried another option I found online 

<field name="website_id" ref="website.default_website"/>

But that too doesn't work. I even created the custom ref for the other websites but still, the page remains hidden and cannot be seen on the page with the set field data. It can only be visible when I remove the website_id field.

Here is the full content

<record id="page_solutions" model="website.page">
<field name="name">Solutions</field>
<field name="type">qweb</field>
<field name="url">/solutions</field>

<field name="website_id" ref="website.default_website"/>

<field name="website_indexed" eval="True"/>
<field name="is_published">True</field>
<field name="key">theme_one.page_solutions</field>
<field name="arch" type="xml">
<t name="One Solutions Page" t-name="theme_one.page_solutions">
<t t-call="website.layout">
<section></section>
</t>
</t>
</field>
</record>


Any help or guidance on what to do? It would be preferable to be provided with an example of a non-default website.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 25
76
1
ก.ย. 25
241
3
ก.ย. 25
1975
1
ก.ย. 25
319
Login Website แก้ไขแล้ว
3
ก.ย. 25
146683