Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2018-01-13 21:49:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Sat Jan 13 21:49:29 2018 rev:15 rq:563932 version:4.2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2017-12-14 11:01:42.583372977 +0100 +++ /work/SRC/openSUSE:Factory/.trytond.new/trytond.changes 2018-01-13 21:49:30.828854105 +0100 @@ -1,0 +2,5 @@ +Fri Jan 5 19:59:52 UTC 2018 - [email protected] + +- Version 4.2.9 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-4.2.8.tar.gz New: ---- trytond-4.2.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.K9BvgX/_old 2018-01-13 21:49:31.696813637 +0100 +++ /var/tmp/diff_new_pack.K9BvgX/_new 2018-01-13 21:49:31.700813450 +0100 @@ -1,7 +1,7 @@ # # spec file for package trytond # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2015, 2016 Dr. Axel Braun # # All modifications and additions to the file contributed by third parties @@ -20,7 +20,7 @@ %define majorver 4.2 %define base_name tryton Name: trytond -Version: %{majorver}.8 +Version: %{majorver}.9 Release: 0 Summary: An Enterprise Resource Planning (ERP) system ++++++ trytond-4.2.8.tar.gz -> trytond-4.2.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.2.8/.hgtags new/trytond-4.2.9/.hgtags --- old/trytond-4.2.8/.hgtags 2017-12-04 23:58:19.000000000 +0100 +++ new/trytond-4.2.9/.hgtags 2018-01-04 23:49:34.000000000 +0100 @@ -23,3 +23,4 @@ 52447cdf4482dce5bc76ea26b7b7fc5f82361644 4.2.6 5f301276879f4fe742f998fa483c83126a8b3a4a 4.2.7 6162731451b1515b645a72332d19c4e83e207f15 4.2.8 +1f035cc6f6bc9af970d6db658c1acb3b0b211916 4.2.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.2.8/CHANGELOG new/trytond-4.2.9/CHANGELOG --- old/trytond-4.2.8/CHANGELOG 2017-12-04 23:58:19.000000000 +0100 +++ new/trytond-4.2.9/CHANGELOG 2018-01-04 23:49:34.000000000 +0100 @@ -1,3 +1,6 @@ +Version 4.2.9 - 2018-01-04 +* Bug fixes (see mercurial logs for details) + Version 4.2.8 - 2017-12-04 * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.2.8/COPYRIGHT new/trytond-4.2.9/COPYRIGHT --- old/trytond-4.2.8/COPYRIGHT 2017-12-04 23:58:19.000000000 +0100 +++ new/trytond-4.2.9/COPYRIGHT 2018-01-04 23:49:33.000000000 +0100 @@ -1,7 +1,7 @@ Copyright (C) 2004-2008 Tiny SPRL. -Copyright (C) 2007-2017 Cédric Krier. +Copyright (C) 2007-2018 Cédric Krier. Copyright (C) 2007-2013 Bertrand Chenal. -Copyright (C) 2008-2017 B2CK SPRL. +Copyright (C) 2008-2018 B2CK SPRL. Copyright (C) 2011 Openlabs Technologies & Consulting (P) Ltd. Copyright (C) 2011-2017 Nicolas Évrard. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.2.8/PKG-INFO new/trytond-4.2.9/PKG-INFO --- old/trytond-4.2.8/PKG-INFO 2017-12-04 23:58:20.000000000 +0100 +++ new/trytond-4.2.9/PKG-INFO 2018-01-04 23:49:35.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond -Version: 4.2.8 +Version: 4.2.9 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.2.8/trytond/__init__.py new/trytond-4.2.9/trytond/__init__.py --- old/trytond-4.2.8/trytond/__init__.py 2017-11-07 16:54:03.000000000 +0100 +++ new/trytond-4.2.9/trytond/__init__.py 2017-12-04 23:58:55.000000000 +0100 @@ -5,7 +5,7 @@ import logging from email import charset -__version__ = "4.2.8" +__version__ = "4.2.9" logger = logging.getLogger(__name__) os.environ['TZ'] = 'UTC' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.2.8/trytond/model/fields/field.py new/trytond-4.2.9/trytond/model/fields/field.py --- old/trytond-4.2.8/trytond/model/fields/field.py 2017-05-03 18:52:26.000000000 +0200 +++ new/trytond-4.2.9/trytond/model/fields/field.py 2018-01-04 23:49:32.000000000 +0100 @@ -337,10 +337,9 @@ class FieldTranslate(Field): def _get_translation_join(self, Model, name, - translation, model, table): - language = Transaction().language + translation, model, table, from_, language): if Model.__name__ == 'ir.model': - return table.join(translation, 'LEFT', + return from_.join(translation, 'LEFT', condition=(translation.name == Concat(Concat( table.model, ','), name)) & (translation.res_id == -1) @@ -352,7 +351,7 @@ type_ = 'field' else: type_ = 'help' - return table.join(model, 'LEFT', + return from_.join(model, 'LEFT', condition=model.id == table.model).join( translation, 'LEFT', condition=(translation.name == Concat(Concat( @@ -362,7 +361,7 @@ & (translation.type == type_) & (translation.fuzzy == False)) else: - return table.join(translation, 'LEFT', + return from_.join(translation, 'LEFT', condition=(translation.res_id == table.id) & (translation.name == '%s,%s' % (Model.__name__, name)) & (translation.lang == language) @@ -370,6 +369,7 @@ & (translation.fuzzy == False)) def convert_domain(self, domain, tables, Model): + from trytond.tools import get_parent_language pool = Pool() Translation = pool.get('ir.translation') IrModel = pool.get('ir.model') @@ -377,16 +377,20 @@ return super(FieldTranslate, self).convert_domain( domain, tables, Model) - table = Model.__table__() - translation = Translation.__table__() + table = join = Model.__table__() model = IrModel.__table__() name, operator, value = domain - join = self._get_translation_join(Model, name, - translation, model, table) + language = Transaction().language + column = None + while language: + translation = Translation.__table__() + join = self._get_translation_join( + Model, name, translation, model, table, join, language) + column = Coalesce(NullIf(column, ''), translation.value) + language = get_parent_language(language) + column = Coalesce(NullIf(column, ''), self.sql_column(table)) Operator = SQL_OPERATORS[operator] assert name == self.name - column = Coalesce(NullIf(translation.value, ''), - self.sql_column(table)) where = Operator(column, self._domain_value(operator, value)) if isinstance(where, operators.In) and not where.right: where = Literal(False) @@ -396,6 +400,7 @@ return tables[None][0].id.in_(join.select(table.id, where=where)) def convert_order(self, name, tables, Model): + from trytond.tools import get_parent_language pool = Pool() Translation = pool.get('ir.translation') IrModel = pool.get('ir.model') @@ -405,30 +410,36 @@ assert name == self.name table, _ = tables[None] - key = name + '.translation' - if key not in tables: - translation = Translation.__table__() - model = IrModel.__table__() - join = self._get_translation_join(Model, name, - translation, model, table) - if join.left == table: - tables[key] = { - None: (join.right, join.condition), - } - else: - tables[key] = { - None: (join.left.right, join.left.condition), - 'translation': { + + join = table + language = Transaction().language + column = None + while language: + key = name + '.translation-' + language + if key not in tables: + translation = Translation.__table__() + model = IrModel.__table__() + join = self._get_translation_join( + Model, name, translation, model, table, table, language) + if join.left == table: + tables[key] = { None: (join.right, join.condition), - }, - } - else: - if 'translation' not in tables[key]: - translation, _ = tables[key][None] + } + else: + tables[key] = { + None: (join.left.right, join.left.condition), + 'translation': { + None: (join.right, join.condition), + }, + } else: - translation, _ = tables[key]['translation'][None] + if 'translation' not in tables[key]: + translation, _ = tables[key][None] + else: + translation, _ = tables[key]['translation'][None] + column = Coalesce(NullIf(column, ''), translation.value) + language = get_parent_language(language) - return [Coalesce(NullIf(translation.value, ''), - self.sql_column(table))] + return [Coalesce(column, self.sql_column(table))] SQLType = namedtuple('SQLType', 'base type') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-4.2.8/trytond.egg-info/PKG-INFO new/trytond-4.2.9/trytond.egg-info/PKG-INFO --- old/trytond-4.2.8/trytond.egg-info/PKG-INFO 2017-12-04 23:58:20.000000000 +0100 +++ new/trytond-4.2.9/trytond.egg-info/PKG-INFO 2018-01-04 23:49:35.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond -Version: 4.2.8 +Version: 4.2.9 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton
