Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Overwriting a method in OCA module.

by "Kitti U." <kittiu@ecosoft.co.th> - 11/09/2015 11:56:28
Dear Contributors,

(not sure this kind of question should be here, on in PR, please let me know).

Generally, when we develop OCA modules.

In coding, when we inherit a class form Odoo. But found no way to inherit method, super(model, self)._method(), and the only way to do is to Overwrite a method completely. 

For example, in account_voucher.recompute_voucher_lines(). This is a lengthy function which make it difficult to hook it with my code. The only way to do is overwriting it.

Is overwriting a method allowed, or how you guys cope with it when it happen?

Thank you,
--
Mobile: +66-(0)8-1841-7480
Your ERP Partner => www.ecosoft.co.th

Follow-Ups