跳至内容
菜单
此问题已终结
1 回复
3671 查看

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
10月 20
3182
0
3月 15
3038
1
3月 15
6163
1
9月 23
1669
1
7月 19
6734