تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
24764 أدوات العرض

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    


الصورة الرمزية
إهمال
أفضل إجابة
  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


الصورة الرمزية
إهمال
أفضل إجابة

Explaination not done properly

الصورة الرمزية
إهمال
أفضل إجابة

The information from the link below answers all your questions: 

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 25
2340
1
يوليو 25
857
1
أغسطس 25
1150
0
مايو 25
1316
2
أبريل 25
3511