Skip to main content

Posts

Frappe ERPNext installation on new system

Step:1 sudo apt update sudo apt -y upgrade sudo apt autoremove Step:2 Install python 3.7 sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.7 Step:3 Install Dependency sudo apt-get install -y python3-testresources Step: 4 Install Python pip Tool wget https://bootstrap.pypa.io/get-pip.py sudo python3 get-pip.py sudo pip3 install --upgrade pip3 setuptools [ Alternative - Execute if the command above fails. 1) curl https://bootstrap.pypa.io/get-pip.py | python3 2) pip install --upgrade setuptools ] sudo pip3 install ansible Step:5 Install curl and yarn sudo apt -y install curl curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt -y update && sudo apt -y install yarn Step: 6 Install MariaDB 10.4 sudo apt-get install software-properties-common sudo apt-key adv --recv-keys
Recent posts

MySQL Installation Guide for Frappe Users

If Installation on new machine sudo apt-get install software-properties-common  sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu xenial main' sudo apt-get install mariadb-server-10.2 mariadb-client-10.2 -y sudo service mysql status Check if you are getting error  loading MySQL sudo mysqld --tc-heuristic-recover=ROLLBACK sudo service mysql restart sudo mysqld_safe --tc-heuristic-recover=COMMIT mysql -uroot -proot if you are able to login to mariadb then your database is working If Installing on the machine with previously installed MySQL sudo apt-get remove --purge mysql* sudo apt-get remove --purge mysql sudo apt-get remove --purge mariadb sudo apt-get remove --purge mariadb* sudo apt-get --purge remove mariadb-server sudo apt-get --purge remove python-software-properties sudo apt-get autoremove sudo apt-get autoclean

Filters on Page in Frappe

To add filters on the Page. Methods used for adding filters on the page make_control Suppose you want to create new filter, which is select record from doctype Project. We can add options for the filter like shown in below picture. List of options used for filter Label: Label for your filter field type:  you can add any field type present in the specified doctype options: for field type "Link" you need to select doctype name                         

Creating a Page in Frappe

The following are the steps to create a page for any dashboard or Customized report. When you create a page we will see js file created in the page directory  You can continue with the same structure on this page, but I suggest you use the extended class to improve the reusability of the code. As shown in the picture below, you can extend a frappe class. In the above picture, you can see the init function is the constructor of the class. Where you can render the HTML template to the page. Related Topics Filters on the page. https://erpnexttutor.blogspot.com/2020/10/filters-on-page-in-frappe.html?m=1

Frappe ERPNext version 12 setup- master branch

Frappe- ERPNext setup version 12 Setup for v 12 and master branch   mkdir  ‘Projectname’  cd  ‘Projectname’  virtualenv .  source ./bin/activate  git clone -b master https://github.com/frappe/bench.git bench-repo  pip install -e bench-repo  bench init --frappe-branch version-12 --frappe-path https://github.com/frappe/frappe.git frappe-bench cd frappe-bench source ../bin/activate bench get-app --branch version-12 erpnext https://github.com/frappe/erpnext.git bench new-app (custom app) bench new-site (sitename) bench install-app erpnext bench install-app (custom app) #install erpnext

Rest API in Frappe

 Rest API in Frappe: You can use a browser or postman to hit API  Predefined APIs in Frappe: Create :(POST) To create any document with post request  e.g.  Localhost:8000 /api/resource/{doctype}  Read(GET): To get any document related to the mentioned doctype we can use the GET method followed by the document name. E.g. localhost:8000 /api/resource/{doctype}/{name} Update(PUT): To create/update any document with specific name or required field  name to be changed values. localhost:8000 /api/resource/{doctype}/{name}   Delete Custom APIs: With custom API we can create APIs which are not pre-defined. We can create all-new APIs or we can use resource APIs to generate different output or                                         manipulate the output as per the required format. localhost:8000/api/method/{dotted path to the API starting from the second folder  in application folder with application name} E.

Setup for Local ERPNext Project

Setup for Local ERPNext project : 1) Create another folder for project  for ex gilton inside workspace and on terminal go to the path till gilton E.g. mkdir gilton && cd ~/workspace/gilton 2) Create virtual environment  - virtualenv . 3) Activate the virtual environment :   source ./bin/activate 4) Install Bench :  a) git clone https://github.com/frappe/bench bench-repo b) pip install -e bench-repo 5) Create a new bench from master - from git(master branch) - bench init --frappe-branch master --frappe-path https://github.com/frappe/frappe.git frappe-bench or from local of another system- bench init --frappe-path user@192.168.5.24:/home/user/workspace/v8/frappe-bench/apps/frappe  frappe-bench