تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
10141 أدوات العرض

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
يونيو 24
6330
2
مارس 24
1324
1
ديسمبر 22
9017
1
ديسمبر 22
4287
2
يونيو 21
3096