Skip to Content
Menú
This question has been flagged
1 Respondre
3618 Vistes

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
Descartar
Autor Best Answer
Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
d’oct. 20
3167
0
de març 15
3008
1
de març 15
6140
1
de set. 23
1653
1
de jul. 19
6701