Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Overwriting a method in OCA module.
by
Open Architects Consulting, Houssine BAKKALI
as far as you doesn't break the inheritance mechanism it's ok. You just have to be sure that the method that you're overwriting doesn't call a super method doing some business logic. In that case overwriting become tricky...
2015-09-11 12:08 GMT+02:00 Kitti U. <kittiu@ecosoft.co.th>:
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-7480Your ERP Partner => www.ecosoft.co.th_______________________________________________
Mailing-List: http://odoo-community.org/groups/oca-contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe
Reference
-
Overwriting a method in OCA module.
by "Kitti U." <kittiu@ecosoft.co.th> - 11/09/2015 11:56:28 - 0-
Re: Overwriting a method in OCA module.
byEcosoft Co. Ltd., Kitti Upariphutthiphong -
Re: Overwriting a method in OCA module.
byEcosoft Co. Ltd., Kitti Upariphutthiphong -
Re: Overwriting a method in OCA module.
by "Kitti U." <kittiu@ecosoft.co.th> - 16/09/2015 14:44:11 - 0