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

Hi!!!

Please i want to get a field from a table and i have tried this but it doesnt work. Please help me:

code:


def _get_numbers(self, cr, uid, ids, field_name, arg, context=None):

res = {}

for record in self.browse(cr, uid, ids, context=context):

res[record.id] = record.employee_id

return res

頭像
捨棄
最佳答案

Guess you are getting an error because you are trying to pass the browse record, instead of just ID ..

Try this way

res[record.id] = record.employee_id.id

頭像
捨棄
作者 最佳答案

It doesnt work. I got this

Error: AttributeError: 'NoneType' object has no attribute 'browse'

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
10月 16
31293
1
9月 15
3952
1
6月 15
867
0
4月 15
701
2
4月 15
888