Insert Item group after install

Continuing the discussion from I need to export Item Group Tree:

After hook redirect to my function after install my app, how to insert into table item group from server side. Beside do an sql insert is another correct way to do it?


Maybe you can use fixtures (data in csv/json in your app). They load automatically when your app installs.


I add in apps this:

fixtures = [
    "Item Group"


I export fixtures and it shown in csv file. At first it seems to work but i will install tomorrow to see if it really works.


@luisfmfernandes did it work?
Is this the right way to do it? or now is there any new methods to do this?

@JayRam how to insert the custom entries in the field while app installation using

can you clear me , how does the custom app file realates with erpnext app,
I need insert the entry in the select datatype in a doctype when the app installed