Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Overwriting a method in OCA module.

by
Acsone SA/NV, Laurent Mignon
- 11/09/2015 15:24:17
IMO, we should disallow this kind of 'full' override without call to super. This kind of override breaks the inheritance chains. Since we don't have the control on the order in which the inheritance chain is build by odoo when two modules extends the same one, this kind of override will silently break some functionalities. IMO it's better to make a PR to Odoo to improve the modularity of the method to extend an base the new method on this PR. 

On Fri, Sep 11, 2015 at 1:38 PM, Lionel Sausin <ls@numerigraphe.com> wrote:
If you have no other choice it's better that nothing I guess.
Please take care to clearly indicate why you are doing this in the code 
comments of your module, and explain in the README that your module is 
incompatible with other modules which change the same method.
Ideally, you could also make a PR for Odoo master to add the "hooks" you 
miss, so that in the next version you remove the limitation from your 
module.


_______________________________________________
Mailing-List: http://odoo-community.org/groups/oca-contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe




--
Laurent Mignon
Senior software engineer

Tel: +352 20 21 10 20 32
Fax: +352 20 21 10 21
Email: laurent.mignon@acsone.eu

Acsone SA, Succursale de Luxembourg 
22, Zone Industrielle
​ ​
​| L-8287 Kehlen, Luxembourg
TVA LU24733605
​ | ​RCS B160400​

Acsone sa/nv
Boulevard de la Woluwe 56, b4  Woluwedal
​ | B-1200 Bruxelles - Brussel 
RPM Bruxelles 0835.207.216 RPR Brussel  



Reference