Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
163 Widoki

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
paź 25
50
2
paź 25
235
1
paź 25
218
1
wrz 25
305
3
wrz 25
2024