Skip to Content
Menu
This question has been flagged
2 Replies
4043 Zobrazenia

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
Zrušiť
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
Zrušiť
Autor Best Answer

its work thanks 

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
júl 17
9953
0
aug 16
3156
1
júl 16
5090
0
jún 16
3146
0
aug 17
3217