Odoo Help

0

fields.many2one ('my.model', selection=_selection_function ) Retourn all 'my.model' records

By
samir Guesmi
on 6/13/14, 5:50 AM 714 views

Hi guys, 

I am  trying to filter the list of my many2one field

 

def _selection_function(self, cr, uid, context=None):

vals = []

<some condition >

record = id,name
vals.append(record)

return vals

fields.many2one('my.model', 'Field Name', selection=_selection_function )

But in the browser , still display all record of my model, 

0

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

Question tools

2 follower(s)

Stats

Asked: 6/13/14, 5:50 AM
Seen: 714 times
Last updated: 3/16/15, 8:10 AM