Odoo Help


qweb Exception

Mariano DAngelo
on 8/18/15, 11:09 AM 2,165 views

When I add website.layout to my templates I get the following error

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

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"/>
from openerp import fields, models

class Brand(models.Model):
_name = 'product_application.brand'

name = fields.Char()
models_ids = fields.One2many('product_application.model', 'brand_id', string="Models")

class Model(models.Model):
_name = 'product_application.model'

name = fields.Char()
brand_id = fields.Many2one('product_application.brand', string="Brand")
versions_ids = fields.One2many('product_application.version', 'model_id', string="Versions")

class Version(models.Model):

name = fields.Char()
model_id = fields.Many2one('product_application.model',string="Model")

Here res_company is object of the res.company model. But, any how it is not set inside your template. There are so many reasons that res_company having "none" i.e. access rights issue, dependancy issue etc... Can you explain more on your error ? Thanks.

Emipro Technologies Pvt. Ltd.
on 8/19/15, 1:50 AM

I can't explain more the error becouse I'm new in odoo, what do you need to debug? I don't put any reference to company object, why is asking for it?

Mariano DAngelo
on 8/19/15, 2:00 AM
Mariano DAngelo
On 8/23/15, 12:03 PM

fter lot of reading I discover that controler need website = True

class product_application(http.Controller):

@http.route('/pa/', auth='public', website=True)

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/18/15, 11:09 AM
Seen: 2165 times
Last updated: 12/27/17, 4:04 PM