Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
3905 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Autor Melhor resposta

its work thanks 

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jul. 17
9763
0
ago. 16
3068
1
jul. 16
4965
0
jun. 16
3032
0
ago. 17
3142