Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odgovori
24748 Prikazi

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
Opusti
Best Answer
  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
Opusti
Best Answer

Explaination not done properly

Avatar
Opusti
Best Answer

The information from the link below answers all your questions: 

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
avg. 25
2306
1
jul. 25
829
1
avg. 25
1150
0
maj 25
1280
2
apr. 25
3492