I get Errors when copying same code from v16 to V17 any know how to set this up?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
1
Reply
3354
Views
Hi,
Here's an example of how you can set up a post_init_hook in Odoo 17
In init.py
def create_employees(env):
env['company.employee'].create({
'name': 'ABC',
'phone': '+7865 6675 2341',
'email': 'abc123@gmail.com'
})
and in the manifest:
'post_init_hook': 'create_employees',
Hope it helps
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up