[tryton-debian-vcs] tryton-server branch upstream updated. upstream/3.4.2-1-gb1a0088

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Tue Mar 31 12:45:37 UTC 2015


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/3.4.2-1-gb1a0088

commit b1a0088f55ed8deea42b85b5dbf4fb014aea2487
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Mar 31 14:25:00 2015 +0200

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

diff --git a/CHANGELOG b/CHANGELOG
index b1c26ec..8aa419c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.3 - 2015-03-30
+* Bug fixes (see mercurial logs for details)
+
 Version 3.4.2 - 2015-02-16
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 87e6093..b0a810f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 3.4.2
+Version: 3.4.3
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/doc/topics/configuration.rst b/doc/topics/configuration.rst
index a187c0b..3ca33b1 100644
--- a/doc/topics/configuration.rst
+++ b/doc/topics/configuration.rst
@@ -8,6 +8,10 @@ The configuration file control some aspects of the behavior of Tryton.
 The file uses a simple ini-file format. It consists of sections, led by a
 `[section]` header and followed by `name = value` entries:
 
+.. highlight:: ini
+
+::
+
     [database]
     uri = postgresql://user:password@localhost/
     path = /var/lib/trytond
diff --git a/trytond.egg-info/PKG-INFO b/trytond.egg-info/PKG-INFO
index 87e6093..b0a810f 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 3.4.2
+Version: 3.4.3
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/ir/model.py b/trytond/ir/model.py
index 53855a1..2217dc8 100644
--- a/trytond/ir/model.py
+++ b/trytond/ir/model.py
@@ -561,7 +561,13 @@ class ModelAccess(ModelSQL, ModelView):
         elif field._type == 'reference':
             selection = field.selection
             if isinstance(selection, basestring):
-                selection = getattr(Model, field.selection)()
+                sel_func = getattr(Model, field.selection)
+                if (not hasattr(sel_func, 'im_self')
+                        or sel_func.im_self):
+                    selection = sel_func()
+                else:
+                    # XXX Can not check access right on instance method
+                    selection = []
             for model_name, _ in selection:
                 if not cls.check(model_name, mode=mode,
                         raise_exception=False):
diff --git a/trytond/model/fields/reference.py b/trytond/model/fields/reference.py
index e4a4079..19db451 100644
--- a/trytond/model/fields/reference.py
+++ b/trytond/model/fields/reference.py
@@ -1,6 +1,8 @@
 #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
+import warnings
+
 from sql import Cast, Literal, Query, Expression
 from sql.functions import Substring, Position
 
@@ -31,8 +33,12 @@ class Reference(Field):
             select=select, on_change=on_change, on_change_with=on_change_with,
             depends=depends, context=context, loading=loading)
         self.selection = selection or None
-        self.selection_change_with = selection_change_with
-
+        self.selection_change_with = set()
+        if selection_change_with:
+            warnings.warn('selection_change_with argument is deprecated, '
+                'use the depends decorator',
+                DeprecationWarning, stacklevel=2)
+            self.selection_change_with |= set(selection_change_with)
     __init__.__doc__ += Field.__init__.__doc__
 
     def get(self, ids, model, name, values=None):
diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py
index 232b038..5831c9d 100644
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -889,7 +889,7 @@ class ModelStorage(Model):
         def validate_domain(field):
             if not field.domain:
                 return
-            if field._type == 'dict':
+            if field._type in ['dict', 'reference']:
                 return
             if field._type in ('many2one', 'one2many'):
                 Relation = pool.get(field.model_name)
diff --git a/trytond/res/group.py b/trytond/res/group.py
index e24f631..86649dd 100644
--- a/trytond/res/group.py
+++ b/trytond/res/group.py
@@ -24,10 +24,8 @@ class MenuMany2Many(fields.Many2Many):
                             ('id', 'in', sub_ids),
                             ])))
         menu_ids = set(chain(*test_ids))
-        for ids in res.itervalues():
-            for id_ in ids[:]:
-                if id_ not in menu_ids:
-                    ids.remove(id_)
+        for group_id, ids in res.iteritems():
+            res[group_id] = tuple(id_ for id_ in ids if id_ in menu_ids)
         return res
 
 
diff --git a/trytond/version.py b/trytond/version.py
index a9f38cc..d6fb88c 100644
--- a/trytond/version.py
+++ b/trytond/version.py
@@ -1,6 +1,6 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
 PACKAGE = "trytond"
-VERSION = "3.4.2"
+VERSION = "3.4.3"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-server



More information about the tryton-debian-vcs mailing list