Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
10173 Представления

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)

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
июн. 24
6330
2
мар. 24
1325
1
дек. 22
9020
1
дек. 22
4290
2
июн. 21
3099