Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
269 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

It doesnt work. I got this

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
4
paź 16
31280
1
wrz 15
3942
1
cze 15
854
0
kwi 15
695
2
kwi 15
879