Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
6659 Ansichten

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
Verwerfen

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