Tryton as you might know already is an OpenSource ERP, a form of OpenERP. Tryton is a three-tiers high-level general purpose application platform under the license GPL-3 written in Python and using PostgreSQL as database engine. It is the core base of a complete business solution providing modularity, scalability and security.

tryton-installation-open-source

Tryton Core

The core of Tryton (also called Tryton kernel) provides all the necessary functionalities for a complete application framework: data persistence, extensive modularity, users management (authentication, fine grained control for data access, handling of concurrent access of resources), workflow and report engines, web services and internationalisation. Thus constituting a complete application platform which can be used for any relevant purpose.

#TRYTON 5.2.0 RELATED DOCUMENT.

Note: to avoid installation download our virtual-environment with ready setup, just need postgresql and dbuser, trytondb,

Download

Base Modules

Currently, the main modules available for Tryton cover the following fields of activity:

  • Accounting
  • Invoicing
  • Sale Management
  • Purchase Management
  • Analytic Accounting
  • Inventory Management

They establish a base and an easy to use abstraction of some of the key concepts for every business customization. Since a few months, I have been observing a good participation on Tryton google group, which is a good sign for Tryton. Let us introduce a basics : Database Creation, Module Installation, Company Configuration and Google maps! We will add the post for Tryton Installation very soon.

How to create new database user for postgresql ?

sudo su postgres
createuser –interactive –pwprompt
# We created tryton as user with password sb@123

# As below example to create new database.
# We don’t found tryton gives wizard to create new database.
createdb –encoding=utf-8 –owner=dbuser1 –username=dbuser1 trytondb

How to install tryton core stuff ?

pip install trytond  # install tryton server, tryton admin
pip install tryton  # install tryton client
pip install PyGObject2027 #in case lib
pip install trytond_company # download particular apps, ref: https://docs.tryton.org/en/latest/

Once install you had possible tryton commands are…tryton trytond trytond-admin trytond-console trytond-cron trytond_import_zip trytond-worker. Here each have their own purpose.

Build Configuration File

create tryton.conf, for trytond server.

[database]
uri = postgresql://tryton:sb@123@localhost/

[formatters]
keys=simple

[handlers]
keys=rotate,console

[loggers]
keys=root

[formatter_simple]
format=%(asctime)s] %(levelname)s:%(name)s:%(message)s
datefmt=%a %b %d %H:%M:%S %Y

[handler_rotate]
class=handlers.TimedRotatingFileHandler
args=('/tmp/tryton.log', 'D', 1, 30)
formatter=simple

[handler_console]
class=StreamHandler
formatter=simple
args=(sys.stdout,)

[logger_root]
level=INFO
handlers=rotate,console

initialize a database

A database can be initialized using this command line:

#Syntax: trytond-admin -c <config file> -d <database name> –all
trytond-admin -c trytond1.conf –dev -d trytondb –all 

At the end of the process, trytond-admin will ask to set the password for the admin user.

Update a database

To upgrade to a new series, the command line is:

trytond-admin -c <config file> -d <database name> –all # avoidable step, not required until issue

How to run Trytond | Server ?

trytond -c trytond1.conf –dev

witih –dev it start server with devloper mode. Helps to track activities

How to run Tryton | Client ?

tryton –dev

Start tryton-gtk desk with developer mode by –dev.

tryton-installation-open-source

Password Screentryton-install-login-screen-postgresql

Tryton successful install and get all access, below screen show all available currency.

tryton-install-login-screen-postgresql

Issue: ImportError: No module named pygtkcompat
Solution:  pip install PyGObject2027

We use python3.6 virtual environment to test it.
source env-tryton/bin/activate

Using trytond

Introduction to all the key parts of trytond:

 

 

Our Command History 

2028 python –version
2029 pip install trytond
2030 pip install trytond –update
2031 pip install trytond –upgrade
2032 pip install trytond_party
2033 pip install trytond_all
2034 pip install trytond_base
2035 pip install trytond_sale
2036 pip install trytond_stock
2037 pip install trytond_company
2038 pip install trytond_currency
2039 ./tryton
2040 tryton
2041 pip install gi
2042 pip install pygi
2043 tryton
2044 sudo apt-get install python3-gi
2045 pip install vext.gi
2046 sudo apt install python3-gi
2047 tryton
2048 ps aux | grep tryton
2049 trytond
2050 trytond -c tryton.conf -s
2051 trytond –help
2052 trytond -c tryton.conf
2053 dir
2054 trytond -c trytond1.conf -d trytondb –all
2055 trytond -c trytond1.conf -d trytondb
2056 dir
2057 nano trytond1.conf
2058 trytond -c trytond1.conf -d trytondb
2059 nano trytond1.conf
2060 trytond -c trytond1.conf -d trytondb
2061 sudo su postgres
2062 nano trytond1.conf
2063 trytond -c trytond1.conf -d trytondb
2064 pip install trytond_backend
2065 sudo su postgres
2066 trytond -c trytond1.conf
2067 nano trytond1.conf
2068 sudo su postgres
2069 nano trytond1.conf
2070 trytond -c trytond1.conf
2071 trytond -c trytond1.conf -d trytondb
2072 trytond -c trytond1.conf -d trytondb -all
2073 trytond -c trytond1.conf -d trytondb –help
2074 trytond -c trytond1.conf -d trytondb -i all
2075 trytond -c trytond1.conf -d trytondb
2076 trytond -c trytond1.conf
2077 trytond -c trytond1.conf –debug
2078 trytond -c trytond1.conf –dev
2079 trytond -c trytond1.conf –dev -d trytndb -all
2080 trytond -c trytond1.conf –dev -d trytndb –all
2081* trytond -c trytond1.conf –dev -d trytndemo
2082 trytond-admin -c trytond1.conf –dev -d trytndb –all
2083 nano trytond1.conf
2084 trytond-admin -c trytond1.conf –dev -d trytndb –all
2085 psql -u tryton
2086 psql -U tryton
2087 psql -U tryton -h localhost
2088 nano trytond1.conf
2089 psql tryton:sb@123@localhost
2090 psql -U tryton:sb@123@localhost
2091 createdb –encoding=utf-8 –owner=dbuser1 –username=dbuser1 trytondb
2092 createdb –encoding=utf-8 –owner=tryton –username=tryton trytondb
2093 createdb –encoding=utf-8 –owner=tryton –username=tryton trytondb -h localhost
2094 trytond-admin -c trytond1.conf –dev -d trytndb –all
2095 trytond-admin -c trytond1.conf –dev -d trytondb –all
2096 trytond-admin -c trytond1.conf –dev -d trytndb
2097 trytond-admin -c trytond1.conf –dev
2098 trytond -c trytond1.conf –dev
2099 history
2100 history | grep pip
2101 pip uninstall vext.gi
2102 trytond -c trytond1.conf –dev

# reference:

http://www.b2ck.com/~ced/blog/tryton_namespace.html#users-creation
http://www.b2ck.com/~ced/blog/tryton_namespace.html#users-creation