[tryton-debian-vcs] tryton-proteus branch upstream-3.2 updated. upstream/3.2.7-1-gd663081
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.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-proteus.git;a=commitdiff;h=upstream/3.2.7-1-gd663081
commit d6630816862137765893ad621e3a68c59a2cf5b9
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Sep 3 21:05:56 2016 +0200
Adding upstream version 3.2.8.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 44fcbca..6ce8e6e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.8 - 2016-09-03
+* Bug fixes (see mercurial logs for details)
+
Version 3.2.7 - 2016-07-04
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index c184715..76e140c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: proteus
-Version: 3.2.7
+Version: 3.2.8
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 c184715..76e140c 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.2.7
+Version: 3.2.8
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 fc321ba..e35e1ca 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.2.7"
+__version__ = "3.2.8"
__all__ = ['Model', 'Wizard']
import sys
try:
@@ -594,8 +594,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