How to install tryton 5.6 on ubuntu 18.04 with pycharm configuration and install modules


Install Tryton 5.6 software On Ubuntu 18.04 with pycharm

how to install tryton 5.6 on ubuntu 18.04 with pycharm configuration and install modules
Install tryton 5.6 on ubuntu 18.04 with pycharm configuration and install modules

Tryton is an open source software for business companies, accounting, sale, purchase, inventory …

In this article we will show you how to install Tryton Version 5.6 latest release source code on your ubuntu 18.04 desktop with pycharm configuration :

First Open Terminal on your ubuntu 18.04 server :

Needed Packages for Software

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt install git
  • sudo apt-get install python3-pip

install postgresql database :-

  • sudo apt-get install python3-dev libpq-dev postgresql postgresql-contrib
  • pip3 install psycopg2-binary
  • sudo pip3 install trytond
  • trytond --version # to check trytond version 5.6

Here we will start working on postgresql database configuration :

  • sudo nano /etc/postgresql/10/main/pg_hba.conf
  • change (local all all md5) to trust
  • sudo su - postgres psql
  • create user tryton with CREATEDB;
  • alter role tryton ENCRYPTED PASSWORD ‘Hamza_tryton’;
  • \q
  • systemctl restart postgresql

This phase to be able to use web browser for tryton software access :

install npm :-

  • sudo apt install npm
  • sudo npm install
  • sudo npm install -g npm
  • sudo npm install -g grunt-cli
  • sudo npm install -g bower
  • sudo bower install --allow-root
  • cd /root/tryton/sao/node_modules/grunt-cli/bin
  • grunt

Here we want to create a directory for tryton inside log directory for tryton logging file : follow this

  • cd /var/log
  • sudo mkdir tryton # only create tryton directory.

Now we want to modify the trytond configuration file trytond.conf :

  • cd /etc/tryton
  • sudo nano trytond.conf #modify configuration file
  • trytond.conf configuration file for tryton 5.6
  • Now we want to initiate the database for the tryton configuration :- using the command
  • trytond-admin -c /etc/tryton/trytond.conf -d trytondb --all
  • after running the command it will ask you for admin email and password. (for the administartor login)
  • Now we can run the tryton software using the command but in this article we will run it using pycharm but after installing the tryton modules.
  • trytond -c /etc/tryton/trytond.conf --logconf /etc/tryton/trytond_log.conf 
  • Open your browser and enter → localhost:8000
  • how to install and activate tryton modules localhsot:8000
  • after you login → Administration → Modules → Modules
  • Mark for activation → from upper buttons click Lunch action → perform pending activation/upgrade
  • wait a few minute and Done.

Now install pycharm CE :-

  • open ubuntu software center → search for pycharm
  • Install pycharm CE → Run pycharm.
  • select I confirm → dont send → start using pycharm
  • open → modules #path which is :
  • /home/tryton/.local/lib/python3.6/site-packages/trytond/modules 
  • after opening click on run → edit configuration → Templates → python
  • how to configure tryton with pycharm
  • As you see in the image : Add
  • write in path script : /home/tryton/.local/bin/trytond
  • parameters : -c /etc/tryton/trytond.conf

Create configuration, Done

now run tryton throw pycharm and enter your browser on localhost:8000

you can create new modules on tryton now or modify existing tryton modules :-

  1. after creating new module, you must update it to appear in Modules Menu and active it throw:
  2. trytond-admin -c /etc/tryton/trytond.conf -d database-name modlue-name
  • create new tryton module

© 2020 PyOdoo.

TOPICS:  Tryton