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

Hi please who can explain me

In the new api odoo 8, how can i display recordsets.

In openerp, i did                    field_name.create(cr,uid,value)

In odoo, it will be what please

アバター
破棄
著作者 最善の回答

Thanks a lot for your answer sir.

But i got this error:


File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

TypeError: create() takes at least 4 arguments (2 given)

アバター
破棄

Probably your code is not in new api. You show more code.

著作者

Here is my code services.create(cr,uid,value,context) #This line how it will be changed in #api8 # where services = self.pool.get('test.project.service.line')

最善の回答

In new api create has not changed, except the fact it now returns a recordset  (and is without cr,uid):

https://www.odoo.com/documentation/8.0/reference/orm.html  

self.create({'name': 'New name'}) 
アバター
破棄
関連投稿 返信 ビュー 活動
2
8月 25
2610
1
7月 25
1015
1
8月 25
1151
0
5月 25
1469
2
4月 25
3620