How to Use Pre Init hook in Odoo 17 -Odoo 17 Slides

CelineGeorge1 529 views 6 slides Jul 15, 2024
Slide 1
Slide 1 of 6
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6

About This Presentation

In Odoo, Hooks are Python methods or functions that are invoked at specific points during the execution of Odoo's processing cycle. The pre-init hook is a method provided by the Odoo framework to execute custom code before the initialization of the module's data. ie, it works before the mod...


Slide Content

How to Use Pre Init hook in Odoo 17 Enterprise

Introduction Enterpr ise In Odoo, Hooks are Python methods or functions that are invoked at specific points during the execution of Odoo's processing cycle. The pre-init hook is a method provided by the Odoo framework to execute custom code before the initialization of the module's data. i e, it works before the module installation.

Enterprise First we can define function in the __init__ file of the module.

Enterprise The next step is to register the hook inside the __manifest__ file.

Enterprise This is ex ecuted before the module installation. This updates all the records in the res.partner where the mobile is empty with the value we provided.

For More Info. Check our company website for related blogs and Odoo book. Check our YouTube channel for functional and technical videos in Odoo. Enterprise www.cybrosys.com