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

Hello all, 

I just want to override completely the create method of pos_session class in my custom module.

But because the original create method use return super(), I don't manage it. My new create method always return and use the old one because of the super.

I don't want to use the original create method anymore.

Here is a part of my override code :

class pos_session(osv.osv):
    _inherit = 'pos.session'
    def create(self, cr, uid, values, context=None):
     [...]
        
        res = super(pos_session, self).create(cr, uid, values, context=context) 
        return res


Thanks to help

Аватар
Отменить
Автор Лучший ответ

I think this line will do the job instead :

res = osv.osv.create(self, cr, uid, values, context=context)
Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
янв. 22
3821
1
нояб. 15
6113
0
нояб. 15
13
3
сент. 22
13649
5
мар. 20
11577