Frepple integration for Frappe web framework
Frepple Custom App built based on Frepple Advanced Planning and Scheduling software. It was built to integrate with ERPNext, act as a connector (middle station) that allow bidirectional data transfer between Frepple software and ERPNext. It is also used to map the data type between Frepple software and ERPNext since both software do not use the same data structure and format. Refer to the Wiki section in this repository to view the data mapping in this custom app.
- All necessary Frepple software menus for production planning process.
- Import data from ERPNext to Frepple custom app with few clicks.
- Export data from Frepple custom app to Frepple software with few clicks.
- Generate the plan in Frepple custom app itself, with configurable constraints.
- Import manufacturing orders, purchase orders and distribution orders from Frepple software to ERPNext.
- Embed Frepple page into ERPNext user interface using iframe. Access the frepple screens through
Frepple Custom Page
.
- Generate work orders and purchase orders in ERPNext based on the result from Frepple.
- Delete all or selected data from Frepple Custom App with few clicks. This enable an easy way to import new plan elements and results.
- Sync the status of work orders and purchase orders between ERPNext and Frepple.
- Installed Frepple software and successfully launched it on the localhost. Refer to this document for installing Frepple software.
- Installed ERPNext and successfully launched it on the localhost.
There are three main conditions when we come to Frepple custom app installation. These conditions are described as follow:
- If you still have not installed ERPNext in your PC:
- Skip the below installation and refer to this github repository to install ERPNext with Frepple integration app at once.
- If you already have installed ERPNext which has the old version of ERPNext-Frepple integration, you will need to:
- First, update ERPNext files described in section I. Update ERPNext files.
- Second, update Frepple custom app into the new version by following the instruction in section III. Update Frepple custom app.
- If you already have a running instance of ERPNext that does not have the Frepple integrated app, you will need to:
- First, update ERPNext files described in section I. Update ERPNext files.
- Second, install the new Frepple custom app by following the steps illustrated in section II. Install the new Frepple custom app into ERPNext.
This is an important step where some of ERPNext files must be updated to accumodate the new version of Frepple custom app. To uodate these files, follow the instructions below:
-
Create a new folder.
-
Open a Powershell terminal, navigate to the newly created folder.
-
Clone this repo:
git clone https://github.com/msf4-0/ERPNext-Update-Files.git
-
Navigate to the cloned folder:
cd ERPNext-Update-Files
-
Open the following text file Execution_Commands.txt and run all the commands one-by-one to ensure all files are copied into their destination.
-
After all files have been copied, login to <project_name>-erpnext-python-1 container. Use the following command to login into this container as a root user:
docker exec -it --user root <project_name>-erpnext-python-1 /bin/bash
- For example,
docker exec -it --user root project1-erpnext-python-1 /bin/bash
.
-
Once you login in into
<project_name>-erpnext-python-1
container, by default, you will be in~:/home/frappe/frappe-bench/sites
directory. Navigate out to~:/home/frappe/frappe-bench
directory by typing:cd ...
-
Update the new files into the system by running this command:
bench --site <site_name> migrate
- For example,
bench --site custom-erpnext-nginx migrate
.
-
After the process
Compiling Python files...
is finished, you will be back in the~:/home/frappe/frappe-bench
directory. This means thebench migrate
process is completed. To exit from<project_name>-erpnext-python-1
container run:exit
-
Navigate to the bench directory by loging to <project_name>-erpnext-python-1 container. Run the folloing command:
docker exec -it --user root <project_name>-erpnext-python-1 /bin/bash
- For example,
docker exec -it --user root project1-erpnext-python-1 /bin/bash
-
By default, you will be in
~:/home/frappe/frappe-bench/sites
directory. Navigate out to~:/home/frappe/frappe-bench
directory by typing:cd ..
-
Run the following command:
bench get-app frepple https://github.com/msf4-0/ERPNext-Frepple-Enhanced-Integration-Version-1.3.git
-
Install the app onto your site.
bench --site <your.site.name> install-app frepple
- For example,
bench --site custom-erpnext-nginx install-app frepple
-
Run bench start:
bench start
-
Install the backup from the link here.
-
Open a Powershell terminal at the location of the downloaded backup.
-
Run the following command:
docker cp 20231127_141620-mysite_localhost-database.sql.gz <project_name>-erpnext-python-1:/home/frappe/frappe-bench/sites/custom-erpnext-nginx/private/backups
-
Once the process is completed, run the following command:
docker exec -it <project_name>-erpnext-python-1 bash
-
By default, you will be in
~:/home/frappe/frappe-bench/sites
directory. Navigate out to~:/home/frappe/frappe-bench
directory by typing:cd ..
-
Unzip the database file by running the following command:
gunzip sites/custom-erpnext-nginx/private/backups/20231127_141620-mysite_localhost-database.sql.gz
-
After the file is successfully unzipped, run the following command:
bench --site custom-erpnext-nginx restore sites/custom-erpnext-nginx/private/backups/20231127_141620-mysite_localhost-database.sql
- Default password for
MySQL root password
isadmin
- Upon completion, refresh ERPNext.
The following steps are only applicable if you have installed ERPNext with the previous Frepple integrated app. Please skip this section if you already done both, I. Update ERPNext files and II. Install the new Frepple custom app into ERPNext.
-
Create a new folder.
-
Open a Powershell terminal, navigate to the newly created folder.
-
Clone this repo:
git clone https://github.com/msf4-0/ERPNext-Frepple-Enhanced-Integration.git
-
Navigate to the cloned folder:
cd ERPNext-Frepple-Enhanced-Integration
-
Open the following text file Frepple_Execution_Commands.txt and run the two commands one-by-one to ensure both files are copied into their destination.
-
Login to <project_name>-erpnext-python-1 container. Use the following command to login into this container as a root user:
docker exec -it --user root <project_name>-erpnext-python-1 /bin/bash
- For example,
docker exec -it --user root project1-erpnext-python-1 /bin/bash
.
-
Once you login in into
<project_name>-erpnext-python-1
container, by default, you will be in~:/home/frappe/frappe-bench/sites
directory. Navigate out to~:/home/frappe/frappe-bench
directory by typing:cd ...
-
Update the new app into the system by running this command:
bench --site <site_name> migrate
- For example,
bench --site custom-erpnext-nginx migrate
.
-
After the process
Compiling Python files...
is finished, you will be back in the~:/home/frappe/frappe-bench
directory. This means thebench migrate
process is completed. To exit from<project_name>-erpnext-python-1
container run:exit
Before starting using Frepple custom app, you are required to set up certain information to enable the integration between ERPNext and Frepple.
Go to Settings > Frepple Settings
.
- Authentication header:
The Bearer web token key that required for REST API request. The key can be found in
Frepple Software
, underHelp > REST API Help
.
- Username and password:
Username and password of superuser in Frepple. Default username and password are both “admin”. The information can also be found in
Frepple Software
, underAdmin > User
.
- URL:
Web url that the user host the Frepple. The url is used for REST API request Get the wireless router IP address. You can find the Wireless LAN adapter Wi-Fi IPv4 address using
ipconfig
(Window OS) orifconfig
(Linux OS) command in the command prompt. E.g. http://192.168.112.1:5000.
- Frepple Integration:
Checkbox. Tick it to turn on the automatic status syncing for sales order, work order, purchase order status and bin (stock) amount update.
- Secret key:
Key is required for iframe embedded to render the Frepple page. Can be found under
etc/frepple/djangosettings.py
file.
Frepple custom app does not perform any data validation when the data are exported to Frepple software. The user must have basic knowledge of Frepple to ensure the data provided are sufficient to generate the plan in Frepple. A quick debug step is to verify the supply path matches the product structure. Remember to set up item supplier for the raw material.
This software is licensed under the GNU GPLv3 LICENSE © Selangor Human Resource Development Centre. 2021. All Rights Reserved.