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

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
31292
1
9月 15
3952
1
6月 15
865
0
4月 15
701
2
4月 15
887