Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
10220 มุมมอง

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)

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มิ.ย. 24
6330
2
มี.ค. 24
1351
1
ธ.ค. 22
9044
1
ธ.ค. 22
4353
2
มิ.ย. 21
3123