Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
288 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Autor Nejlepší odpověď

It doesnt work. I got this

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
říj 16
31286
1
zář 15
3949
1
čvn 15
863
0
dub 15
696
2
dub 15
883