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>
The problem was in the controler, I've to append the website=True
@http.route('/pa/', auth='public', website=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With