콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
6780 화면

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