Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2017-06-12 15:34:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Mon Jun 12 15:34:26 2017 rev:8 rq:502812 version:3.8.12 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2017-04-06 11:02:53.965230199 +0200 +++ /work/SRC/openSUSE:Factory/.trytond.new/trytond.changes 2017-06-12 15:34:30.826741694 +0200 @@ -1,0 +2,5 @@ +Tue Jun 6 21:12:54 UTC 2017 - [email protected] + +- Version 3.8.12 + +------------------------------------------------------------------- Old: ---- trytond-3.8.11.tar.gz New: ---- trytond-3.8.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.Bu5Izi/_old 2017-06-12 15:34:31.538641286 +0200 +++ /var/tmp/diff_new_pack.Bu5Izi/_new 2017-06-12 15:34:31.542640722 +0200 @@ -20,7 +20,7 @@ %define majorver 3.8 %define base_name tryton Name: trytond -Version: %{majorver}.11 +Version: %{majorver}.12 Release: 0 Summary: An Enterprise Resource Planning system License: GPL-3.0+ ++++++ trytond-3.8.11.tar.gz -> trytond-3.8.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/CHANGELOG new/trytond-3.8.12/CHANGELOG --- old/trytond-3.8.11/CHANGELOG 2017-04-03 19:22:11.000000000 +0200 +++ new/trytond-3.8.12/CHANGELOG 2017-06-05 23:36:28.000000000 +0200 @@ -1,3 +1,6 @@ +Version 3.8.12 - 2017-06-05 +* Bug fixes (see mercurial logs for details) + Version 3.8.11 - 2017-04-03 * Bug fixes (see mercurial logs for details) * Sanitize path in file_open against suffix (CVE-2017-0360) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/PKG-INFO new/trytond-3.8.12/PKG-INFO --- old/trytond-3.8.11/PKG-INFO 2017-04-03 19:22:25.000000000 +0200 +++ new/trytond-3.8.12/PKG-INFO 2017-06-05 23:36:29.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond -Version: 3.8.11 +Version: 3.8.12 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/setup.cfg new/trytond-3.8.12/setup.cfg --- old/trytond-3.8.11/setup.cfg 2017-04-03 19:22:25.000000000 +0200 +++ new/trytond-3.8.12/setup.cfg 2017-06-05 23:36:29.000000000 +0200 @@ -1,5 +1,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/trytond/__init__.py new/trytond-3.8.12/trytond/__init__.py --- old/trytond-3.8.11/trytond/__init__.py 2017-03-10 10:13:27.000000000 +0100 +++ new/trytond-3.8.12/trytond/__init__.py 2017-04-03 19:22:49.000000000 +0200 @@ -4,7 +4,7 @@ import time from email import charset -__version__ = "3.8.11" +__version__ = "3.8.12" os.environ['TZ'] = 'UTC' if hasattr(time, 'tzset'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/trytond/backend/sqlite/database.py new/trytond-3.8.12/trytond/backend/sqlite/database.py --- old/trytond-3.8.11/trytond/backend/sqlite/database.py 2016-04-08 23:36:18.000000000 +0200 +++ new/trytond-3.8.12/trytond/backend/sqlite/database.py 2017-06-05 23:36:26.000000000 +0200 @@ -22,7 +22,7 @@ from sqlite3 import OperationalError as DatabaseOperationalError from sql import Flavor, Table from sql.functions import (Function, Extract, Position, Substring, - Overlay, CharLength, CurrentTimestamp) + Overlay, CharLength, CurrentTimestamp, Trim) __all__ = ['Database', 'DatabaseIntegrityError', 'DatabaseOperationalError', 'Cursor'] @@ -143,6 +143,27 @@ _function = 'NOW' # More precise +class SQLiteTrim(Trim): + + def __str__(self): + flavor = Flavor.get() + param = flavor.param + + function = { + 'BOTH': 'TRIM', + 'LEADING': 'LTRIM', + 'TRAILING': 'RTRIM', + }[self.position] + + def format(arg): + if isinstance(arg, basestring): + return param + else: + return str(arg) + return function + '(%s, %s)' % ( + format(self.string), format(self.characters)) + + def sign(value): if value > 0: return 1 @@ -159,6 +180,7 @@ Overlay: SQLiteOverlay, CharLength: SQLiteCharLength, CurrentTimestamp: SQLiteCurrentTimestamp, + Trim: SQLiteTrim, } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/trytond/ir/translation.py new/trytond-3.8.12/trytond/ir/translation.py --- old/trytond-3.8.11/trytond/ir/translation.py 2016-12-17 16:54:43.000000000 +0100 +++ new/trytond-3.8.12/trytond/ir/translation.py 2017-06-05 23:36:26.000000000 +0200 @@ -424,7 +424,7 @@ if not Transaction().context.get( 'fuzzy_translation', False): for obj_id in ids: - trans = cls._translation_cache.get((lang, ttype, name, obj_id), + trans = cls._translation_cache.get((name, ttype, lang, obj_id), -1) if trans != -1: translations[obj_id] = trans @@ -461,7 +461,7 @@ translations[res_id] = value for res_id in ids: if res_id not in translations: - cls._translation_cache.set((lang, ttype, name, res_id), False) + cls._translation_cache.set((name, ttype, lang, res_id), False) translations[res_id] = False return translations @@ -655,7 +655,7 @@ lang = unicode(lang) if source is not None: source = unicode(source) - trans = cls._translation_cache.get((lang, ttype, name, source), -1) + trans = cls._translation_cache.get((name, ttype, lang, source), -1) if trans != -1: res[(name, ttype, lang, source)] = trans else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/trytond/model/fields/field.py new/trytond-3.8.12/trytond/model/fields/field.py --- old/trytond-3.8.11/trytond/model/fields/field.py 2016-04-08 23:36:17.000000000 +0200 +++ new/trytond-3.8.12/trytond/model/fields/field.py 2017-06-05 23:36:26.000000000 +0200 @@ -64,6 +64,21 @@ 'size must return integer' +def _set_value(record, field): + try: + field, nested = field.split('.', 1) + except ValueError: + nested = None + if field.startswith('_parent_'): + field = field[8:] # Strip '_parent_' + if not hasattr(record, field): + setattr(record, field, None) + elif nested: + parent = getattr(record, field) + if parent: + _set_value(parent, nested) + + def depends(*fields, **kwargs): methods = kwargs.pop('methods', None) assert not kwargs @@ -81,11 +96,7 @@ @wraps(func) def wrapper(self, *args, **kwargs): for field in fields: - field = field.split('.')[0] - if field.startswith('_parent_'): - field = field[8:] # Strip '_parent_' - if not hasattr(self, field): - setattr(self, field, None) + _set_value(self, field) return func(self, *args, **kwargs) return wrapper return decorator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/trytond/model/fields/many2one.py new/trytond-3.8.12/trytond/model/fields/many2one.py --- old/trytond-3.8.11/trytond/model/fields/many2one.py 2016-04-08 23:36:17.000000000 +0200 +++ new/trytond-3.8.12/trytond/model/fields/many2one.py 2017-06-05 23:36:26.000000000 +0200 @@ -1,7 +1,9 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from types import NoneType -from sql import Query, Expression, Literal +from sql import Query, Expression, Literal, Column +from sql.aggregate import Max +from sql.conditionals import Coalesce from sql.operators import Or from .field import Field, SQLType @@ -226,13 +228,27 @@ Target = self.get_target() table, _ = tables[None] target_tables = tables.get(self.name) + context = Transaction().context if target_tables is None: - if Target._history and Transaction().context.get('_datetime'): + if Target._history and context.get('_datetime'): target = Target.__table_history__() + target_history = Target.__table_history__() + history_condition = Column(target, '__id').in_( + target_history.select( + Max(Column(target_history, '__id')), + where=Coalesce( + target_history.write_date, + target_history.create_date) + <= context['_datetime'], + group_by=target_history.id)) else: target = Target.__table__() + history_condition = None + condition = target.id == self.sql_column(table) + if history_condition: + condition &= history_condition target_tables = { - None: (target, target.id == self.sql_column(table)), + None: (target, condition), } tables[self.name] = target_tables return target_tables diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-3.8.11/trytond.egg-info/PKG-INFO new/trytond-3.8.12/trytond.egg-info/PKG-INFO --- old/trytond-3.8.11/trytond.egg-info/PKG-INFO 2017-04-03 19:22:21.000000000 +0200 +++ new/trytond-3.8.12/trytond.egg-info/PKG-INFO 2017-06-05 23:36:29.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond -Version: 3.8.11 +Version: 3.8.12 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton
