跳至內容
選單
此問題已被標幟
2 回覆
3931 瀏覽次數

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
9788
0
8月 16
3084
1
7月 16
4977
0
6月 16
3050
0
8月 17
3150