I have been working on developing a module in OpenERP 7.0. I have been using Python and the Eclipse IDE for development. I wanted to know the difference between self.browse()
and self.pool.get()
in OpenERP development.
Thanks.
To access a record by id you need you use ORM's browse method
def some_moethod(self, cr, uid, ids):
self.browse(cr, uid, ids) // same class
do_some_Stuff
return something
You can use when you are writing a method in same class whose records you want browse but if you want browse records from another class, In this case first you need to create instance of that class using self.pool.get('another.class') then you can browse on it
eg :
def some_moethod(self, cr, uid, ids):
self.pool.get('another.class').browse(cr, uid, ids)
do_some_Stuff
return something
`
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