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
3831 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
9647
0
sie 16
2999
1
lip 16
4895
0
cze 16
2950
0
sie 17
3064