[tryton-debian-vcs] tryton-client branch upstream-2.8 updated. upstream/2.8.7-1-ge644e4b
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Jul 3 15:58:36 UTC 2014
The following commit has been merged in the upstream-2.8 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-client.git;a=commitdiff;h=upstream/2.8.7-1-ge644e4b
commit e644e4bff2fc4448cfb05b133b3ddb7dcb5c8ff2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Jul 2 13:55:44 2014 +0200
Adding upstream version 2.8.8.
diff --git a/CHANGELOG b/CHANGELOG
index f008d39..6b90ebf 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.8 - 2014-07-02
+* Bug fixes (see mercurial logs for details)
+
Version 2.8.7 - 2014-05-06
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 60c3369..e0c7bcb 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tryton
-Version: 2.8.7
+Version: 2.8.8
Summary: Tryton client
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/tryton.egg-info/PKG-INFO b/tryton.egg-info/PKG-INFO
index 60c3369..e0c7bcb 100644
--- a/tryton.egg-info/PKG-INFO
+++ b/tryton.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tryton
-Version: 2.8.7
+Version: 2.8.8
Summary: Tryton client
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/tryton/common/domain_inversion.py b/tryton/common/domain_inversion.py
index ed997f3..4e44010 100644
--- a/tryton/common/domain_inversion.py
+++ b/tryton/common/domain_inversion.py
@@ -53,7 +53,9 @@ def eval_leaf(part, context, boolop=operator.and_):
# In the case where the leaf concerns a m2o then having a value in the
# evaluation context is deemed suffisant
return bool(context.get(field.split('.')[0]))
- if operand == '=' and not context.get(field) and boolop == operator.and_:
+ if (operand == '='
+ and context.get(field) is None
+ and boolop == operator.and_):
# We should consider that other domain inversion will set a correct
# value to this field
return True
@@ -307,7 +309,7 @@ def test_and_inversion():
domain = [['x', '=', 3], ['y', '=', 5]]
assert domain_inversion(domain, 'z') is True
assert domain_inversion(domain, 'z', {'x': 2, 'y': 7}) is True
- assert domain_inversion(domain, 'x', {'y': False}) == [['x', '=', 3]]
+ assert domain_inversion(domain, 'x', {'y': None}) == [['x', '=', 3]]
domain = [['x.id', '>', 5], ['y', '<', 3]]
assert domain_inversion(domain, 'y') == [['y', '<', 3]]
@@ -327,7 +329,7 @@ def test_or_inversion():
assert domain_inversion(domain, 'x', {'y': 4, 'z': 'abc'}) is True
domain = ['OR', ['x', '=', 3], ['y', '=', 5]]
- assert domain_inversion(domain, 'x', {'y': False}) == [['x', '=', 3]]
+ assert domain_inversion(domain, 'x', {'y': None}) == [['x', '=', 3]]
domain = ['OR', ['x', '=', 3], ['y', '>', 5]]
assert domain_inversion(domain, 'z') is True
@@ -474,6 +476,12 @@ def test_evaldomain():
assert eval_domain(domain, {'x': -4})
assert not eval_domain(domain, {'x': 5})
+ domain = ['OR', ['x', '>', 0], ['x', '=', None]]
+ assert eval_domain(domain, {'x': 1})
+ assert eval_domain(domain, {'x': None})
+ assert not eval_domain(domain, {'x': -1})
+ assert not eval_domain(domain, {'x': 0})
+
domain = [['x', '>', 0], ['OR', ['x', '=', 3], ['x', '=', 2]]]
assert not eval_domain(domain, {'x': 1})
assert eval_domain(domain, {'x': 3})
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index d823aeb..365cf22 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -196,7 +196,7 @@ class DateTimeField(CharField):
_default = None
def set_client(self, record, value, force_change=False):
- if not isinstance(value, datetime.datetime) and value is not None:
+ if isinstance(value, basestring):
try:
value = datetime.datetime(*time.strptime(value,
date_format() + ' ' + self.time_format(record))[:6])
@@ -224,7 +224,7 @@ class DateField(CharField):
_default = None
def set_client(self, record, value, force_change=False):
- if not isinstance(value, datetime.date) and value is not None:
+ if isinstance(value, basestring):
try:
value = datetime.date(*time.strptime(value,
date_format())[:3])
@@ -248,7 +248,7 @@ class TimeField(CharField):
_default = None
def set_client(self, record, value, force_change=False):
- if not isinstance(value, datetime.time) and value is not None:
+ if isinstance(value, basestring):
try:
value = datetime.time(*time.strptime(value,
self.time_format(record))[3:6])
diff --git a/tryton/gui/window/view_form/view/form_gtk/char.py b/tryton/gui/window/view_form/view/form_gtk/char.py
index 50fbad4..45fdf9e 100644
--- a/tryton/gui/window/view_form/view/form_gtk/char.py
+++ b/tryton/gui/window/view_form/view/form_gtk/char.py
@@ -90,7 +90,8 @@ class Char(WidgetInterface, TranslateMixin):
return field.set_client(record, value)
def get_value(self):
- return self.entry.get_text()
+ entry = self.entry.get_child() if self.autocomplete else self.entry
+ return entry.get_text()
def display(self, record, field):
super(Char, self).display(record, field)
diff --git a/tryton/gui/window/view_form/view/form_gtk/parser.py b/tryton/gui/window/view_form/view/form_gtk/parser.py
index 9176529..6be8ab6 100644
--- a/tryton/gui/window/view_form/view/form_gtk/parser.py
+++ b/tryton/gui/window/view_form/view/form_gtk/parser.py
@@ -469,13 +469,13 @@ class ParserForm(ParserInterface):
hpaned = gtk.HPaned()
container.wid_add(hpaned, colspan=int(attrs.get('colspan', 4)),
yexpand=True, yfill=True)
- (widget, widgets, state_widgets, spam, notebook_list2,
+ (widget, widgets, state_widgets2, spam, notebook_list2,
cursor_widget2) = self.parse(model_name, node, fields,
paned=hpaned, tooltips=tooltips)
if not cursor_widget:
cursor_widget = cursor_widget2
notebook_list.extend(notebook_list2)
- state_widgets += state_widgets
+ state_widgets += state_widgets2
for widget_name, widgets in widgets.iteritems():
dict_widget.setdefault(widget_name, [])
dict_widget[widget_name].extend(widgets)
@@ -485,7 +485,7 @@ class ParserForm(ParserInterface):
vpaned = gtk.VPaned()
container.wid_add(vpaned, colspan=int(attrs.get('colspan', 4)),
yexpand=True, yfill=True)
- (widget, widgets, state_widgets2, spam, notebook_list,
+ (widget, widgets, state_widgets2, spam, notebook_list2,
cursor_widget2) = self.parse(model_name, node, fields,
paned=vpaned, tooltips=tooltips)
if not cursor_widget:
diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py
index 806c2e6..b9baee6 100644
--- a/tryton/gui/window/view_form/view/list.py
+++ b/tryton/gui/window/view_form/view/list.py
@@ -99,7 +99,7 @@ class AdaptModelGroup(gtk.GenericTreeModel):
group.add(record)
if not record.parent_name:
record.modified_fields.setdefault(prev_group.parent_name)
- record.value[prev_group.parent_name] = False
+ record.value[prev_group.parent_name] = None
else:
record.modified_fields.setdefault(record.parent_name)
group.move(record, pos)
diff --git a/tryton/version.py b/tryton/version.py
index 85fe87b..becf915 100644
--- a/tryton/version.py
+++ b/tryton/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 = "tryton"
-VERSION = "2.8.7"
+VERSION = "2.8.8"
LICENSE = "GPL-3"
WEBSITE = "http://www.tryton.org/"
--
tryton-client
More information about the tryton-debian-vcs
mailing list