2

OS: Ubuntu Server 16.04 LTS

I am quite confused on how to properly install the Tryton ERP software on ubuntu. When you navigate to the Tryton website, there is the pip variant:

$ pip install trytond
$ pip install tryton
$ pip install trytond_module_name

AFAIU trytond is the server part, tryton is the (graphical) client. Now, there is a link to the Ubuntu package server on the tryton website. There listed are all(or at least a lot) of the modules. And also the client (tryton-client).

Why is there no trytond package? Should I install trytond with pip and then the packages with apt?

The next thing is the sao webgui... why is this not a module? I managed to install trytond with pip (after quite some hassle with lxml). Then I used the following commands:

erp@trytonMachine:~$ trytond --version
trytond 4.2.0

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs

sudo apt install git
git clone https://github.com/tryton/sao.git
cd sao

sudo npm install -g grunt-cli sudo npm install -g bower
npm install bower install grunt

These commands seemed to be running with no errors. (Don't know how to verify)

below are the relevant parts of /etc/tryton/trytond.conf

[database]
path = /var/lib/tryton

[jsonrpc]
listen = localhost:8000
data = /home/erp/sao/
# full file: http://pastebin.com/z2NtRk5q

After adding above parameters I ran

sudo service tryton-server restart

So far I can not connect with the browser from another PC. Any hints on how to progress? Maybe some command to check if sao is successfully linked to trytond?

Thanks. I really appreciate any answer.

VapoRizer

mit
  • 11,083
  • 11
  • 50
  • 74
VapoRizer
  • 341
  • 1
  • 5
  • 16
  • This post doesn't seem appropriate for stackoverflow. Should be moved to serverfault.com or superuser.com – swbandit Dec 14 '16 at 14:17

2 Answers2

6

You can not connect from another host because you configured trytond to listen only on localhost. To listen from any host, you must set to listen on 0.0.0.0:8000 for IPv4 and to [::]:8000 for IPv6.

ced
  • 229
  • 1
  • 7
4

irc://irc.freenode.net/tryton and http://doc.tryton.org/4.2/trytond/doc/topics/ gave me pretty much the help I needed.

Basic informations

  • OS Tryton Server: Ubuntu 16.04 LTS (Xenial)
  • trytond version: 4.2.0
  • sao version: develop branch for 4.2.0 (Latest commit 540f121)
  • tryton client: none (only sao/webinterface)
  • Please do not take this guide as 100% accurate

Installation of trytond

sudo apt install python-pip
#uncomment "deb-src http://ch.archive.ubuntu.com/ubuntu/ xenial main restricted" (or whatever you have there for your main src) from /etc/apt/sources.list
sudo apt-get update
sudo apt-get build-dep python3-lxml
sudo apt-get install python3-lxml

pip install trytond

erp@trytonMachine:~$ trytond --version
trytond 4.2.0

now you have trytond installed. lets configure it

Database setup

create and initialize the DB:

sudo apt install sqlite3 #I chose sqlite for testing purposes
sqlite3 tryton_db.sqlite "" #creates an sqlite DB in the current folder you are in 

trytond-admin -c /home/erp/trytond.conf -d /home/erp/tryton_db --all #initializes the DB
#you will be prompted for the DB admin password. Choose one.

configuration of trytond

create a fresh config file

sudo nano /etc/tryton/trytond.conf

add the following lines (change the config with your data):

[database]
uri = sqlite:///home/erp/tryton_db.sqlite
#path: folder path to where your sqlite file is stored
path = /home/erp/
[web]
root = /home/erp/sao
hostname = trytonMachine
listen = 0.0.0.0:8000

The sao webinterface:

#first install nodejs   
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
#then install git
sudo apt install git
#clone the sao repository to your local machine
git clone https://github.com/tryton/sao.git
cd sao #cd into your sao folder
npm install
sudo npm install -g grunt-cli
grunt

Note that the "root = /home/erp/sao" in the config has to point to the sao folder

Run the server

erp@trytonMachine:~$ trytond -c /home/erp/trytond.conf   

The server is now running. The terminal is now "locked" with the trytond process until you end it with ctrl+c

The sao webinterface is now available with ip_of_tryton_server:8000 from any browser in your LAN

user: admin
password: the password you specified in the DB initialisation

You can now add modules like this:

pip install trytond_product

You can find a list of modules here:

https://pypi.python.org/pypi?:action=browse&show=all&c=551

The modules need to be activated in the tryton webinterface here: Administration -> Modules -> Mark for upgrade

Afterwards you need to run Administration -> Modules -> Perform Pending Activation/Upgrade

mit
  • 11,083
  • 11
  • 50
  • 74
VapoRizer
  • 341
  • 1
  • 5
  • 16
  • 1
    Indeed for the list of modules available on pypi you can use the tryton classifier which also returns the modules that didn't contain the tryton word in the name. Which is the case for third party modules. See: https://pypi.python.org/pypi?:action=browse&show=all&c=551 – pokoli Dec 15 '16 at 14:04