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

In v13, I find odoo removed @api.model_cr.

Is there any alternative decorator for @api.model_cr. ?

形象
丢弃
最佳答案

Hello,

Now in v13, the code includes all the decorators
@api.model_cr,
@api.cr,
@api.one,
@api.returns,
@api.multi
are multi-record by default.

Thank you.

形象
丢弃
最佳答案

It has been deprecated in V13 By the way why/where you need it? 
All the call ORM methods like def init, def register_hook now call without a decorator and if you need db cursor in your method then you can get it from the environment (self.env.cr)

形象
丢弃
相关帖文 回复 查看 活动
2
6月 24
6330
2
3月 24
1359
1
12月 22
9051
1
12月 22
4367
2
6月 21
3133