[tryton-debian-vcs] tryton-client branch debian-jessie-3.0 updated. debian/3.0.4-1-2-g50d717f

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Jul 3 15:58:35 UTC 2014


The following commit has been merged in the debian-jessie-3.0 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-client.git;a=commitdiff;h=debian/3.0.4-1-2-g50d717f

commit 50d717f32c9da05fbfc54143d54e028b2c2f2048
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jul 2 13:59:25 2014 +0200

    Releasing debian version 3.0.5-1.

diff --git a/debian/changelog b/debian/changelog
index 8bda7ff..ed57c10 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-client (3.0.5-1) unstable; urgency=medium
+
+  * Merging upstream version 3.0.5.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 02 Jul 2014 13:59:25 +0200
+
 tryton-client (3.0.4-1) unstable; urgency=medium
 
   * Setting the branch in the watch file to the fixed version 3.0.
commit adec1f483b0375959f72d49d0bcdceda0334f03c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jul 2 13:59:22 2014 +0200

    Merging upstream version 3.0.5.

diff --git a/CHANGELOG b/CHANGELOG
index f5c0436..e29190b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.5 - 2014-07-02
+* Bug fixes (see mercurial logs for details)
+
 Version 3.0.4 - 2014-05-06
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index ec4c4b1..a271349 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 3.0.4
+Version: 3.0.5
 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 ec4c4b1..a271349 100644
--- a/tryton.egg-info/PKG-INFO
+++ b/tryton.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 3.0.4
+Version: 3.0.5
 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 9d1b189..a1d5e60 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -199,7 +199,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])
@@ -227,7 +227,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])
@@ -251,7 +251,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 133a62d..ea9a951 100644
--- a/tryton/gui/window/view_form/view/form_gtk/parser.py
+++ b/tryton/gui/window/view_form/view/form_gtk/parser.py
@@ -472,13 +472,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)
@@ -488,7 +488,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 1b61eaf..a3c0071 100644
--- a/tryton/gui/window/view_form/view/list.py
+++ b/tryton/gui/window/view_form/view/list.py
@@ -97,7 +97,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 e16f9c8..b6f28f6 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 = "3.0.4"
+VERSION = "3.0.5"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-client



More information about the tryton-debian-vcs mailing list