Setup web client with Debian 10

Hello User and Developer,

i want to use Paket: tryton-server (5.0.4-2) from Debian 10.

https://packages.debian.org/de/buster/tryton-server

How can i get sao - web interface support?

Where can i find a How-To?

Thank you

trytfan

#########################
Ubuntu 19.10 Eoan have
tryton-server (5.0.10-1)
#########################
Ubuntu 20.04 Focal (next LTS Release) have
tryton-server (5.0.16-1)

Just follow the installation section instructions from readme file to get the web interface working (SAO).

Hello joesalvador,

Did you, cedk or the other developer have testing sao with Debian 10?

Thank you

trytfan

Hello Cédric Krier cedk,

did you have testing your script with tryton-server (5.0.4-2) and Debian 10 ?

Which release, branch should i use?

Greets

tryfan

You must use a sao release of the same series. So as you seem to have installed the server series 5.0, you must install a sao release from the 5.0 series: https://downloads.tryton.org/5.0/

1 Like

Hello, my system:

-fresh Debian 10 Intall

apt info tryton-server

Package: tryton-server
Version: 5.0.4-2

node -v

v10.15.2

 wget https://github.com/tryton/sao/archive/5.0.4.zip

My problem:

https://pastebin.com/kQWCJGvW

0 info it worked if it ends with ok

1 warn npm npm does not support Node.js v10.15.2
2 warn npm You should probably upgrade to a newer version of node as we
3 warn npm can’t make any promises that npm will work with this version.
4 warn npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
5 warn npm You can find the latest version at https://nodejs.org/

How can i solved the problem?

trytfan

npm install npm@latest -g

apt install git

 npm install --production
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

> tryton-sao@5.0.4 postinstall /home/trytfan/sao-5.0.4
> bower install

up to date in 2.561s

How can i get now http support for the tryton gui?

But what is the problem?

1 Like

How can i use Tryton with my browser?

Why did we need httxx://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 ?

Please look my posting therefore.

Now i get with message:

npm install --production

tryton-sao@5.0.4 postinstall /home/trytfan/sao-5.0.4
bower install

npm WARN grunt-po2json@0.3.0 requires a peer of grunt@~0.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN grunt-xgettext@0.3.5 requires a peer of grunt@~0.4.5 but none is installed. You must install peer dependencies yourself.

audited 2136 packages in 4.918s

2 packages are looking for funding
run npm fund for details

found 11 vulnerabilities (1 low, 8 moderate, 2 high)
run npm audit fix to fix them, or npm audit for details

You can try to follow my post on Tryton 4.8 install on RedHat 7 - Some icons are not rendered on web interface. It is for CentOS, but I think you can adapt the things to your needs.
What you do, is download a precompiled version of sao and use a script to get the different needed javascript files. As the script is a bit old, you can try new versions of the different files downloaded.

Connect to the server with the browser.

1 Like

Hello ced and edbo,

why i need "What you do, is download a precompiled version of sao " version?

My problem:

https://pastebin.com/Ax4XV8JC

npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

bower eonasdan-bootstrap-datetimepicker#^4.17     invalid-meta for:/tmp/trytfan/bower/76bd398ee7174f6f95c3ab9b1ab3c397-9710-fCgqJo/bower.json
bower eonasdan-bootstrap-datetimepicker#^4.17     invalid-meta The "main" field cannot contain minified files
bower eonasdan-bootstrap-datetimepicker#^4.17     invalid-meta The "main" field cannot contain minified files

papaparse#4.6.3 bower_components/papaparse
npm notice created a lockfile as package-lock.json. You should commit this file.
up to date in 41.221s

If i use in my browser 192.168.178.148 i get “Apache2 Debian Default Page”

Where is my mistake?

You must connect to the trytond server which usually run on port 8000.

If i use http://192.168.178.148:8000/, i get a white site.

I don’t have use the instruction from edbo.

wget http://downloads.tryton.org/5.0/tryton-sao-5.0.4.tgz

Should i use tryton-sao-5.0.4.tgz with my new Debian 10 ?

I only have use this file

wget https://github.com/tryton/sao/archive/5.0.4.zip

Did you know a goog and working how to to install Tryton with sao in Debian 10?

Then you did not follow the README which says

the entry root in the section [web] of trytond.conf must be set
to the directory where the package was unpacked

So the index.html of sao is not served by trytond if it does not know where it is.

Note that the entry root in the section [web] of trytond.conf must be set
to this directory.

