Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
275 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur Meilleure réponse

It doesnt work. I got this

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

Avatar
Ignorer
Publications associées Réponses Vues Activité
4
oct. 16
31283
1
sept. 15
3943
1
juin 15
854
0
avr. 15
695
2
avr. 15
880