Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
10251 Visninger

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

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

Avatar
Kassér
Bedste svar

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
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
jun. 24
6330
2
mar. 24
1361
1
dec. 22
9063
1
dec. 22
4387
2
jun. 21
3137