İçereği Atla
Menü
Bu soru işaretlendi
103 Görünümler

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.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Eyl 25
74
1
Eyl 25
234
3
Eyl 25
1972
1
Eyl 25
315
Login Website Çözüldü
3
Eyl 25
146628