Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3644 Zobrazení

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
Zrušit
Autor Nejlepší odpověď
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
říj 20
3176
0
bře 15
3025
1
bře 15
6158
1
zář 23
1660
1
čvc 19
6724