[tryton-debian-vcs] tryton-server branch upstream updated. upstream/3.2.0-1-gb14acc0
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Jul 3 16:04:03 UTC 2014
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.2.0-1-gb14acc0
commit b14acc005e9a3d21dca2bf1c71fa76428bcebc8c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Jul 2 14:05:36 2014 +0200
Adding upstream version 3.2.1.
diff --git a/CHANGELOG b/CHANGELOG
index cf11373..0d867f8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.1 - 2014-07-01
+* Bug fixes (see mercurial logs for details)
+
Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
* Add restore_history to ModelSQL
diff --git a/PKG-INFO b/PKG-INFO
index e0f280b..52c6587 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 3.2.0
+Version: 3.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 e0f280b..52c6587 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.2.0
+Version: 3.2.1
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond/model/fields/field.py b/trytond/model/fields/field.py
index b20a204..1404b80 100644
--- a/trytond/model/fields/field.py
+++ b/trytond/model/fields/field.py
@@ -346,11 +346,22 @@ class FieldTranslate(Field):
model = IrModel.__table__()
join = self._get_translation_join(Model, name,
translation, model, table)
- tables[key] = {
- None: (join.right, join.condition),
- }
+ if join.left == table:
+ tables[key] = {
+ None: (join.right, join.condition),
+ }
+ else:
+ tables[key] = {
+ None: (join.left.right, join.left.condition),
+ 'translation': {
+ None: (join.right, join.condition),
+ },
+ }
else:
- translation, _ = tables[key][None]
+ if 'translation' not in tables[key]:
+ translation, _ = tables[key][None]
+ else:
+ translation, _ = tables[key]['translation'][None]
return [Coalesce(NullIf(translation.value, ''),
self.sql_column(table))]
diff --git a/trytond/model/model.py b/trytond/model/model.py
index a6426bf..8458697 100644
--- a/trytond/model/model.py
+++ b/trytond/model/model.py
@@ -360,7 +360,7 @@ class Model(WarningErrorMixin, URLMixin, PoolBase):
res[field]['delete'] = accesses.get(field, {}).get('delete',
True)
if res[field]['type'] == 'one2many' \
- and hasattr(cls._fields[field], 'field'):
+ and getattr(cls._fields[field], 'field', None):
res[field]['relation_field'] = copy.copy(
cls._fields[field].field)
if res[field]['type'] == 'many2one':
diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py
index 6bb5753..6698c98 100644
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -1000,9 +1000,10 @@ class ModelStorage(Model):
error_args=error_args)
def digits_test(value, digits, field_name):
- def raise_user_error():
+ def raise_user_error(value):
error_args = cls._get_error_args(field_name)
error_args['digits'] = digits[1]
+ error_args['value'] = value
cls.raise_user_error('digits_validation_record',
error_args=error_args)
if value is None:
@@ -1010,10 +1011,10 @@ class ModelStorage(Model):
if isinstance(value, Decimal):
if (value.quantize(Decimal(str(10.0 ** -digits[1])))
!= value):
- raise_user_error()
+ raise_user_error(value)
elif CONFIG.options['db_type'] != 'mysql':
if not (round(value, digits[1]) == float(value)):
- raise_user_error()
+ raise_user_error(value)
# validate digits
if hasattr(field, 'digits') and field.digits:
if is_pyson(field.digits):
diff --git a/trytond/version.py b/trytond/version.py
index 788322a..19a6cdd 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.2.0"
+VERSION = "3.2.1"
LICENSE = "GPL-3"
WEBSITE = "http://www.tryton.org/"
--
tryton-server
More information about the tryton-debian-vcs
mailing list