Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
5134 Weergaven

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
Annuleer
Auteur Beste antwoord

I think this line will do the job instead :

res = osv.osv.create(self, cr, uid, values, context=context)
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jan. 22
3814
1
nov. 15
6098
0
nov. 15
13
3
sep. 22
13639
5
mrt. 20
11568