Thursday, May 7, 2020

Patch to add custom field in User module

from __future__ import unicode_literals
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields

def execute():
        make_custom_fields()

def make_custom_fields():
        user_fields = [
                dict(   fieldname='prefix',
                        label='Prefix',
                        fieldtype='Select', options=' \nKSA-\nUAE-\nEGYPT-\nQATAR-\nGCC-\nEGP-',
                        insert_after='full_name'
                )
        ]

        custom_fields = {
                "User":user_fields
        }
        create_custom_fields(custom_fields)

Thursday, September 1, 2016

How to install frappe and erpnext by version ?

Install per-requirements. https://frappe.github.io/frappe/user/en/bench/guides/manual-setup.html2
Clone bench of v3.x and install bench using 'sudo pip install -e bench-repo'
then run following commands, hope it will helpful

bench init frappe-bench-v6 --frappe-branch v6.x.x bench get-app --branch v6.x.x erpnext https://github.com/frappe/erpnext bench new-site site_name
bench --site site_name install-app erpnext

How to install frappe and erpnext by version ?

Install per-requirements. https://frappe.github.io/frappe/user/en/bench/guides/manual-setup.html2
Clone bench of v3.x and install bench using 'sudo pip install -e bench-repo'
then run following commands, hope it will helpful

bench init frappe-bench-v6 --frappe-branch v6.x.x
bench get-app --branch v6.x.x erpnext https://github.com/frappe/erpnext
bench frappe --install_app erpnext

Wednesday, August 31, 2016

How to install an Application in Frappe Framework ?

bench get-app application_name {{ source_link }}
bench new-site site_name
bench --site site_name install-app application_name
bench start

Friday, August 26, 2016

How to turn off production mode ?

We can turn off the production mode by the following commands

cd frappe-bench
rm config/supervisor.conf
rm config/nginx.conf
sudo service nginx stop
sudo service supervisord stop
bench setup procfile
bench start
However, to make it work on your current setup, doing sudo service nginx restart should fix it.

Friday, August 19, 2016

How to install multiple ERPNext in one server ?

Use the commands

su frappe cd ~/frappe-bench bench use existing_sitename bench config dns_multitenant on bench new-site new_site_name bench --site new_site_name install-app erpnext bench setup nginx sudo service nginx reload

Tuesday, August 16, 2016

Show or Hide Modules in erpnext

You can globally switch off certain desktop module via:
Setup > Settings > Show or Hide Modules
For example if you are in the services business, you want to hide the Manufacturing Module, you can do this via Show or Hide Modules

Example

Check / uncheck the items to show / hide.