Odoo Help

0

0
2 Answers
0
Avatar

samba

--samba--

752
| 5 3 6
Hyderabad, India
--samba--
samba
14/9/15 23:52

Solved this with fuction field in structures. 'chercheurs_id1':fields.function(_get_chercheurs_ids, type='many2many', relation="chercheurs", string="chercheurs"), def _get_chercheurs_ids(self, cr, uid, ids,field_name, arg, context=None): result = {} for record in self.browse(cr, uid, ids, context=context): result[record.id] = [] cr.execute('select chercheurs_id from structures_rel where structures_id=%s'%(record.id,)) res=cr.fetchall() if len(res)>0: result[record.id] = [x[0] for x in res] return result

Ask a Question
Writer
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now