Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
273 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore Risposta migliore

It doesnt work. I got this

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
4
ott 16
31283
1
set 15
3942
1
giu 15
854
0
apr 15
695
2
apr 15
880