Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
285 มุมมอง

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'

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ต.ค. 16
31286
1
ก.ย. 15
3949
1
มิ.ย. 15
860
0
เม.ย. 15
696
2
เม.ย. 15
882