Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to define the _sel_ function in OpenERP/Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 165
    Comment on it

    If you want to make the _sel_ function in OpenERP use below code -

    1. def _sel_func(self, cr, uid, context={}):
    2. obj = self.pool.get(Test.relation.model)
    3. ids = obj.search(cr, uid, [])
    4. res = obj.read(cr, uid, ids, [Demo, id], context)
    5. res = [(r[id], r[Demo]) for r in res]
    6. return res

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: