跳至內容
選單
此問題已被標幟
1 回覆
3681 瀏覽次數

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
3203
0
3月 15
3044
1
3月 15
6173
1
9月 23
1684
1
7月 19
6747