Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
24894 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 25
2633
1
ก.ค. 25
1021
1
ส.ค. 25
1151
0
พ.ค. 25
1481
2
เม.ย. 25
3628