If you want to make the _sel_ function in OpenERP use below code -
def _sel_func(self, cr, uid, context={}):
obj = self.pool.get(Test.relation.model)
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, [Demo, id], context)
res = [(r[id], r[Demo]) for r in res]
return res
0 Comment(s)