Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
6852 Представления

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