Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3835 Prikazi

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, 

Avatar
Opusti
Avtor Best Answer
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
okt. 20
3335
0
mar. 15
3174
1
mar. 15
6299
1
sep. 23
1774
1
jul. 19
6951