跳至内容
菜单
此问题已终结
2 回复
3972 查看

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
9841
0
8月 16
3105
1
7月 16
5022
0
6月 16
3072
0
8月 17
3161