[tryton-debian-vcs] tryton-client branch debian updated. debian/3.2.2-1-2-g2df03b8

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Tue Aug 26 16:41:25 UTC 2014


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

commit 2df03b8137d09e79f781d1ee84199ec1286061fc
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Aug 26 13:50:37 2014 +0200

    Releasing debian version 3.2.3-1.

diff --git a/debian/changelog b/debian/changelog
index 4ad66ba..42e2d82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-client (3.2.3-1) unstable; urgency=medium
+
+  * Merging upstream version 3.2.3.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Tue, 26 Aug 2014 13:50:36 +0200
+
 tryton-client (3.2.2-1) unstable; urgency=medium
 
   * Merging upstream version 3.2.2.
commit 7c124672d6e88381b5b04c0e6c3c8ed3cd87dc50
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Aug 26 13:50:32 2014 +0200

    Merging upstream version 3.2.3.

diff --git a/CHANGELOG b/CHANGELOG
index 9e23bc9..e1b7581 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.3 - 2014-08-03
+* Bug fixes (see mercurial logs for details)
+
 Version 3.2.2 - 2014-07-02
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 3464ea1..f754e70 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 3.2.2
+Version: 3.2.3
 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 3464ea1..f754e70 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.2.2
+Version: 3.2.3
 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 398744f..531e522 100644
--- a/tryton/common/domain_inversion.py
+++ b/tryton/common/domain_inversion.py
@@ -151,6 +151,8 @@ def simplify(domain):
         return domain
     elif domain in ('OR', 'AND'):
         return domain
+    elif domain in (['OR'], ['AND']):
+        return []
     elif (isinstance(domain, list) and len(domain) == 1
             and not is_leaf(domain[0])):
         return simplify(domain[0])
@@ -429,6 +431,10 @@ def test_simplify():
     assert simplify(domain) == ['OR', [['x', '=', 3]], [['y', '=', 5]]]
     domain = ['OR', ['x', '=', 3], ['AND', ['y', '=', 5]]]
     assert simplify(domain) == ['OR', ['x', '=', 3], [['y', '=', 5]]]
+    domain = ['AND']
+    assert simplify(domain) == []
+    domain = ['OR']
+    assert simplify(domain) == []
 
 
 def test_merge():
diff --git a/tryton/common/popup_menu.py b/tryton/common/popup_menu.py
index df44569..08e465e 100644
--- a/tryton/common/popup_menu.py
+++ b/tryton/common/popup_menu.py
@@ -31,6 +31,11 @@ def populate(menu, model, record, title='', field=None):
             record = screen.current_record
         return record
 
+    def id_(record):
+        if not isinstance(record, (int, long)):
+            return record.id
+        return record
+
     def activate(menuitem, action, atype):
         rec = load(record)
         action = Action.evaluate(action, atype, rec)
@@ -48,11 +53,11 @@ def populate(menu, model, record, title='', field=None):
             Action._exec_action(action, data, {})
 
     def attachment(menuitem):
-        Attachment(record, None)
+        Attachment(load(record), None)
 
     def edit(menuitem):
         with Window(hide_current=True, allow_similar=True):
-            Window.create(field.attrs.get('view_ids'), model, record,
+            Window.create(field.attrs.get('view_ids'), model, id_(record),
                 mode=['form'])
 
     if title:
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index ad5f3e9..452d573 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -294,7 +294,7 @@ class FloatField(Field):
                 record.expr_eval(
                     self.attrs.get('digits', self.default_digits)),
                 self.default_digits))
-        shift = int(round(math.log(factor, 10)))
+        shift = int(round(math.log(abs(factor), 10)))
         return (digits[0] + shift, digits[1] - shift)
 
     def convert(self, value):
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 04f2d23..dd72af3 100644
--- a/tryton/gui/window/view_form/view/form_gtk/many2one.py
+++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py
@@ -33,7 +33,7 @@ class Many2One(WidgetInterface):
         self.wid_text.connect('populate-popup', self._populate_popup)
         self.wid_text.connect('focus-out-event',
             lambda x, y: self._focus_out())
-        self.wid_text.connect_after('changed', self.sig_changed)
+        self.wid_text.connect('changed', self.sig_changed)
         manage_entry_position(self.wid_text)
         self.changed = True
         self.focus_out = True
@@ -308,7 +308,7 @@ class Many2One(WidgetInterface):
         if not self.changed:
             return False
         value = self.field.get(self.record)
-        if self.has_target(value):
+        if self.has_target(value) and self.modified:
             def clean():
                 if not self.wid_text.props.window:
                     return
diff --git a/tryton/gui/window/view_form/view/form_gtk/reference.py b/tryton/gui/window/view_form/view/form_gtk/reference.py
index 1a9381c..0455e23 100644
--- a/tryton/gui/window/view_form/view/form_gtk/reference.py
+++ b/tryton/gui/window/view_form/view/form_gtk/reference.py
@@ -38,6 +38,12 @@ class Reference(Many2One, SelectionMixin, PopdownMixin):
             model = self.widget_combo.get_model()
             return model[active][1]
 
+    def get_empty_value(self):
+        for name, model in self.widget_combo.get_model():
+            if model in (None, ''):
+                return model, name
+        return '', ''
+
     def _readonly_set(self, value):
         super(Reference, self)._readonly_set(value)
         if not value:
@@ -53,7 +59,7 @@ class Reference(Many2One, SelectionMixin, PopdownMixin):
             try:
                 model, name = self.field.get_client(self.record)
             except (ValueError, TypeError):
-                model, name = '', ''
+                model, name = self.get_empty_value()
             return (model != self.get_model()
                 or name != self.wid_text.get_text())
         return False
@@ -106,7 +112,7 @@ class Reference(Many2One, SelectionMixin, PopdownMixin):
             try:
                 model, name = field.get_client(record)
             except (ValueError, TypeError):
-                model, name = '', ''
+                model, name = self.get_empty_value()
             if (model != self.get_model()
                     or name != self.wid_text.get_text()):
                 field.set_client(record, None)
diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py
index 0077d43..9aff350 100644
--- a/tryton/gui/window/view_form/view/list.py
+++ b/tryton/gui/window/view_form/view/list.py
@@ -433,7 +433,9 @@ class ViewList(ParserView):
             if not col.get_visible() or not col.name:
                 continue
             cell = self.widget_tree.cells[col.name]
-            values.append('"' + str(cell.get_textual_value(record)) + '"')
+            values.append('"'
+                + str(cell.get_textual_value(record)).replace('"', '""')
+                + '"')
         data.append('\t'.join(values))
         return
 
diff --git a/tryton/version.py b/tryton/version.py
index 145862b..2b7967d 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.2.2"
+VERSION = "3.2.3"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-client



More information about the tryton-debian-vcs mailing list