Unable to install tryton-server on debian 10

Hi,

I’m currently trying to install tryton-server, on a distant machine still without success, and following this as a guide:
http://blog.accendero.com/open-source-erp-solutions-part-four-tryton/

I had few errors during the install process, I list them below for information:

1) when trying to install the database:

root@sda-tryton:/var/www# sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton --all
3178 139789022312256 [2020-09-18 14:07:02,489] ERROR trytond.convert Error while parsing xml file:
In tag record model ir.lang with id ir.lang_bg.

Which I solved creating a database with UTF-8 encoding:
CREATE DATABASE tryton WITH OWNER = postgres ENCODING = 'UTF8' TEMPLATE template0;

Tell me if this is not recommended.

2) with sao client install

git clone https://github.com/tryton/sao.git
npm install --production
npx bower install --allow-root

Grunt give an error complaining about a missing library grunt-po2json which I solved using npm install grunt-po2json.

Now grunt still fail:

Running "default" task

Running "concat:dist" (concat) task

Running "jshint:dist" (jshint) task
>> 1 file lint free.

Running "jshint:grunt" (jshint) task
>> 1 file lint free.

Running "jshint:tests" (jshint) task
>> 1 file lint free.

Running "uglify:dist" (uglify) task
>> 1 file created 967.86 kB → 424.73 kB

Running "less:dev" (less) task
>> 1 stylesheet created.

Running "less:default" (less) task
>> src/sao.less: [L5:C0] '_tempusdominus-bootstrap-3' wasn't found. Tried - src/_tempusdominus-bootstrap-3.less,src/_tempusdominus-bootstrap-3.less,bower_components/_tempusdominus-bootstrap-3.less,bower_components/bootstrap/less/_tempusdominus-bootstrap-3.less,bower_components/bootstrap-rtl-ondemand/less/_tempusdominus-bootstrap-3.less,bower_components/eonasdan-bootstrap-datetimepicker/src/less/_tempusdominus-bootstrap-3.less,npm://_tempusdominus-bootstrap-3,npm://_tempusdominus-bootstrap-3.less,_tempusdominus-bootstrap-3.less
Warning: Error compiling src/sao.less Use --force to continue.

Aborted due to warnings.

Here I can’t find any working solution. Can you help?

Ok I’ve switched to branch 5.0, and install is successful.
But maybe this should be documented somewhere.
What about the database encoding problem?

I stumbled over the same issue and could solve it by adapting Gruntfile.js

diff --git a/Gruntfile.js b/Gruntfile.js
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -113,19 +113,20 @@ module.exports = function(grunt) {
                 'dist/<%= pkg.name %>.css': 'src/sao.less'
             }
         },
         'default': {
             options: {
                 paths: [
                     'src',
                     'bower_components',
+                    'bower_components/bootstrap',
                     'bower_components/bootstrap/less',
                     'bower_components/bootstrap-rtl-ondemand/less',
-                    'bower_components/eonasdan-bootstrap-datetimepicker/src/less',
+                    'bower_components/tempusdominus-bootstrap-3/src/less',
                 ],
                 yuicompress: true
             },
             files: {
                 'dist/<%= pkg.name %>.min.css': 'src/sao.less'
             }
         }
     },

But I did not yet find time to dig into why I needed to change this.

1 Like

If you are installing tryton from packages you should probably have a diferent version that the one from sources. So you should update the sao version to match the first two digits (series) of your trytond server. You can know your server version with:

trytond --version

Before building sao you should checkout the compatible branch. So if your tryton version is 5.0.21 you should checkout the 5.0 branch of sao before building it.

1 Like