Skip to Content
Menu
This question has been flagged
936 Views

Hello everyone,
First of all, I warn that I am new to odoo. I'm on Odoo14.
Then I want to load a particular scss form on my website module. I noticed that in the module's Page model, there was a function called is_homepage. I want to use it but it gives me this error :


500: Internal Server Error
QWeb
Error Message :
Error to render compiling AST
AttributeError: 'NoneType' object has no attribute 'page'
Template: web.assets_frontend
Path: /t/link[44]
Node:

From what I understand, this must not be the right way to access the Page model. How to do otherwise?
Thanks in advance to all those who will take the time to answer

Have a good day,

Lucas


PS : That's my code,


template id="assets_frontend" name="My style" inherit_id="website.assets_frontend">
    xpath expr="link[last()]" position="after">
        link t-if="website.page.is_homepage" rel="stylesheet" type="text/scss" href="/theme_scm/static/scss/style-logiciels.scss"/>
    /xpath>
/template>



Avatar
Discard