Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5149 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I think this line will do the job instead :

res = osv.osv.create(self, cr, uid, values, context=context)
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 22
3819
1
thg 11 15
6100
0
thg 11 15
13
3
thg 9 22
13647
5
thg 3 20
11574