Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5152 Zobrazení

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

Avatar
Zrušit
Autor Nejlepší odpověď

I think this line will do the job instead :

res = osv.osv.create(self, cr, uid, values, context=context)
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
led 22
3820
1
lis 15
6105
0
lis 15
13
3
zář 22
13647
5
bře 20
11575