Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Odoo <t t-call="website.layout"> qWebException

When I add to my templates I get the following error

QWebException: "'NoneType' object has no attribute 'name'" while evaluating
'res_company.name'

the template code:

<template id="index" >
        <t t-call="website.layout">
            <t t-set="title">Academy</t>
            <div class="oe_structure">
                <div class="container">
                    <ul><t t-foreach="brands" t-as="b">
                        <li><a t-attf-href="/pa/{{b.id}}">
                            <t t-esc="b.name"/>
                        </a></li>
                    </t></ul>
                </div>
            </div>
        </t>
    </template>
like image 784
Mariano DAngelo Avatar asked Dec 19 '22 01:12

Mariano DAngelo


1 Answers

The problem was in the controler, I've to append the website=True

@http.route('/pa/', auth='public', website=True)
like image 190
Mariano DAngelo Avatar answered Dec 22 '22 11:12

Mariano DAngelo