Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
10135 Lượt xem

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

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 6 24
6330
2
thg 3 24
1324
1
thg 12 22
9017
1
thg 12 22
4287
2
thg 6 21
3096