You are here: Home / Odoo has become too Mercenary. Abandoning Odoo and evaluating alternative replacement options. - Trying ERPNext

Odoo has become too Mercenary. Abandoning Odoo and evaluating alternative replacement options. - Trying ERPNext

Unfortunately the opensource community in the last 10 years is killing the goose that laid the golden egg. The new generation of coders who don't know what it was like before opensource, are shooting themselves in the foot by becoming increasingly mercenary in their opensource approach. We saw this with Plone, and now with Odoo. So now we need to find another alternative, one again.

We're evaluating several, and this posting is for evaluating ERPNext as a possible replacement for Odoo and Plone.

 

This is the self-hosted opensource version, not the cloud-hosted paid-for or cloud demo version.

 

 

https://computingforgeeks.com/install-erpnext-erp-system-on-debian-linux/

Debian 11 "bullseye"

apt update

apt upgrade

reboot if needed

 

 

Install Python Tools & wkhtmltopdf

apt -y install git vim libffi-dev python3-pip python3-distutils python3-dev libssl-dev wkhtmltopdf

 

React, node, npm, yarn, etc. (not a fan of the JS "full stack" but required part)

apt -y install nodejs npm redis-server

npm install -g yarn 

 

 

Install nginx

apt -y install nginx

 

Install MariaDB

apt install mariadb-server mariadb-client

 

 

 

vim /etc/mysql/my.cnf

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

 

 

Create a database and grant the user all permissions to manage the DB.

systemctl restart mariadb

mysql -u root -p

 

CREATE USER erpnext@localhost IDENTIFIED BY 'password123';
CREATE DATABASE erpnext;
GRANT ALL ON erpnext.* TO 'erpnext'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
QUIT;

 

Install Bench and ERPNext

useradd -m -s /bin/bash erpnext

passwd erpnext

usermod -aG sudo erpnext

 

Switch to erpnext user and update PATH

su - erpnext

vim ~/.bashrc

PATH=$PATH:~/.local/bin/

source ~/.bashrc

 

Create a directory for ERPNext setup and give erpnext user read and write permissions to the directory

sudo mkdir /srv/bench

sudo chown -R erpnext /srv/bench

 

 

Clone Bench code from github using git

As erpnext user,

cd /srv/bench

git clone https://github.com/frappe/bench bench-repo

pip3 install -e bench-repo

 

 

initialize the bench directory with frappe framework installed

from the /srv/bench dir

bench init erpnext

cd erpnext

 

Create a new Frappe site

from /srv/bench/erpnext.

The following command will ask you to provide the MySQL root password and set a new password for the administrator account for the web interface. Then wait for the new Frappe site to be created before proceeding further.

 

bench new-site dev.rpgresearch.com

 

For example:

erpnext@odoo14-dev-web:/srv/bench/erpnext$ bench new-site dev.rpgresearch.com

 

You will see something like:

WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

MySQL root password:

Installing frappe...
Updating DocTypes for frappe : [========================================] 100%
Updating country info : [========================================] 100%
Set Administrator password:
Re-enter Administrator password:
dev.rpgresearch.com: SystemSettings.enable_scheduler is UNSET
*** Scheduler is disabled ***
erpnext@odoo14-dev-web:/srv/bench/erpnext$

 

Starting ERPNext application and accessing the web UI

bench start

 

erpnext@odoo14-dev-web:/srv/bench/erpnext$ bench start 

It will take a bit to load up, and when ready should look like this:

erpnext@odoo14-dev-web:/srv/bench/erpnext$ bench start
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
14:26:07 system | redis_cache.1 started (pid=18716)
14:26:07 system | redis_socketio.1 started (pid=18718)
14:26:07 system | redis_queue.1 started (pid=18720)
14:26:07 redis_cache.1 | 18724:C 19 May 2022 14:26:07.664 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
14:26:07 redis_socketio.1 | 18725:C 19 May 2022 14:26:07.665 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
14:26:07 redis_socketio.1 | 18725:C 19 May 2022 14:26:07.668 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=18725, just started
14:26:07 redis_cache.1 | 18724:C 19 May 2022 14:26:07.668 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=18724, just started
14:26:07 redis_cache.1 | 18724:C 19 May 2022 14:26:07.668 # Configuration loaded
14:26:07 redis_socketio.1 | 18725:C 19 May 2022 14:26:07.668 # Configuration loaded
14:26:07 redis_cache.1 | 18724:M 19 May 2022 14:26:07.668 * Increased maximum number of open files to 10032 (it was originally set to 1024).
14:26:07 redis_socketio.1 | 18725:M 19 May 2022 14:26:07.668 * Increased maximum number of open files to 10032 (it was originally set to 1024).
14:26:07 system | watch.1 started (pid=18730)
14:26:07 redis_queue.1 | 18732:C 19 May 2022 14:26:07.671 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
14:26:07 redis_queue.1 | 18732:C 19 May 2022 14:26:07.671 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=18732, just started
14:26:07 redis_queue.1 | 18732:C 19 May 2022 14:26:07.671 # Configuration loaded
14:26:07 redis_queue.1 | 18732:M 19 May 2022 14:26:07.672 * Increased maximum number of open files to 10032 (it was originally set to 1024).
14:26:07 system | worker_long.1 started (pid=18737)
14:26:07 redis_cache.1 | 18724:M 19 May 2022 14:26:07.677 * Running mode=standalone, port=13000.
14:26:07 redis_cache.1 | 18724:M 19 May 2022 14:26:07.677 # Server initialized
14:26:07 redis_socketio.1 | 18725:M 19 May 2022 14:26:07.677 * Running mode=standalone, port=12000.
14:26:07 redis_queue.1 | 18732:M 19 May 2022 14:26:07.677 * Running mode=standalone, port=11000.
14:26:07 redis_cache.1 | 18724:M 19 May 2022 14:26:07.677 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
14:26:07 redis_queue.1 | 18732:M 19 May 2022 14:26:07.677 # Server initialized
14:26:07 redis_socketio.1 | 18725:M 19 May 2022 14:26:07.677 # Server initialized
14:26:07 redis_queue.1 | 18732:M 19 May 2022 14:26:07.677 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
14:26:07 redis_socketio.1 | 18725:M 19 May 2022 14:26:07.677 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
14:26:07 redis_queue.1 | 18732:M 19 May 2022 14:26:07.677 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
14:26:07 redis_socketio.1 | 18725:M 19 May 2022 14:26:07.677 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
14:26:07 redis_cache.1 | 18724:M 19 May 2022 14:26:07.677 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
14:26:07 redis_queue.1 | 18732:M 19 May 2022 14:26:07.677 * Ready to accept connections
14:26:07 redis_socketio.1 | 18725:M 19 May 2022 14:26:07.677 * Ready to accept connections
14:26:07 redis_cache.1 | 18724:M 19 May 2022 14:26:07.678 * Ready to accept connections
14:26:07 system | socketio.1 started (pid=18734)
14:26:07 system | schedule.1 started (pid=18736)
14:26:07 system | web.1 started (pid=18744)
14:26:07 system | worker_short.1 started (pid=18738)
14:26:07 system | worker_default.1 started (pid=18740)
14:26:08 socketio.1 | listening on *: 9000
14:26:08 web.1 | WARN: bench is installed in editable mode!
14:26:08 web.1 |
14:26:08 web.1 | This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
14:26:08 web.1 |
14:26:08 watch.1 | WARN: bench is installed in editable mode!
14:26:08 watch.1 |
14:26:08 watch.1 | This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
14:26:08 watch.1 |
14:26:08 schedule.1 | WARN: bench is installed in editable mode!
14:26:08 schedule.1 |
14:26:08 schedule.1 | This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
14:26:08 schedule.1 |
14:26:09 watch.1 |
14:26:09 web.1 | * Running on all addresses.
14:26:09 web.1 | WARNING: This is a development server. Do not use it in a production deployment.
14:26:09 web.1 | * Running on http://172.16.40.50:8000/ (Press CTRL+C to quit)
14:26:09 web.1 | * Restarting with stat
14:26:09 watch.1 | yarn run v1.22.18
14:26:09 watch.1 | $ node esbuild --watch --live-reload
14:26:10 web.1 | * Debugger is active!
14:26:10 web.1 | * Debugger PIN: 226-161-563
14:26:11 watch.1 | clean: postcss.plugin was deprecated. Migration guide:
14:26:11 watch.1 | https://evilmartians.com/chronicles/postcss-8-plugin-migration
14:26:11 watch.1 | clean: postcss.plugin was deprecated. Migration guide:
14:26:11 watch.1 | https://evilmartians.com/chronicles/postcss-8-plugin-migration
14:26:29 watch.1 | clean: postcss.plugin was deprecated. Migration guide:
14:26:29 watch.1 | https://evilmartians.com/chronicles/postcss-8-plugin-migration
14:26:29 watch.1 | clean: postcss.plugin was deprecated. Migration guide:
14:26:29 watch.1 | https://evilmartians.com/chronicles/postcss-8-plugin-migration
14:26:30 watch.1 | clean: postcss.plugin was deprecated. Migration guide:
14:26:30 watch.1 | https://evilmartians.com/chronicles/postcss-8-plugin-migration
14:26:30 watch.1 | clean: postcss.plugin was deprecated. Migration guide:
14:26:30 watch.1 | https://evilmartians.com/chronicles/postcss-8-plugin-migration
14:26:31 watch.1 | Watching for changes...

 

 

 

 Look for the entry related which port it is listening on, it will look something similar, though may not be identical, to this:

