POS Awesome is an open-source Point of Sale for ERPNext using Vue.js and Vuetify. This video demonstrates how to install POS Awesome on ERPNext or Frappe instance.
karani
karani
CEO and Founder of Upeosoft Limited || Software Engineer || Technology Evangelist || Data Science & ML Enthusiast
Good software design will emphasize the importance of separating the database from the software application. The server where the database is hosted needs an extra layer of protection as it contains all the data. This is sometimes known as remote database setup. This can also be achieved in ERPNext and the Frappe Framework.
In this article I will demonstrate to you how this can be achieved with simple steps.
Setup the remote DB to accept remote connections
After you have installed your database in the remote server (You may use the script provided on my GitHub repository), you will need to set it up to allow remote connections by doing the following:
Edit MariaDB configuration file to accept remote connections by changing its bind-address from 127.0.0.1 to 0.0.0.0
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Login to your MySQL and create a database user that Frappe will use to authenticate.
CREATE USER 'root'@'[IP ADDRESS FOR ERPNext HOST]' IDENTIFIED BY '[YOUR PASSWORD OF CHOICE]';
Grant the created root user permissions to make changes to the created databases.
GRANT ALL PRIVILEGES ON *.* TO 'root'@'[IP ADDRESS FOR ERPNext HOST]' IDENTIFIED BY 'YOUR PASSWORD OF CHOICE' WITH GRANT OPTION;
Flush the privileges to effect changes to the database and log out from MySQL.
FLUSH PRIVILEGES;
EXIT;
Restart MySQL server to effect all the made changes.
sudo service mysql restart
Test the connection using the below command:
mysql -u root -h [IP ADDRESS FOR DATABASE HOST] -p
If the request doesn’t go through, you may need to ensure that there is no firewall that blocks connections to TCP port 3306 of the MySQL server. We use the below command to allow an IP address on Ubuntu servers:
ufw allow from [IP ADDRESS FOR ERPNext HOST] to any port 3306
Setup your ERPNext or Frappe Framework Installation to connect to your remote Database
bench set-mariadb-host [IP ADDRESS FOR DATABASE HOST]
Restart supervisor if your instance is in production mode
supervisorctl restart all
If your instance is in development mode, restart bench
bench restart
At this point you may decide to test the connection or dive in and create a new site. The database that Frappe will create will be in the server you just set up 🙂
bench new-site erp.upeosoft.com --mariadb-root-password [YOUR PASSWORD OF CHOICE]
Process manufacturing is a type of production method that produces finished goods by combining ingredients or raw materials using a specific formula. ERPNext is not any less when handling process manufacturing. All that needs to be done is to get the settings right.
The settings that need to be done right are:
Routes: These refer to the path the process of manufacturing a specific commodity follows
Operations: These are specific activities that are carried out to produce some item
Workstation: These are in most cases rooms where these operations take place.
Items: These can be raw materials, bought or manufactured in a different process, or finished goods from the manufacturing activities. They can also sometimes be sub-assemblies.
Bill of Materials: These are the carriers of the formulae. All the formulae for each operation are contained in the bill of materials.
Sometimes, even after a successful installation of ERPNext, the instance won’t load on the browser. The instance starts well on the terminal but on accessing the browser, you get a message that the address 127.0.0.1 is not found.
The problem most of the time is a missing currentsite.txt file. This blog post will help you resolve this issue.
For those who want to go the quick way, you can achieve this by running the following bench command:
bench use [your-site]
You can also add your site to the hosts file using the below command:
bench --site [your-site] add-to-hosts
After that, you can access your site using the name of your site on local, other than the IP address as follows:
[your-site]:[port-number]
This script automates all the steps needed to have ERPNext properly installed and running on Ubuntu 20.04. The script automates the following:
- Setting up default settings
- Checking necessary configuration before install starts
- Updating the System
- Updating the Server timezone
- Install required tools
- Make alias for Python and Pip
- Upgrading Pip
- Installing NodeJS, Redis and Yarn
- Starting the Redis Server
- Installing Nginx and MariaDB
- Setting Database Configuration to work with ERPNext and Frappe
- Securing the Database
- Creating a bench user, assigning them appropriate rights and add the user to sudoers group
- Installing bench
- Installing Frappe
- Changing Supervisor Owner
- Enabling Site-based Multi-tenancy
- Downloading the right version of ERPNext from ERPNext GitHub repo
- Creating a Site
- Restarting Nginx and Supervisor Services
Copy file from Local to Remote
scp -r /local/directory remote_username@100.100.0.10:/remote/directory
Warning: Remote host Identification has Changed
ssh-keygen -R "you server hostname or ip"
Note: Please remove the script from the server once install is complete.
Download the script from this link.
Setting up a company in ERPNext or the Frappe Framework is relatively easy. However, setting up multi-company in ERPNext and restricting user access to specific companies can prove otherwise. In this tutorial, we will explore how to set up multi-company in ERPNext and/or the Frappe Framework.
The types of multi-company we can set up in ERPNext are:
- Sister Companies
- These are companies that are on the same level. We can also refer to these companies as parallel companies.
- Parent-Child Companies
- This is a setup where a company has other smaller companies operating under it.
- Combination of Sister companies and Parent-child Companies
- We can also have a combination of these two, where maybe we have more than one parent companies that are on the same level, and also each of them has other companies operating under them.
Below are the topics we will cover:
- Setting up a company
- Setting up a group company. This will allow us to add other companies under it. These are the child companies.
- Creating a user, user permissions and assigning the set permissions to the user. This is to give or limit access to the user.
- Restricting a user to the companies you like them to access
When working with child tables in the Frappe Framework or ERPNext, some functionalities that work out of the box with other DocTypes that aren’t child tables may prove to be a pain. In this tutorial, I will quickly brush through the following:
- How to listen to the add-row event in a child table
- How to assign a value to a field in a child table on adding a new row
- How to assign a value to a field in a child table on changing another field in the same child table
LISTENING TO THE ADD-ROW EVENT
frappe.ui.form.on('Article Details', { form_render: function(frm,cdt,cdn) { let item = locals[cdt][cdn]; let articleId = Math.round(+new Date()/1000); item.article_id = articleId; frm.refresh_field('my_article'); }, });
LISTENING TO A CHANGE IN ANOTHER FIELD IN THE SAME CHILD TABLE
frappe.ui.form.on("Article Details", "article_name", function(frm, cdt, cdn) { let item = locals[cdt][cdn]; let articleId = Math.round(+new Date()/1000); item.article_id = articleId; frm.refresh_field('my_article'); }); Notice the presence of cdt and cdn in both functions . That means that child doctype and child docname are passed to function and hence you can know what row was modified and triggered. locals is a global array that contains all the local documents opened by the user item is the row that the user is working with
Coding is running the world today. Surprisingly, a vast majority of people aren’t even aware of its existence, let alone what it even is, despite the fact that coding is vital for most of the contemporary businesses. That’s why those who choose to learn to code are in high demand for employers.
Before we start digging deeper, I want you to try to answer the question, “What is coding?”
Here is a simple experiment for you. Right-click somewhere on this page and click on View page source. Scroll down on the window that appeared and see whether you understand anything.
What you were looking at is the code behind this webpage, or the document object model (DOM). If you have learned at least the basics HTML, CSS or JavaScript, it might be easier to spot some familiar tags and elements. If you didn’t understand anything, worry not; you can learn everything at SAID Academy.
Now, in simple terms, let’s define coding as the basic act of writing – in a programming language, coding is the writing of – a script that a computer can understand. This script will tell the computer to behave in a certain way, to do a certain thing, and to, ultimately, perform the actions that you want it to.
Computers don’t understand human language. In order for us to communicate to our computers, we have to give computers instructions in a way that they will understand.
This is where anyone who wants to understand how to code needs to learn coding, or software development, or programming.