Skip to Content
मेन्यू
This question has been flagged
2 Replies
4028 Views

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.

Avatar
Discard
Best Answer

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
Avatar
Discard
Author Best Answer

its work thanks 

Avatar
Discard
Related Posts Replies Views Activity
1
जुल॰ 17
9931
0
अग॰ 16
3144
1
जुल॰ 16
5079
0
जून 16
3143
0
अग॰ 17
3213