Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
10167 Weergaven

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

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

Avatar
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jun. 24
6330
2
mrt. 24
1325
1
dec. 22
9018
1
dec. 22
4288
2
jun. 21
3098