Odoo Help


Replace python function with custom module

on 2/22/16, 9:33 AM 853 views

I want to make a change to a python function in odoo-server/addons/website_sale/models/payment.py:

def form_feedback(self, cr, uid, data, acquirer_name, context=None):
     ** MY CODE **
     return res

How can I replace the function with my code in a custom module without changing in Odoo code itself (upgrade safe)?

not "replace" but "override" it, you'll need to *override* it from your module. Inherit the model, containint this function and in the inherited class you'll be able to do so. see documentation for inheritance

on 2/23/16, 5:51 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/22/16, 9:33 AM
Seen: 853 times
Last updated: 2/22/16, 9:36 AM