[tryton-debian-vcs] tryton-server branch upstream updated. upstream/4.2.0-1-ge08b1b0

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Jan 5 10:59:11 UTC 2017


The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=upstream/4.2.0-1-ge08b1b0

commit e08b1b0c99101598870cc79e67313429b9b187ae
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jan 4 12:31:06 2017 +0100

    Adding upstream version 4.2.1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 7b55a92..5fc5c66 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.1 - 2017-01-03
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.0 - 2016-11-28
 * Bug fixes (see mercurial logs for details)
 * Add toolbar attribute for richtext widget
diff --git a/PKG-INFO b/PKG-INFO
index 2b22a12..f7b73b1 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond.egg-info/PKG-INFO b/trytond.egg-info/PKG-INFO
index 2b22a12..f7b73b1 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/__init__.py b/trytond/__init__.py
index 101edfb..667468b 100644
--- a/trytond/__init__.py
+++ b/trytond/__init__.py
@@ -5,7 +5,7 @@ import time
 import logging
 from email import charset
 
-__version__ = "4.2.0"
+__version__ = "4.2.1"
 logger = logging.getLogger(__name__)
 
 os.environ['TZ'] = 'UTC'
diff --git a/trytond/config.py b/trytond/config.py
index 635fd7e..0ee5eec 100644
--- a/trytond/config.py
+++ b/trytond/config.py
@@ -68,7 +68,9 @@ class TrytonConfigParser(ConfigParser.RawConfigParser):
         self.update_etc()
 
     def update_etc(self, configfile=os.environ.get('TRYTOND_CONFIG')):
-        if not configfile:
+        if isinstance(configfile, basestring):
+            configfile = [configfile]
+        if not configfile or not filter(None, configfile):
             return
         read_files = self.read(configfile)
         logger.info('using %s as configuration files', ', '.join(read_files))
diff --git a/trytond/ir/translation.py b/trytond/ir/translation.py
index fdda7f7..952bdaf 100644
--- a/trytond/ir/translation.py
+++ b/trytond/ir/translation.py
@@ -514,16 +514,16 @@ class Translation(ModelSQL, ModelView):
                 else:
                     return record.model + ',' + field_name
 
-            translations = {}
-            for translation in cls.search([
-                        ('lang', '=', lang),
-                        ('type', '=', ttype),
-                        ('name', 'in', [get_name(r) for r in records]),
-                        ]):
-                translations[translation.name] = translation
-
-            to_save = []
             with Transaction().set_context(_check_access=False):
+                translations = {}
+                for translation in cls.search([
+                            ('lang', '=', lang),
+                            ('type', '=', ttype),
+                            ('name', 'in', [get_name(r) for r in records]),
+                            ]):
+                    translations[translation.name] = translation
+
+                to_save = []
                 for record, value in izip(records, values):
                     translation = translations.get(get_name(record))
                     if not translation:
@@ -543,28 +543,28 @@ class Translation(ModelSQL, ModelView):
             records = Model.browse(ids)
 
         translations = {}
-        for translation in cls.search([
-                    ('lang', '=', lang),
-                    ('type', '=', ttype),
-                    ('name', '=', name),
-                    ('res_id', 'in', ids),
-                    ]):
-            translations[translation.res_id] = translation
-
-        other_translations = {}
-        if (lang == Config.get_language()
-                and Transaction().context.get('fuzzy_translation', True)):
+        with Transaction().set_context(_check_access=False):
             for translation in cls.search([
-                        ('lang', '!=', lang),
+                        ('lang', '=', lang),
                         ('type', '=', ttype),
                         ('name', '=', name),
                         ('res_id', 'in', ids),
                         ]):
-                other_translations.setdefault(translation.res_id, []
-                    ).append(translation)
+                translations[translation.res_id] = translation
+
+            other_translations = {}
+            if (lang == Config.get_language()
+                    and Transaction().context.get('fuzzy_translation', True)):
+                for translation in cls.search([
+                            ('lang', '!=', lang),
+                            ('type', '=', ttype),
+                            ('name', '=', name),
+                            ('res_id', 'in', ids),
+                            ]):
+                    other_translations.setdefault(translation.res_id, []
+                        ).append(translation)
 
-        to_save = []
-        with Transaction().set_context(_check_access=False):
+            to_save = []
             for record, value in izip(records, values):
                 translation = translations.get(record.id)
                 if not translation:
-- 
tryton-server



More information about the tryton-debian-vcs mailing list