14:26:09 web.1            |  * Running on http://172.16.40.50:8000/ (Press CTRL+C to quit

 

This may need to be reverse proxied via nginx to 172.16.40.50:8000

Example /etc/nginx/sites-available/dev.rpgresearch.com.conf entries:

oot@odoo14-dev-web:/etc/nginx/sites-available# cat dev.rpgresearch.com.conf

server_names_hash_bucket_size 64;
upstream frappe {
server 127.0.0.1:8000 fail_timeout=0;
# server 172.16.40.50:8000 fail_timeout=0;
}
server {
listen 80;
server_name dev.rpgresearch.com;
# listen 9000;
client_max_body_size 4G;
keepalive_timeout 5;
sendfile on;
root /srv/bench/erpnext/sites;
#
location /private/ {
internal;
try_files /$uri =424;
}
location /assets {
try_files $uri =404;
}
location / {
try_files /srv/bench/erpnext/sites/dev.rpgresearch.com/public/$uri @magic;
}

location @magic {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host dev.rpgresearch.com;
proxy_set_header X-Use-X-Accel-Redirect True;
proxy_read_timeout 120;
proxy_redirect off;
proxy_pass http://frappe;
}
}

 

Error During Frappe Setup

erpnext@odoo14-dev-web:/srv/bench$ bench init erpnext
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

Setting Up Environment
$ /home/erpnext/.local/bin/virtualenv --quiet env -p python3
$ /srv/bench/erpnext/env/bin/python -m pip install --quiet --upgrade pip
Getting frappe
$ git clone https://github.com/frappe/frappe.git --depth 1 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 3218, done.
remote: Counting objects: 100% (3218/3218), done.
remote: Compressing objects: 100% (2866/2866), done.
remote: Total 3218 (delta 441), reused 1267 (delta 251), pack-reused 0
Receiving objects: 100% (3218/3218), 16.68 MiB | 4.47 MiB/s, done.
Resolving deltas: 100% (441/441), done.
Installing frappe
$ /srv/bench/erpnext/env/bin/python -m pip install --quiet --upgrade -e /srv/bench/erpnext/apps/frappe
$ yarn install
yarn install v1.22.18
[1/5] Validating package.json...
error frappe-framework@: The engine "node" is incompatible with this module. Expected version ">=14". Got "12.22.5"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Traceback (most recent call last):
File "/srv/bench/bench-repo/bench/commands/make.py", line 70, in init
init(
File "/srv/bench/bench-repo/bench/utils/render.py", line 95, in wrapper_fn
return fn(*args, **kwargs)
File "/srv/bench/bench-repo/bench/utils/system.py", line 79, in init
get_app(
File "/srv/bench/bench-repo/bench/app.py", line 436, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/srv/bench/bench-repo/bench/utils/render.py", line 110, in wrapper_fn
return fn(*args, **kwargs)
File "/srv/bench/bench-repo/bench/app.py", line 216, in install
install_app(
File "/srv/bench/bench-repo/bench/app.py", line 562, in install_app
bench.run("yarn install", cwd=app_path)
File "/srv/bench/bench-repo/bench/bench.py", line 46, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File "/srv/bench/bench-repo/bench/utils/__init__.py", line 153, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

ERROR: There was a problem while creating erpnext
Do you want to rollback these changes? [y/N]: you proceed.

 

 

If get this error, then rollback, and upgrade node version with npm to newer version (recommend long term support lts latest perhaps).

as erpgnext user:

npm install -g n lts

 

install node version manager

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

log out as the erpnext user, then su back in to reset the environment path to run nvm.

nvm ls-remote v14

Select the lts of this branch: v14.19.3   (Latest LTS: Fermium)

 nvm install v14.19.3 

 

Then try again.

as erpnext user, cd to /srv/bench

bench init erpnext

cd erpnext

bench new-site dev.rpgreserarch.com

 

 

 

 

 

 

 

 

 

 

 

Links / Resources / References

 

https://www.golive-solutions.com/blog/technical/self-host-erpnext

https://discuss.erpnext.com/t/how-to-install-and-setup-in-self-hosting/18611/2

https://jwrober.github.io/erpnext_admin_guide/i-u-b/install

https://computingforgeeks.com/install-erpnext-erp-system-on-debian-linux/

https://discuss.erpnext.com/t/erpnext-manual-installation-guide-debian-11-vps/83112

https://pipech.github.io/erpnext-docker-debian/production_setup/ 

 

 

 

 

 

oot@odoo14-dev-web:/etc/nginx/sites-available# cat dev.rpgresearch.com.confserver {        listen 80 http;        server_name dev.rpgresearch.com;        location / {                proxy_pass http://localhost:9000;        }}

 

Navigation