[tryton-debian-vcs] tryton-client branch debian-jessie-3.0 updated. debian/3.0.5-1-2-g32e2a24
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-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.5-1-2-g32e2a24
commit 32e2a24a8fe158c15b5a672701e82bb245dc649a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Aug 26 14:09:49 2014 +0200
Releasing debian version 3.0.6-1.
diff --git a/debian/changelog b/debian/changelog
index ed57c10..bbdb71a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-client (3.0.6-1) unstable; urgency=medium
+
+ * Merging upstream version 3.0.6.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Tue, 26 Aug 2014 14:09:49 +0200
+
tryton-client (3.0.5-1) unstable; urgency=medium
* Merging upstream version 3.0.5.
commit 1facb2ffd5d212026f254aa08cc525bb1cefa003
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Aug 26 14:09:47 2014 +0200
Merging upstream version 3.0.6.
diff --git a/CHANGELOG b/CHANGELOG
index e29190b..fc8f49c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.6 - 2014-08-03
+* Bug fixes (see mercurial logs for details)
+
Version 3.0.5 - 2014-07-02
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index a271349..a092e2a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tryton
-Version: 3.0.5
+Version: 3.0.6
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 a271349..a092e2a 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.5
+Version: 3.0.6
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 4e44010..5841e65 100644
--- a/tryton/common/domain_inversion.py
+++ b/tryton/common/domain_inversion.py
@@ -146,6 +146,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])
@@ -413,6 +415,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 4b4e743..db8b218 100644
--- a/tryton/common/popup_menu.py
+++ b/tryton/common/popup_menu.py
@@ -35,6 +35,11 @@ def populate(menu, model, record, title=''):
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)
@@ -52,7 +57,7 @@ def populate(menu, model, record, title=''):
Action._exec_action(action, data, {})
def attachment(menuitem):
- Attachment(record, None)
+ Attachment(load(record), None)
if title:
if len(menu):
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index a1d5e60..c06cb7f 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -292,7 +292,7 @@ class FloatField(CharField):
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 0bf12fe..5c11c0d 100644
--- a/tryton/gui/window/view_form/view/form_gtk/many2one.py
+++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py
@@ -32,7 +32,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)
self.changed = True
self.focus_out = True
@@ -305,7 +305,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():
text = self.wid_text.get_text()
position = self.wid_text.get_position()
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 367dc5f..0cbecda 100644
--- a/tryton/gui/window/view_form/view/form_gtk/reference.py
+++ b/tryton/gui/window/view_form/view/form_gtk/reference.py
@@ -36,6 +36,12 @@ class Reference(Many2One, SelectionMixin, PopdownMixin):
res = child.get_text()
return self._selection.get(res, False)
+ 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:
@@ -51,7 +57,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
@@ -104,7 +110,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 a3c0071..df02447 100644
--- a/tryton/gui/window/view_form/view/list.py
+++ b/tryton/gui/window/view_form/view/list.py
@@ -435,7 +435,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 b6f28f6..5e71d12 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.5"
+VERSION = "3.0.6"
LICENSE = "GPL-3"
WEBSITE = "http://www.tryton.org/"
--
tryton-client
More information about the tryton-debian-vcs
mailing list