[tryton-debian-vcs] tryton-client branch upstream-2.6 updated. upstream/2.6.10-1-gb103039
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.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-client.git;a=commitdiff;h=upstream/2.6.10-1-gb103039
commit b10303932363a353a3325c306eaee8dea69048da
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Jul 2 13:52:31 2014 +0200
Adding upstream version 2.6.11.
diff --git a/CHANGELOG b/CHANGELOG
index 3b8bb9f..1552748 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.11 - 2014-07-02
+* Bug fixes (see mercurial logs for details)
+
Version 2.6.10 - 2014-05-06
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index a5096ae..ac3ded5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tryton
-Version: 2.6.10
+Version: 2.6.11
Summary: Tryton client
Home-page: http://www.tryton.org/
Author: B2CK
diff --git a/tryton.egg-info/PKG-INFO b/tryton.egg-info/PKG-INFO
index a5096ae..ac3ded5 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.6.10
+Version: 2.6.11
Summary: Tryton client
Home-page: http://www.tryton.org/
Author: B2CK
diff --git a/tryton/common/domain_inversion.py b/tryton/common/domain_inversion.py
index 7a03f51..03b1f30 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') == True
assert domain_inversion(domain, 'z', {'x': 2, 'y': 7}) == 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'}) == 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') == 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 c994f44..73eaa1e 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -211,7 +211,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])
@@ -239,7 +239,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])
@@ -263,7 +263,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/calendar.py b/tryton/gui/window/view_form/view/form_gtk/calendar.py
index f6bafc7..14e40ac 100644
--- a/tryton/gui/window/view_form/view/form_gtk/calendar.py
+++ b/tryton/gui/window/view_form/view/form_gtk/calendar.py
@@ -45,7 +45,8 @@ class Calendar(WidgetInterface):
return self.entry.grab_focus()
def set_value(self, record, field):
- field.set_client(record, self.get_value())
+ field.set_client(record, self.entry.get_text())
+ return True
def get_format(self, record, field):
return date_format()
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 5bd4ef1..5405055 100644
--- a/tryton/gui/window/view_form/view/form_gtk/parser.py
+++ b/tryton/gui/window/view_form/view/form_gtk/parser.py
@@ -483,13 +483,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)
@@ -499,7 +499,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 0f2258d..9205e8f 100644
--- a/tryton/gui/window/view_form/view/list.py
+++ b/tryton/gui/window/view_form/view/list.py
@@ -100,7 +100,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 8609e43..39f36a7 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.6.10"
+VERSION = "2.6.11"
LICENSE = "GPL-3"
WEBSITE = "http://www.tryton.org/"
--
tryton-client
More information about the tryton-debian-vcs
mailing list