I don’t have do this, where is my trytond.conf ?

It is this: /etc/trytond.conf

I don’t have this file.

Did you have a template for the trytond.conf ?

It is wherever you want to put it. You must pass it to trytond with the option -c

No but all sections are described in Configuration file for Tryton — trytond 5.5 documentation

sudo cat  /etc/tryton/trytond.conf  

                                                                                                                                                                           
    # /etc/tryton/trytond.conf - Configuration file for Tryton Server                                                                                                                                                                
    # (trytond, trytond-admin, trytond-cron)                                                                                                                                                                                         
    #                                                                                                                                                                                                                                
    # This file contains the most common settings for trytond (Defaults                                                                                                                                                              
    # are commented).                                                                                                                                                                                                                
    # For more information install the tryton-server-doc package and read
    # /usr/share/doc/tryton-server-doc/html/index.html
    # and accordingly
    # /usr/share/doc/tryton-server-doc/html/topics/configuration.html

    [web]
    # Settings for the web interface

    # The IP/host and port number of the interface
    # (Internal default: localhost:8000)
    #
    # Listen on all interfaces (IPv4)
    #listen = 0.0.0.0:8000
    listen = 192.168.178.148:8000
    #
    # Listen on all interfaces (IPv4 and IPv6)
    #listen = [::]:8000

    # The hostname for this interface
    #hostname = 

    # The root path to retrieve data for GET requests
    # (i.e. namely the path to the web client)
    # (Internal default: /var/www/localhost/tryton)
    root = /usr/share/tryton-sao/www

    # The number of proxy servers in front of trytond.
    #num_proxies = 0

    [database]
    # Database related settings

    # The URI to connect to the SQL database (following RFC-3986)
    # uri = database://username:password@host:port/
    # (Internal default: sqlite:// (i.e. a local SQLite database))
    #
    # PostgreSQL via Unix domain sockets
    # (e.g. PostgreSQL database running on the same machine (localhost))
    #uri = postgresql://tryton:tryton@/
    #
    # PostgreSQL via TCP/IP
    # (e.g. connecting to a PostgreSQL database running on a remote machine or
    # by means of md5 authentication. Needs PostgreSQL to be configured to accept
    # those connections (pg_hba.conf).)
    #uri = postgresql://tryton:tryton@localhost:5432/

    # The path to the directory where the Tryton Server stores files.
    # The server must have write permissions to this directory.
    # (Internal default: /var/lib/trytond)
    path = /var/lib/tryton

    # Shall available databases be listed in the client?
    #list = True

    # The number of retries of the Tryton Server when there are errors 
    # in a request to the database
    #retry = 5

    # The primary language, that is used to store entries in translatable
    # fields in the database.
    #language = en

    [request]
    # The maximum size in bytes for unauthenticated requests (zero means no limit).
    #max_size = 2MB

    # The maximum size in bytes of an authenticated request (zero means no limit).
    #max_size_authenticated = 2GB

    [ssl]
    # SSL settings
    # Activation of SSL for all available protocols.
    # Uncomment the following settings for key and certificate.
    # SSL is activated by defining privatekey.

    # The path to the private key
    #privatekey = /etc/ssl/private/ssl-cert-snakeoil.key

    # The path to the certificate
    #certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem

    [session]
    # Session settings

    # A comma separated list of login methods to use for user authentication.
    # By default, Tryton supports only the password method which compares the
    # password entered by the user against a stored hash.
    # Other modules may define other methods (please refer to their documentation).
    # The methods are tested following the order of the list.
    #authentications = password

    # The time (in seconds) until a session expires.
    #max_age = 2592000   # (30 days)

    # The time (in seconds) until an inactive session is considered invalid for
    # special internal tasks, thus requiring to re-confirm the session.
    #timeout = 300   # (5 minutes)

    # The maximal number of authentication attempts before the server answers
    # unconditionally 'Too Many Requests'.
    # The counting is done on all attempts over one period of timeout.
    #max_attempt = 5

    # The maximal number of authentication attempts from the same network before
    # the server answers unconditionally 'Too Many Requests'.
    # The counting is done on all attempts over a period of timeout.
    #max_attempt_ip_network = 300

    # The network prefix to apply on IPv4 addresses when counting authentication attempts.
    #ip_network_4 = 32

    # The network prefix to apply on IPv6 addresses when counting authentication attempts.
    #ip_network_6 = 56

    [password]
    # The minimal length required for user passwords.
    #length = 8

    # The path to a file containing one forbidden password per line.
    #forbidden = 

    # The ratio of non repeated characters for user passwords.
    #entropy = 0.75

    # The time (in seconds) until a reset password expires.
    #reset_timeout = 86400   # (24h)

    # The path to the INI file to load as CryptContext:
    # <https://passlib.readthedocs.io/en/stable/narr/context-tutorial.html#loading-saving-a-cryptcontext>
    # If no path is set, Tryton will use the schemes `bcrypt` or `pbkdf2_sha512`.
    #passlib = None

    [email]
    # Mail settings

    # The URI to connect to the SMTP server.
    # Available protocols are:
    # - smtp: simple SMTP
    # - smtp+tls: SMTP with STARTTLS
    # - smtps: SMTP with SSL
    #uri = smtp://localhost:25

    # The From address used by the Tryton Server to send emails.
    #from = tryton@localhost

    [attachment]
    # Defines how to store the attachments
    # A boolean value to store attachment in the FileStore.
    #filestore=True

    # The prefix to use with the FileStore.
    #store_prefix = None

    [bus]
    # Allow clients to subscribe to bus channels (Boolean).
    #allow_subscribe = False

    # The time (in seconds) to keep the connection to the client open
    # when using long polling for bus messages.
    #long_polling_timeout = 300

    # The time (in seconds) a message should be kept in the queue
    # before being discarded.
    #cache_timeout = 300

    # The timeout (in seconds) for the select call when listening
    # on a channel.
    #select_timeout = 5

    # Let the worker queue handle bus messages
    #queue = False

    # Define the class to use when queue is set to True
    #class = trytond.bus.LongPollingBus


    # Special Settings
    [cache]
    # Various cache size settings

    # The number of different models kept in the cache per transaction.
    #model = 200

    # The number of loaded records kept in the cache. It can also be changed
    # locally using the _record_cache_size key in Transaction.context.
    #record = 2000

    # The number of fields to load with eager Field.loading.
    #field = 100

    # The minimum number of seconds between two cleanings of the cache.
    #clean_timeout = 300

    [queue]
    # Activate asynchronous processing of the tasks. Otherwise they are performed at the end of the requests.
    #worker = False

    [table]
    # This section allows to override the default generated table names. The main purpose
    # is to bypass name length limitations of a database backend.
    # Examples:
    #account.invoice.line = acc_inv_line
    #account.invoice.tax = acc_inv_tax


    # Module settings
    #
    # Some modules are reading configuration parameters from this
    # configuration file. These settings only apply when those modules
    # are installed.
    #
    [account_fr_chorus]
    # The private key to communicate with the chorus service.
    #privatekey =

    # The certficate to communicate with the chorus service.
    #certificate =

    # Target URL of the Chorus service
    #url = https://chorus-pro.gouv.fr:5443

    [ldap_authentication]
    # The LDAP URL to connect to the server following RFC-2255.
    #uri = ldap://host:port/dn?attributes?scope?filter?extensions
    # A basic default URL could look like
    #uri = ldap://localhost:389/

    # The LDAP password used to bind if needed.
    #bind_pass = 

    # If the LDAP server is an Active Directory.
    #active_directory = False

    # The UID attribute for authentication.
    #uid = uid

    # If the user shall be created in the database in case it does not exist.
    #create_user = False

    [sms_authentication]
    # The fully qualified name of the method to send SMS. It must take three
    # arguments: text, to and from.
    #
    # - The sms method just sends a code via SMS to the user. This code can directly
    #   be used in the login dialog.
    # - The password_sms method sends a code only after the user entered a valid
    #   password (two-factor authentication).
    #
    # Both methods require that the user has a *mobile* phone number defined
    # otherwise he can not be authenticated with those methods.
    #
    # This method is required to send SMS.
    #function = 

    # The number from which the SMS are sent.
    #from =

    # The length of the generated code.
    #length = 6

    # The time to live for the generated codes in seconds.
    #ttl = 300

    # The name used in the SMS text.
    #name = Tryton

    [product]
    # The number of decimals with which the unit prices are stored
    # in the database. The default value is 4.
    # Warning: This setting can not be lowered once a database is created.
    #price_decimal = 4

Can i use this instruction?

So have you put sao in this directory?

Helle ced, i’m a noob. :frowning:

I don’t have the directory “/usr/share/tryton-sao/www”.

I need a step by step instruction.

Thank you.

Either you must your sao checkout there or you change the configuration to point to your checkout folder.