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.


Problem when i'm overriding an inherited method (Odoo9)

on 3/1/16, 4:10 AM 375 views

Hi, in my file purchase.py :

class purchase_order(models.Model):

_inherit = 'purchase.order'

I have this method :


def check_po(self):


And i want to override the inherited method "button_confirm" to do the check_po method from below. So just after check_po, in the same file, i do :


def button_confirm(self):


return super(purchase_order, self)

But when i choose a Purchase (Request for quotation) and i click on the "CONFIRM ORDER" button, nothing happen.

It doesn't even confirm the purchase and i suppose it doesn't do the "check_po".

Thank you in advance.

On 3/1/16, 4:25 AM

Try below one,


def button_confirm(self):


return super(purchase_order, self)

Don't works :/

on 3/1/16, 4:31 AM

It's working to me.

on 3/1/16, 4:46 AM

Should work fine. A neat pick: you should add self.ensure_one() in there.

on 3/1/16, 5:42 AM

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: 3/1/16, 4:10 AM
Seen: 375 times
Last updated: 9/20/16, 7:57 AM