تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
277 أدوات العرض

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
أكتوبر 16
31283
1
سبتمبر 15
3944
1
يونيو 15
856
0
أبريل 15
695
2
أبريل 15
881