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.
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.
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
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
1
juil. 17
|
12376 | |||
|
0
août 16
|
4782 | |||
|
1
juil. 16
|
6966 | |||
|
0
juin 16
|
4773 | |||
|
0
août 17
|
4635 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.