Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
10160 Näkymät

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

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

Avatar
Hylkää
Paras vastaus

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
Hylkää
Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
kesäk. 24
6330
2
maalisk. 24
1325
1
jouluk. 22
9018
1
jouluk. 22
4288
2
kesäk. 21
3097