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

i am not able to get image column using database query 

mthod:

@ api.model 
def _get_report_values ( self , docids , data = None ):
model = self .env.context.get ( 'active_model' )
self ._cr.execute ( "" "select DISTINCT first_name, image_1920,     x_id_number_student, blood_group, birth_date, name from op_student
inner join op_student_course
on op_student.id = op_student_course.student_id
inner join op_course
    on op_course.id = op_student_course.course_id "" " )
docs = self ._cr.fetchall ()
logging.info ("************************************************** 8 " )
logging.info (docs)
 
return { 'doc_ids' : self .ids ,
'doc_model' : model ,
'docs' : docs ,
'data' : data } 
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Dear Paidy,

Try to get value from object. 

<span t-field="doc.image" t-options="{'widget': 'image'}"/>

Regards,

Silvestar


อวตาร
ละทิ้ง
ผู้เขียน

Dear silverstar

I am not returning anything into doc here...

but you will get values in'docs' : docs .

ผู้เขียน

in docs i assigned query data.in docs there is only query fetched data only.can you please tell me how to get image through query.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 25
2596
0
ก.ย. 23
6313
0
พ.ค. 23
2324
3
มี.ค. 25
24052
I can't upload any file in Odoo 13 แก้ไขแล้ว
1
พ.ย. 22
2272