Odoo Help


AccessError: ('AccessError', "No value found for foo.bar('1',).baz")

on 2/23/15, 12:52 PM 1,558 views

Hi ! I'm on Odoo (v8).

I have two models, declared like this:

class bar(models.Model):
    _name = 'foo.bar'
    _order = 'name'

    name = fields.Char()
    quz = fields.Many2many(comodel_name='foo.quz')

    def get_records(self, bar_id):

        bar_record = self.browse(bar_id)
        return bar_record.quz

class quz(models.Model):
    _name = 'foo.quz'
    _order = 'name'

    name = fields.Char(

Whenever I call the function foo.bar.get_records(1), I get the error I wrote in the title.

Any idea how to solve this ?

Obviously, this is a simplified code, but the real code is not bigger.

I tried self.browse(1).quz, self.env['foo.bar'].browse(1).quz, with no more luck.

The records are in the database, I checked using psql. I really don't know how to access to these records.

I also tried change the name of the relational field. But that doesn't work neither.

Another idea, explanation ?

On 2/24/15, 4:07 AM

You know what, I thing I'm tired. The answer was in the title.

I tried to access a browse record by passing a damned string to it.

The ID was right, but in the wrong format. That helps if you call int(bar_id) first...

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: 2/23/15, 12:52 PM
Seen: 1558 times
Last updated: 3/20/15, 8:07 AM