Odoo Help


orm function search other tables

Lakay lakay
on 9/18/14, 4:59 AM 1,083 views

using orm function search how do i search for the field in the other tables. (for example) table res.partner  and field create_id 

   def btnSet(self,cr,uid,ids,values,context=None):            

                search1=self.search(cr,uid,[('create_id','=',1)])             #IS THIS CORRECT? this is just example
                if search1:
                        for id in search1:

                return True


what i mean is that how will this code know that you are referring to res.partner table?







Andreas Stauder
On 9/18/14, 5:35 AM

self.pool.get('res.partner').search(cr, uid, [('create_id','=',1)], context=context)

thanks andreas its working!

Lakay lakay
on 9/22/14, 10:34 PM

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: 9/18/14, 4:59 AM
Seen: 1083 times
Last updated: 3/16/15, 8:10 AM