跳至内容
菜单
此问题已终结
1 回复
5131 查看

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)
形象
丢弃
相关帖文 回复 查看 活动
1
1月 22
3812
1
11月 15
6097
0
11月 15
13
3
9月 22
13638
5
3月 20
11567