In this Blog, we will see the app creation and app installation process in ERPNext and how to install a new app in ERPNext from Github.
We are going to create a new app here named library_management. We use bench commands to perform all the operations regarding the new app.
bench new-app library_management
(The above command will create all the necessary files for the app)
App Directory Structure:-
apps/library_management ├── MANIFEST.in ├── README.md ├── library_management │ ├── hooks.py │ ├── library_management │ │ └── __init__.py │ ├── modules.txt │ ├── patches.txt │ ├── public │ │ ├── css │ │ └── js │ ├── templates │ │ ├── __init__.py │ │ ├── includes │ │ └── pages │ │ └── __init__.py │ └── www ├── requirements.txt └── setup.py
Description of all directories and files:-
- library_management:- This directory will contain all the source code for your app
- public:- It is a static folder and served by Nginx in production
- templates:- Jinja templates used to render web views
- www:- Web pages that are served based on their directory path
- library_management:- Default Module bootstrapped with app
- modules.txt:- List of modules defined in the app
- patches.txt:- Patch entries for database migrations
- hooks.py:- Hooks used to extend or inherit standard functionality provided by the framework
- requirements.txt:- It contains a list of Python packages required by the app to work properly.
App Installation on a specific site:-
In order to use the above-created app, we must have to install it on our site.
The below bench command will install the app.
bench --site site_name install-app library_management
The below command will list all the installed apps on a site.
bench --site site_name list-apps
Installing an app from the GitHub repository
If we have an app created and hosted on GitHub then we can get it and install.
Use the below commands to get the app and then install it.
bench get-app --branch main https://github.com/library/library_management.git bench --site site_name install-app library_management
NEED HELP?
Hope you find the guide helpful! Please feel free to share your feedback in the comments below.
If you still have any issues/queries regarding the App installation process in ERPNext, please raise a ticket at https://webkul.uvdesk.com/en/customer/create-ticket/.
Also, please explore our Odoo development services & an extensive range of quality Odoo Apps.
For any doubt, contact us at [email protected].
Thanks for paying attention!!
Be the first to comment.