Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Python "super" - function does not work

on 9/27/16, 4:02 PM 141 views


I have a simple coding question. I am inheriting from a model pos.order. I want to execute a simple function from that model and then modify it, but it doesn't work. This is how I made it:

class pos_order(osv.osv):
    _inherit = 'pos.order'
_name = 'pos.order'
def create_picking(self):
        return super(pos_order, self).create_picking() 

I don't know why the super function does not work. I already confirmed that code in that file will be executed, but in that case "super" does not work. No idea what I am doing wrong. 

Any ideas?


Bejaoui Souheil

--Bejaoui Souheil--
| 2 1 4
Sousse, Tunisia
--Bejaoui Souheil--

Odoo developer,  functional and technical consultant


Bejaoui Souheil
On 9/28/16, 3:49 AM


Check the dependency set on __openerp__.py.

Your module must depend from the point_of_sale module.

Best regards.

Diego Vázquez
On 9/28/16, 7:14 AM

You're inheriting class with old api (osv.osv), but declare method with new api, passing only self argument. Try to pass all arguments:

def create_picking(self, cr, uid, ids, context=None):


     return super(pos_order, self).create_picking(cr, uid, ids, context=context)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 9/27/16, 4:02 PM
Seen: 141 times
Last updated: 9/28/16, 7:14 AM