Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2019-06-01 09:48:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Sat Jun 1 09:48:04 2019 rev:31 rq:705909 version:4.6.15 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2019-02-24 17:18:08.996421165 +0100 +++ /work/SRC/openSUSE:Factory/.trytond.new.5148/trytond.changes 2019-06-01 09:48:07.131352573 +0200 @@ -1,0 +2,5 @@ +Fri May 17 10:31:11 UTC 2019 - Axel Braun <[email protected]> + +- Version 4.6.15 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-4.6.13.tar.gz New: ---- trytond-4.6.15.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.ZDZP6I/_old 2019-06-01 09:48:07.903352309 +0200 +++ /var/tmp/diff_new_pack.ZDZP6I/_new 2019-06-01 09:48:07.907352308 +0200 @@ -20,7 +20,7 @@ %define majorver 4.6 %define base_name tryton Name: trytond -Version: %{majorver}.13 +Version: %{majorver}.15 Release: 0 Summary: An Enterprise Resource Planning (ERP) system ++++++ tryton-server.README.SUSE ++++++ --- /var/tmp/diff_new_pack.ZDZP6I/_old 2019-06-01 09:48:08.043352262 +0200 +++ /var/tmp/diff_new_pack.ZDZP6I/_new 2019-06-01 09:48:08.043352262 +0200 @@ -160,23 +160,9 @@ As result you will have a bare Tryton database with the base modules installed. -See: http://doc.tryton.org/4.2/trytond/doc/topics/configuration.html +See: http://doc.tryton.org/4.6/trytond/doc/topics/configuration.html -Installation of the Webfrontend for tryton (sao) from package -------------------------------------------------------------- - -For most openSUSE Flavours tryton-sao is packed. You can install it with - > zypper install tryton-sao - -You need to edit /etc/tryton/trytond.conf. Installation of tryton-sao follows the -standards for nodejs-installations, so the path is within the node-modules: - -In the section [web], set the path: - root = /usr/lib/node-modules/tryton-sao - -Now restart trytond. - Installation of the Webfrontend for tryton (sao) from source ------------------------------------------------------------ @@ -251,7 +237,7 @@ * Only the same major version of Tryton client and Tryton server can connect. - -- Axel Braun <[email protected]> MON Jun 11 10:27:14 UTC 2018 + -- Axel Braun <[email protected]> März 20, 2019, 19:20:02 This file is based on tryton-server.README.Debian ++++++ trytond-4.6.13.tar.gz -> trytond-4.6.15.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/.hgtags new/trytond-4.6.15/.hgtags --- old/trytond-4.6.13/.hgtags 2019-02-19 21:36:25.000000000 +0100 +++ new/trytond-4.6.15/.hgtags 2019-04-22 10:24:20.000000000 +0200 @@ -30,3 +30,5 @@ 7a9cd116456e44ab424e84e8449281ee54f9d37c 4.6.11 2df97bd1d3af946c8a0af4c96a0661c2c1213e23 4.6.12 59030dbfa9eb91e5c62702d07aa364f73ad31f83 4.6.13 +91b7ec49a0ed1e1424bce8c34f367654588037d0 4.6.14 +aa0e0a0ce2e1e00da1fbbd840f5aa9f571caced5 4.6.15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/CHANGELOG new/trytond-4.6.15/CHANGELOG --- old/trytond-4.6.13/CHANGELOG 2019-02-19 21:36:25.000000000 +0100 +++ new/trytond-4.6.15/CHANGELOG 2019-04-22 10:24:20.000000000 +0200 @@ -1,3 +1,11 @@ +Version 4.6.15 - 2019-04-22 +* Bug fixes (see mercurial logs for details) +* Replace dsn by params to connect to postgresql + +Version 4.6.14 - 2019-04-02 +* Bug fixes (see mercurial logs for details) +* Check read access on field in search order (issue8189) + Version 4.6.13 - 2019-02-19 * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/PKG-INFO new/trytond-4.6.15/PKG-INFO --- old/trytond-4.6.13/PKG-INFO 2019-02-19 21:36:26.000000000 +0100 +++ new/trytond-4.6.15/PKG-INFO 2019-04-22 10:24:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 4.6.13 +Version: 4.6.15 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/doc/ref/models/models.rst new/trytond-4.6.15/doc/ref/models/models.rst --- old/trytond-4.6.13/doc/ref/models/models.rst 2018-08-20 22:55:19.000000000 +0200 +++ new/trytond-4.6.15/doc/ref/models/models.rst 2019-03-28 19:53:23.000000000 +0100 @@ -322,8 +322,7 @@ Create records for all values in ``datas``. The field names of values must be defined in ``fields_names``. - It returns a tuple containing: the number of records imported, the last values - if failed, the exception if failed and the warning if failed. + It returns the number of imported records. .. classmethod:: ModelStorage.check_xml_record(records, values) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/doc/ref/rpc.rst new/trytond-4.6.15/doc/ref/rpc.rst --- old/trytond-4.6.13/doc/ref/rpc.rst 2018-08-20 22:55:11.000000000 +0200 +++ new/trytond-4.6.15/doc/ref/rpc.rst 2019-04-10 19:11:49.000000000 +0200 @@ -7,7 +7,7 @@ .. class:: RPC([readonly[, instantiate[, result[, check_access[, unique]]]]]) -RPC is an object to define the behavior of Remote Procedur Call. +RPC is an object to define the behavior of Remote Procedure Call. Instance attributes are: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/trytond/__init__.py new/trytond-4.6.15/trytond/__init__.py --- old/trytond-4.6.13/trytond/__init__.py 2019-01-22 22:15:51.000000000 +0100 +++ new/trytond-4.6.15/trytond/__init__.py 2019-04-02 21:34:23.000000000 +0200 @@ -5,7 +5,7 @@ import warnings from email import charset -__version__ = "4.6.13" +__version__ = "4.6.15" os.environ['TZ'] = 'UTC' if hasattr(time, 'tzset'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/trytond/backend/postgresql/database.py new/trytond-4.6.15/trytond/backend/postgresql/database.py --- old/trytond-4.6.13/trytond/backend/postgresql/database.py 2018-08-20 22:55:19.000000000 +0200 +++ new/trytond-4.6.15/trytond/backend/postgresql/database.py 2019-04-16 22:25:48.000000000 +0200 @@ -92,22 +92,27 @@ minconn = config.getint('database', 'minconn', default=1) maxconn = config.getint('database', 'maxconn', default=64) inst._connpool = ThreadedConnectionPool( - minconn, maxconn, cls.dsn(name), - cursor_factory=LoggingCursor) - + minconn, maxconn, + cursor_factory=LoggingCursor, + **cls._connection_params(name)) cls._databases[name] = inst return inst @classmethod - def dsn(cls, name): + def _connection_params(cls, name): uri = parse_uri(config.get('database', 'uri')) - host = uri.hostname and "host=%s" % uri.hostname or '' - port = uri.port and "port=%s" % uri.port or '' - name = "dbname=%s" % name - user = uri.username and "user=%s" % uri.username or '' - password = ("password=%s" % urllib.unquote_plus(uri.password) - if uri.password else '') - return '%s %s %s %s %s' % (host, port, name, user, password) + params = { + 'dbname': name, + } + if uri.username: + params['user'] = uri.username + if uri.password: + params['password'] = urllib.unquote_plus(uri.password) + if uri.hostname: + params['host'] = uri.hostname + if uri.port: + params['port'] = uri.port + return params def connect(self): return self @@ -178,7 +183,8 @@ res = [] for db_name, in cursor: try: - with connect(self.dsn(db_name)) as conn: + with connect(**self._connection_params(db_name) + ) as conn: if self._test(conn): res.append(db_name) except Exception: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/trytond/model/modelstorage.py new/trytond-4.6.15/trytond/model/modelstorage.py --- old/trytond-4.6.13/trytond/model/modelstorage.py 2018-11-12 17:58:19.000000000 +0100 +++ new/trytond-4.6.15/trytond/model/modelstorage.py 2019-04-02 21:33:46.000000000 +0200 @@ -383,7 +383,7 @@ ModelAccess.check(cls.__name__, 'read') - def check(domain, cls, to_check): + def check_domain(domain, cls, to_check): if is_leaf(domain): local, relate = (domain[0].split('.', 1) + [None])[:2] to_check[cls.__name__].add(local) @@ -393,16 +393,29 @@ else: target = cls._fields[local].get_target() target_domain = [(relate,) + tuple(domain[1:])] - check(target_domain, target, to_check) + check_domain(target_domain, target, to_check) elif not domain: return else: i = 1 if domain[0] in ['OR', 'AND'] else 0 for d in domain[i:]: - check(d, cls, to_check) + check_domain(d, cls, to_check) + + def check_order(order, cls, to_check): + if not order: + return + for oexpr, otype in order: + local, _, relate = oexpr.partition('.') + to_check[cls.__name__].add(local) + if relate: + target = cls._fields[local].get_target() + target_order = [(relate, otype)] + check_order(target_order, target, to_check) + if transaction.user and transaction.context.get('_check_access'): to_check = defaultdict(set) - check(domain, cls, to_check) + check_domain(domain, cls, to_check) + check_order(order, cls, to_check) for name, fields_names in to_check.items(): ModelAccess.check(name, 'read') ModelFieldAccess.check(name, fields_names, 'read') @@ -670,11 +683,10 @@ return res @memoize(1000) - def get_by_id(value, field): + def get_by_id(value, field, ftype): if not value: return None relation = None - ftype = fields_def[field[-1][:-3]]['type'] if ftype == 'many2many': value = csv.reader(value.splitlines(), delimiter=',', quoting=csv.QUOTE_NONE, escapechar='\\').next() @@ -717,7 +729,8 @@ is_prefix_len = (len(field) == (prefix_len + 1)) value = line[i] if is_prefix_len and field[-1].endswith(':id'): - row[field[0][:-3]] = get_by_id(value, field) + ftype = fields_def[field[-1][:-3]]['type'] + row[field[0][:-3]] = get_by_id(value, field, ftype) elif is_prefix_len and ':lang=' in field[-1]: field_name, lang = field[-1].split(':lang=') translate.setdefault(lang, {})[field_name] = value or False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/trytond/model/modelview.py new/trytond-4.6.15/trytond/model/modelview.py --- old/trytond-4.6.13/trytond/model/modelview.py 2018-08-20 22:55:19.000000000 +0200 +++ new/trytond-4.6.15/trytond/model/modelview.py 2019-03-28 19:53:23.000000000 +0100 @@ -238,7 +238,6 @@ if view.inherit: inherit_view_id = view.id view = view.inherit - view_id = view.id # if a view was found if view: @@ -250,17 +249,18 @@ # Check if view is not from an inherited model if view.model != cls.__name__: Inherit = pool.get(view.model) - result['arch'] = Inherit.fields_view_get( - result['view_id'])['arch'] - view_id = inherit_view_id + result['arch'] = Inherit.fields_view_get(view.id)['arch'] + real_view_id = inherit_view_id + else: + real_view_id = view.id # get all views which inherit from (ie modify) this view views = View.search([ 'OR', [ - ('inherit', '=', view_id), + ('inherit', '=', real_view_id), ('model', '=', cls.__name__), ], [ - ('id', '=', view_id), + ('id', '=', real_view_id), ('inherit', '!=', None), ], ]) @@ -320,7 +320,7 @@ result['type'] = view_type result['arch'] = xml result['field_childs'] = None - result['view_id'] = 0 + result['view_id'] = view_id # Update arch and compute fields from arch parser = etree.XMLParser(remove_blank_text=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.6.13/trytond.egg-info/PKG-INFO new/trytond-4.6.15/trytond.egg-info/PKG-INFO --- old/trytond-4.6.13/trytond.egg-info/PKG-INFO 2019-02-19 21:36:26.000000000 +0100 +++ new/trytond-4.6.15/trytond.egg-info/PKG-INFO 2019-04-22 10:24:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 4.6.13 +Version: 4.6.15 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton
