[tryton-debian-vcs] tryton-client branch debian-jessie-2.8 updated. debian/2.8.10-1-2-g684d475

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 12 13:47:04 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.10-1-2-g684d475

commit 684d475378b32509457e4bae9b3a5d9dc7e295c4
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:51:30 2014 +0100

    Releasing debian version 2.8.11-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 181e204..af72c7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-client (2.8.11-1) unstable; urgency=medium
+
+  * Merging upstream version 2.8.11.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 12 Nov 2014 13:51:30 +0100
+
 tryton-client (2.8.10-1) unstable; urgency=medium
 
   * Merging upstream version 2.8.10.
commit d9e2f6392c8ed2b0cbbfdb3473ba50acb1c32208
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:51:29 2014 +0100

    Merging upstream version 2.8.11.

diff --git a/CHANGELOG b/CHANGELOG
index ea4ac13..062fe89 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.11 - 2014-11-06
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.10 - 2014-09-29
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index c5b04b1..16122d0 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 2.8.10
+Version: 2.8.11
 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 c5b04b1..16122d0 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.10
+Version: 2.8.11
 Summary: Tryton client
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/tryton/common/domain_parser.py b/tryton/common/domain_parser.py
index 0ebdcce..9df03e1 100644
--- a/tryton/common/domain_parser.py
+++ b/tryton/common/domain_parser.py
@@ -117,12 +117,20 @@ def quote(value):
     "Quote string if needed"
     if not isinstance(value, basestring):
         return value
+    if '"' in value:
+        value = value.replace('"', '\\"')
     for test in (':', ' ', '(', ')') + OPERATORS:
         if test in value:
             return '"%s"' % value
     return value
 
 
+def test_quote():
+    assert quote('test') == 'test'
+    assert quote('foo bar') == '"foo bar"'
+    assert quote('"foo"') == '\\\"foo\\\"'
+
+
 def ending_clause(domain, deep=0):
     "Return the ending clause"
     if not domain:
@@ -1115,6 +1123,9 @@ def test_group():
         ('Name', '=', None),
         ('Name', None, 'Doe'),
         ]
+    assert rlist(dom.group(udlex(u'Name: \\"foo\\"'))) == [
+        ('Name', None, '"foo"'),
+        ]
 
 
 def test_parse_clause():
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index 365cf22..966fada 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -873,6 +873,9 @@ class DictField(CharField):
 
     _default = {}
 
+    def get(self, record):
+        return super(DictField, self).get(record) or self._default
+
     def validation_domains(self, record):
         screen_domain, attr_domain = self.domains_get(record)
         return screen_domain, screen_domain
diff --git a/tryton/gui/window/view_form/model/group.py b/tryton/gui/window/view_form/model/group.py
index 695513f..d90a7be 100644
--- a/tryton/gui/window/view_form/model/group.py
+++ b/tryton/gui/window/view_form/model/group.py
@@ -83,9 +83,13 @@ class Group(SignalEvent, list):
         return [head] + self.clean4inversion(tail)
 
     def __get_domain4inversion(self):
-        if self.__domain4inversion is None:
-            self.__domain4inversion = self.clean4inversion(self.domain)
-        return self.__domain4inversion
+        domain = self.domain
+        if (self.__domain4inversion is None
+                or self.__domain4inversion[0] != domain):
+            self.__domain4inversion = (
+                domain, self.clean4inversion(domain))
+        domain, domain4inversion = self.__domain4inversion
+        return domain4inversion
 
     domain4inversion = property(__get_domain4inversion)
 
diff --git a/tryton/gui/window/view_form/screen/screen.py b/tryton/gui/window/view_form/screen/screen.py
index 0901a93..4f2946a 100644
--- a/tryton/gui/window/view_form/screen/screen.py
+++ b/tryton/gui/window/view_form/screen/screen.py
@@ -700,7 +700,9 @@ class Screen(SignalEvent):
         if view.view_type == 'tree' and len(self.group):
             start, end = view.widget_tree.get_visible_range()
             vadjustment = view.widget_tree.get_vadjustment()
-            vadjustment.value = vadjustment.value + vadjustment.page_increment
+            vadjustment.value = min(
+                vadjustment.value + vadjustment.page_increment,
+                vadjustment.get_upper())
             store = view.store
             iter_ = store.get_iter(end)
             self.current_record = store.get_value(iter_, 0)
@@ -744,7 +746,9 @@ class Screen(SignalEvent):
         if view.view_type == 'tree' and len(self.group):
             start, end = view.widget_tree.get_visible_range()
             vadjustment = view.widget_tree.get_vadjustment()
-            vadjustment.value = vadjustment.value - vadjustment.page_increment
+            vadjustment.value = min(
+                vadjustment.value - vadjustment.page_increment,
+                vadjustment.get_lower())
             store = view.store
             iter_ = store.get_iter(start)
             self.current_record = store.get_value(iter_, 0)
diff --git a/tryton/gui/window/view_form/view/form_gtk/many2one.py b/tryton/gui/window/view_form/view/form_gtk/many2one.py
index 5c11c0d..3750eef 100644
--- a/tryton/gui/window/view_form/view/form_gtk/many2one.py
+++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py
@@ -311,9 +311,12 @@ class Many2One(WidgetInterface):
                 position = self.wid_text.get_position()
                 self.field.set_client(self.record,
                     self.value_from_id(None, ''))
-                # Restore text and position after display
-                self.wid_text.set_text(text)
-                self.wid_text.set_position(position)
+                # The value of the field could be different of None
+                # in such case, the original text should not be restored
+                if not self.wid_text.get_text():
+                    # Restore text and position after display
+                    self.wid_text.set_text(text)
+                    self.wid_text.set_position(position)
             gobject.idle_add(clean)
         return False
 
diff --git a/tryton/gui/window/win_form.py b/tryton/gui/window/win_form.py
index f6e75bc..fbef66b 100644
--- a/tryton/gui/window/win_form.py
+++ b/tryton/gui/window/win_form.py
@@ -257,7 +257,7 @@ class WinForm(NoModal):
             self.screen.screen_container.alternate_viewport.connect(
                     'key-press-event', self.on_keypress)
 
-        if self.save_current:
+        if self.save_current and not new:
             self.screen.signal_connect(self, 'record-message',
                 self.activate_save)
             self.screen.signal_connect(self, 'record-modified',
diff --git a/tryton/pyson.py b/tryton/pyson.py
index 5b7bf46..318c30d 100644
--- a/tryton/pyson.py
+++ b/tryton/pyson.py
@@ -28,25 +28,25 @@ class PYSON(object):
             return Not(self)
 
     def __and__(self, other):
+        if (isinstance(other, PYSON)
+                and other.types() != set([bool])):
+            other = Bool(other)
         if (isinstance(self, And)
                 and not isinstance(self, Or)):
             self._statements.append(other)
             return self
-        if (isinstance(other, PYSON)
-                and other.types() != set([bool])):
-            other = Bool(other)
         if self.types() != set([bool]):
             return And(Bool(self), other)
         else:
             return And(self, other)
 
     def __or__(self, other):
-        if isinstance(self, Or):
-            self._statements.append(other)
-            return self
         if (isinstance(other, PYSON)
                 and other.types() != set([bool])):
             other = Bool(other)
+        if isinstance(self, Or):
+            self._statements.append(other)
+            return self
         if self.types() != set([bool]):
             return Or(Bool(self), other)
         else:
diff --git a/tryton/version.py b/tryton/version.py
index 634db34..4b2b7ca 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.10"
+VERSION = "2.8.11"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-client



More information about the tryton-debian-vcs mailing list