Tryton ERP MySQL installation

此生再无相见时 提交于 2019-12-11 18:32:55

问题


I'm trying to install Tryton ERP with MySQL as the database. It's not quite clear what you are meant to do.

From the config documentation you simply supply the uri to the database under the [database] section:

[database] uri = mysql://user:pass@localhost:3306

However running trytond -v -c /home/user/.config/tryton/3.8/tryton.conf does not seem to get it working. When trying to access the 127.0.0.1:8050 where I've got Tryton running, I simply get 127.0.0.1 - - [23/Nov/2015 16:55:10] code 404, message File not found

One would assume, Tryton either installs the database on its own or you need to create yourself somehow but I didn't see any documentation surrounding that.

I've also trying adding a database through the Tryton GUI, it encounters the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tryton/gui/window/dbcreate.py", line 65, in server_change
    common.refresh_langlist(self.combo_language, host, port)
  File "/usr/local/lib/python2.7/dist-packages/tryton/common/common.py", line 253, in refresh_langlist
    lang_list = rpc.db_exec(host, port, 'list_lang')
  File "/usr/local/lib/python2.7/dist-packages/tryton/rpc.py", line 57, in db_exec
    result = getattr(connection.common.db, method)(None, None, *args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python2.7/dist-packages/tryton/jsonrpc.py", line 271, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1306, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
    return u.close()
  File "/usr/local/lib/python2.7/dist-packages/tryton/jsonrpc.py", line 134, in close
    return json.loads(self.data, object_hook=object_hook)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 505, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 389, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Expecting value: line 1 column 2 (char 1)

I've got the prerequisites installed that were listed here and MySQL-python package installed, should there be anything else?


回答1:


You should create a database on MySQL with it's own tools. Once the database is created you must initialize it using the following command:

trytond -c <config_file> -d <database name> --all

See for complete reference:

http://doc.tryton.org/3.8/trytond/doc/topics/setup_database.html#topics-setup-database.

Once finished, the server will ask for an admin password. Once entered you can conect using the tryton client with the admin user and the entered password.

In order to access tryton from web client you must install and configure the sao web interface, that can be found on:

https://www.npmjs.com/package/tryton-sao



来源:https://stackoverflow.com/questions/33876789/tryton-erp-mysql-installation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!