[tryton-debian-vcs] tryton-proteus branch upstream-3.4 updated. upstream/3.4.6-1-gc256584

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Sep 4 17:01:02 UTC 2016


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

commit c2565846ce65d1025e5586ddd85e838a75a6a1e4
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Sep 3 21:07:05 2016 +0200

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

diff --git a/CHANGELOG b/CHANGELOG
index 6967db1..2250bbd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.7 - 2016-09-03
+* Bug fixes (see mercurial logs for details)
+
 Version 3.4.6 - 2016-07-04
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 4520e26..8cff45a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: proteus
-Version: 3.4.6
+Version: 3.4.7
 Summary: Library to access Tryton server as a client
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/proteus.egg-info/PKG-INFO b/proteus.egg-info/PKG-INFO
index 4520e26..8cff45a 100644
--- a/proteus.egg-info/PKG-INFO
+++ b/proteus.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: proteus
-Version: 3.4.6
+Version: 3.4.7
 Summary: Library to access Tryton server as a client
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/proteus/__init__.py b/proteus/__init__.py
index 226bc8b..b022c03 100644
--- a/proteus/__init__.py
+++ b/proteus/__init__.py
@@ -3,7 +3,7 @@
 '''
 A library to access Tryton's models like a client.
 '''
-__version__ = "3.4.6"
+__version__ = "3.4.7"
 __all__ = ['Model', 'Wizard', 'Report']
 import sys
 try:
@@ -601,8 +601,15 @@ class Model(object):
             definition = self._fields[field_name]
             if definition['type'] in ('one2many', 'many2many'):
                 relation = Model.get(definition['relation'])
-                value = [isinstance(x, (int, long)) and relation(x) or x
-                        for x in value]
+
+                def instantiate(v):
+                    if isinstance(v, (int, long)):
+                        return relation(v)
+                    elif isinstance(v, dict):
+                        return relation(_default=_default, **v)
+                    else:
+                        return v
+                value = [instantiate(x) for x in value]
                 getattr(self, field_name).extend(value)
             else:
                 if definition['type'] == 'many2one':
-- 
tryton-proteus



More information about the tryton-debian-vcs mailing list