[tryton-debian-vcs] tryton-client branch debian-jessie-2.8 updated. debian/2.8.6-1-2-ge9931a1

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Mon May 12 16:06:24 UTC 2014


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

commit e9931a19b8bf33829f0410952c24ab746fb1f75d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon May 12 16:39:06 2014 +0200

    Releasing debian version 2.8.7-1.

diff --git a/debian/changelog b/debian/changelog
index 57172f0..d4189b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-client (2.8.7-1) unstable; urgency=medium
+
+  * Merging upstream version 2.8.7.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Mon, 12 May 2014 16:39:06 +0200
+
 tryton-client (2.8.6-1) unstable; urgency=medium
 
   * Merging upstream version 2.8.6.
commit 109b962c870276d57f5bbb89b000279de08cb835
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon May 12 16:39:04 2014 +0200

    Merging upstream version 2.8.7.

diff --git a/CHANGELOG b/CHANGELOG
index 938acc8..f008d39 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.7 - 2014-05-06
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.6 - 2014-04-07
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index edf3c74..60c3369 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 2.8.6
+Version: 2.8.7
 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 edf3c74..60c3369 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.6
+Version: 2.8.7
 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 e6942f7..ed997f3 100644
--- a/tryton/common/domain_inversion.py
+++ b/tryton/common/domain_inversion.py
@@ -20,7 +20,7 @@ OPERATORS = {
     '>=': operator.ge,
     '!=': operator.ne,
     'in': in_,
-    'not in': lambda a, b: not in_(b, a),
+    'not in': lambda a, b: not in_(a, b),
     # Those operators are not supported (yet ?)
     'like': lambda a, b: True,
     'ilike': lambda a, b: True,
@@ -462,6 +462,13 @@ def test_evaldomain():
     assert eval_domain(domain, {'x': [3, 4]})
     assert not eval_domain(domain, {'x': [1, 2]})
 
+    domain = [['x', 'not in', [3, 5]]]
+    assert not eval_domain(domain, {'x': 3})
+    assert eval_domain(domain, {'x': 4})
+    assert not eval_domain(domain, {'x': [3]})
+    assert not eval_domain(domain, {'x': [3, 4]})
+    assert eval_domain(domain, {'x': [1, 2]})
+
     domain = ['OR', ['x', '>', 10], ['x', '<', 0]]
     assert eval_domain(domain, {'x': 11})
     assert eval_domain(domain, {'x': -4})
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index 4ba36f2..d823aeb 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -48,7 +48,7 @@ class CharField(object):
         screen_domain = domain_inversion(record.group.domain4inversion,
             self.name, EvalEnvironment(record))
         if isinstance(screen_domain, bool) and not screen_domain:
-            screen_domain = [('id', '=', False)]
+            screen_domain = [('id', '=', None)]
         elif isinstance(screen_domain, bool) and screen_domain:
             screen_domain = []
         attr_domain = record.expr_eval(self.attrs.get('domain', []))
@@ -196,13 +196,14 @@ class DateTimeField(CharField):
     _default = None
 
     def set_client(self, record, value, force_change=False):
-        if not isinstance(value, datetime.datetime):
+        if not isinstance(value, datetime.datetime) and value is not None:
             try:
                 value = datetime.datetime(*time.strptime(value,
                         date_format() + ' ' + self.time_format(record))[:6])
-                value = common.untimezoned_date(value)
             except ValueError:
                 value = self._default
+        if value:
+            value = common.untimezoned_date(value)
         super(DateTimeField, self).set_client(record, value,
             force_change=force_change)
 
@@ -223,12 +224,15 @@ class DateField(CharField):
     _default = None
 
     def set_client(self, record, value, force_change=False):
-        if not isinstance(value, datetime.date):
+        if not isinstance(value, datetime.date) and value is not None:
             try:
                 value = datetime.date(*time.strptime(value,
                         date_format())[:3])
             except ValueError:
                 value = self._default
+        elif isinstance(value, datetime.datetime):
+            assert(value.time() == datetime.time())
+            value = value.date()
         super(DateField, self).set_client(record, value,
             force_change=force_change)
 
@@ -244,12 +248,14 @@ class TimeField(CharField):
     _default = None
 
     def set_client(self, record, value, force_change=False):
-        if not isinstance(value, datetime.time):
+        if not isinstance(value, datetime.time) and value is not None:
             try:
                 value = datetime.time(*time.strptime(value,
                         self.time_format(record))[3:6])
             except ValueError:
                 value = None
+        elif isinstance(value, datetime.datetime):
+            value = value.time()
         super(TimeField, self).set_client(record, value,
             force_change=force_change)
 
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 7292c7e..b581edd 100644
--- a/tryton/gui/window/view_form/view/form_gtk/calendar.py
+++ b/tryton/gui/window/view_form/view/form_gtk/calendar.py
@@ -48,8 +48,7 @@ class Calendar(WidgetInterface):
         return self.entry.grab_focus()
 
     def set_value(self, record, field):
-        field.set_client(record, self.entry.get_text())
-        return True
+        field.set_client(record, self.get_value())
 
     def get_value(self):
         return self.entry.date_get(set_text=False)
diff --git a/tryton/gui/window/view_form/view/list_gtk/parser.py b/tryton/gui/window/view_form/view/list_gtk/parser.py
index eb6d60d..f0e002b 100644
--- a/tryton/gui/window/view_form/view/list_gtk/parser.py
+++ b/tryton/gui/window/view_form/view/list_gtk/parser.py
@@ -68,7 +68,7 @@ def sort_model(column, treeview, screen):
     store = treeview.get_model()
     unsaved_records = [x for x in store.group if x.id < 0]
     search_string = screen.screen_container.get_text() or None
-    if screen.search_count == len(store) or unsaved_records:
+    if screen.search_count == len(store) or unsaved_records or screen.parent:
         ids = screen.search_filter(search_string=search_string, only_ids=True)
         store.sort(ids)
     else:
diff --git a/tryton/version.py b/tryton/version.py
index 75a6e03..85fe87b 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.6"
+VERSION = "2.8.7"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-client



More information about the tryton-debian-vcs mailing list