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

Hi everyone!

I want to create a get method in order to get all the account voucher for example 

I don't know the syntaxe. Please help

Thanks in advance.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

HI,

Try like this.

get_rec = self.env['model_name'].search([])
#here it returns all records in the model
for rec in get_rec:
     print rec
     #here you can access each records using rec
อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

its work thanks 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Evaluation of python expression แก้ไขแล้ว
1
ก.ค. 17
9827
0
ส.ค. 16
3101
1
ก.ค. 16
5011
0
มิ.ย. 16
3066
0
ส.ค. 17
3158