Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
3916 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur Meilleure réponse

its work thanks 

Avatar
Ignorer
Publications associées Réponses Vues Activité
1
juil. 17
9776
0
août 16
3076
1
juil. 16
4969
0
juin 16
3039
0
août 17
3145