Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: How to write hook addon properly.
by
        
            ForgeFlow, S.L., Jordi Ballester Alomar
        
        
        
    
        
        Hi Kittj,
You do this to respect the inheritance chain. Just overriding the method will kill it.
El jue., 7 mar. 2019 4:52, Kitti Upariphutthiphong <kittiu@ecosoft.co.th> escribió:
Dear allI am looking for the right way to write a hook addon when working with OCA modules.I found the sample from Eficent in https://github.com/OCA/sale-workflow/tree/11.0/sale_order_action_invoice_create_hookI see that, it is doing things like this in hooks.py
def post_load_hook(): def new_action_invoice_create(self, grouped=False, final=False): if not hasattr(self, '_get_invoice_group_key'): return self.action_invoice_create_original(grouped=grouped, final=final) _______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
- 
                How to write hook addon properly.byEcosoft Co. Ltd., Kitti Upariphutthiphong- 07/03/2019 04:46:19 - 0- 
                Re: How to write hook addon properly.by Richard deMeester <richard.demeester@willdooit.com> - 11/03/2019 23:48:36 - 0
- 
                Re: How to write hook addon properly.byEcosoft Co. Ltd., Kitti Upariphutthiphong- 08/03/2019 09:37:15 - 0
- 
                Re: How to write hook addon properly.byHunki Enterprises B.V., Holger Brunn- 08/03/2019 07:26:10 - 1
- 
                Re: How to write hook addon properly.byEcosoft Co. Ltd., Kitti Upariphutthiphong- 08/03/2019 02:33:50 - 2
- 
                Re: How to write hook addon properly.by Richard deMeester <richard.demeester@willdooit.com> - 07/03/2019 23:44:59 - 2
- 
                Re: How to write hook addon properly.byEcosoft Co. Ltd., Kitti Upariphutthiphong- 07/03/2019 08:55:39 - 0
- 
                Re: How to write hook addon properly.byForgeFlow, S.L., Jordi Ballester Alomar- 07/03/2019 05:31:18 - 0
 
-