This question has been flagged
5932 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)?

Avatar
Discard

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