Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4368 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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
Awatar
Odrzuć
Autor Najlepsza odpowiedź

its work thanks 

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 17
10398
0
sie 16
3493
1
lip 16
5479
0
cze 16
3479
0
sie 17
3444