Odoo Help


Overriding browse errors (Odoo v8)

on 2/9/17, 6:56 AM 185 views

Trying to override browse().

Documentation reading, watching examples. I came to this:

class aTest(models.Model):
     _name = 'a.test'
     _description = 'test'
     name = fields.Char( size=20, required=True, index=True,)
     discr = fields.Char( size=30, required=False, index=True,)
    def browse(self, cr, uid, arg, context=None):          recs = super(aTest, self).browse(cr, uid, arg, context=context)
         if not recs._context.get('skip_update'):
# TypeError: update() takes exactly 2 arguments (1 given)
     return recs

     def browse(self, arg):
# TypeError: 'NoneType' object is not callable
         recs = super(aTest, self).browse(arg)
         if not recs._context.get('skip_update'):
     return recs

Please tell me, what went wrong, fix it.

Please add examples - for odoo writing recently.

The errors I noted in the code comments.

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/9/17, 6:56 AM
Seen: 185 times
Last updated: 2/9/17, 10:23 AM