Skip to Content
Menu
This question has been flagged
1 Atsakyti
3773 Rodiniai

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, 

Portretas
Atmesti
Autorius Best Answer
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
spal. 20
3300
0
kov. 15
3117
1
kov. 15
6253
1
rugs. 23
1749
1
liep. 19
6847