Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
24774 Vizualizări

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    


Imagine profil
Abandonează
Cel mai bun răspuns
  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


Imagine profil
Abandonează
Cel mai bun răspuns

Explaination not done properly

Imagine profil
Abandonează
Cel mai bun răspuns

The information from the link below answers all your questions: 

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
aug. 25
2344
1
iul. 25
862
1
aug. 25
1150
0
mai 25
1321
2
apr. 25
3521