Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3 Respostas
24719 Visualizações

How to use hook inside module?

When to use pre, post or uninstall hook inside openerp file?

What is purpose of it?


Thanks

Regards,

Anil Kesariya    


Avatar
Cancelar
Melhor resposta
  1. declare  'post_init_hook': '_my_method' in side __openerp__.py,

  2.  declare def _my_method(cr, registry) in side your __init__.py of  module and put the logic here

 same in case of pre_init_hook


Avatar
Cancelar
Melhor resposta

Explaination not done properly

Avatar
Cancelar
Melhor resposta

The information from the link below answers all your questions: 

https://www.cybrosys.com/blog/how-to-use-hooks-in-odoo-development

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
ago. 25
2252
1
jul. 25
791
1
ago. 25
1150
0
mai. 25
1269
2
abr. 25
3477