Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
10172 Ansichten

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

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

Avatar
Verwerfen
Beste Antwort

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.

Avatar
Verwerfen
Beste Antwort

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)

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juni 24
6330
2
März 24
1325
1
Dez. 22
9020
1
Dez. 22
4288
2
Juni 21
3098