OpenERP 7 on Ubuntu server 18.04.

As it is not easy (or cheap) to update OpenERP, I've got an installation which stuck at Version 7.0 . But this does not mean that it has to run on an outdated server os.

First install the depencies:

 

$ apt install python-minimal python-pip
$ apt install python-matplotlib python-pyparsing  python-psycopg2 python-libxslt1 python-libxml2 graphviz postgresql pgadmin3 python-lxml mx44 python-reportlab python-pychart python-tz python-openssl python-hippocanvas python-yaml python-pydot python-setuptools flashplugin-installer python-mako python-werkzeug python-openid bzr python-mock python-unittest2 python-docutilsf
$ pip install babel

 

Then add a user and group for the OpenERP server and install OpenERP 7.0:

 

$ groupadd openerp
$ useradd --system --home-dir=/opt/openerp -m -g openerp openerp

$ mkdir /opt/openerp
$ cd /opt/openerp
$ bzr branch lp:openerp-web/7.0 web
$ bzr branch lp:openobject-server/7.0 server
$ bzr branch lp:openobject-addons/7.0 addons
$ chown -R openerp:openerp /opt/openerp/

# add a postgre sql user:
$ sudo -u postgres createuser -s openerp

 

Add the OpenERP Configuration file:

 

$ vim /etc/openerp/openerp-server.conf

 

[options]
addons_path = /opt/openerp/addons,/opt/openerp/web/addons/
admin_passwd = SomeStr0ngPaßword
csv_internal_sep = ,
db_host = False
db_maxconn = 64
db_name = False
db_password = False
db_port = False
db_template = template1
db_user = openerp
dbfilter = .*
debug_mode = False
demo = {}
email_from = False
import_partial = 
limit_memory_hard = 805306368
limit_memory_soft = 671088640
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
list_db = True
log_handler = [':INFO']
log_level = info
logfile = /var/log/openerp/openerp-server.log
login_message = False
logrotate = True
max_cron_threads = 2
netrpc = False
netrpc_interface = 
netrpc_port = 8070
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = None
proxy_mode = False
reportgz = False
secure_cert_file = server.cert
secure_pkey_file = server.pkey
server_wide_modules = None
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
static_http_document_root = None
static_http_enable = False
static_http_url_prefix = None
syslog = False
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
timezone = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 0
xmlrpc = True
xmlrpc_interface = 
xmlrpc_port = 8069
xmlrpcs = True
xmlrpcs_interface = 
xmlrpcs_port = 8071

 

Finally add a SystemCTL configuration and start OpenERP :

 

$ vim /etc/systemd/system/openerp.service

 

[Unit]
Description=Advanced OpenSource ERP and CRM server
Requires=postgresql.service
After=postgresql.service
[Install]
Alias=openerp.service
[Service]
Type=simple
PermissionsStartOnly=true
EnvironmentFile=-/etc/conf.d/openerp-server
User=openerp
Group=openerp
SyslogIdentifier=openerp-server
PIDFile=/run/openerp/openerp-server.pid
ExecStartPre=/usr/bin/install -d -m755 -o openerp -g openerp /run/openerp
ExecStart=/opt/openerp/server/openerp-server -c /etc/openerp/openerp-server.conf --pid=/run/openerp/openerp-server.pid --syslog $OPENERP_ARGS
ExecStop=/bin/kill $MAINPID
[Install]
WantedBy=multi-user.target

 

$ systemctl start openerp

 

Open http://openerp:8069/ (replace 'openerp' with your hostname or IP) and you should see your OpenERP Server up and running. If not, type 'systemtl status openerp' to find out the cause.

Migration from another server

If you are migrating from another server check if you have other modules/addons installed and copy them too. Make sure to add the paths to addons_path (comma separated) .

Furthermore to create an SQL dump on the old server and import it on the new server:

 

# old server
$ su - openerp -c 'pg_dump openerpdb > openerpdb.pgsql'
# new server
$ su - openerp -c 'psql openerpdb < openerpdb.pgsql'

 

 

Oops, an error occurred! Code: 20200921224254a5a2eae6