コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3944 ビュー

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
アバター
破棄
著作者 最善の回答

its work thanks 

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 17
9808
0
8月 16
3094
1
7月 16
4997
0
6月 16
3062
0
8月 17
3155