コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
268 ビュー

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
31280
1
9月 15
3942
1
6月 15
854
0
4月 15
695
2
4月 15
879