How to make a custom app install it's required roles when installing

I want a certain user roles to be created when the app is installed. how can i do that

Hello @DineshLiyanage,
Have a look at Fixtures under hooks in frappe documentation. For example, see the fixture in gameplan app here.

Also have a look at install.py in LMS app. You can see custom roles needed for LMS being created at the time of setup and deleted at the time of uninstallation of the app.

lms/install.py at main · frappe/lms · GitHub (here)

@esafwan Got it. thank you very much

1 Like