[tryton-debian-vcs] tryton-client branch upstream-2.6 updated. upstream/2.6.8-1-gedf4394

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Apr 17 12:29:42 UTC 2014


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

commit edf4394c6336f50cd62987f56da61e7655abb59e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Apr 17 14:03:10 2014 +0200

    Adding upstream version 2.6.9.

diff --git a/CHANGELOG b/CHANGELOG
index cddd56e..467af70 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.9 - 2014-04-07
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.8 - 2013-12-04
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 3f60d5d..e039041 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
-Copyright (C) 2010-2013 Nicolas Évrard.
-Copyright (C) 2007-2013 Cédric Krier.
+Copyright (C) 2010-2014 Nicolas Évrard.
+Copyright (C) 2007-2014 Cédric Krier.
 Copyright (C) 2007-2012 Bertrand Chenal.
-Copyright (C) 2008-2013 B2CK SPRL.
+Copyright (C) 2008-2014 B2CK SPRL.
 Copyright (C) 2008-2011 Udo Spallek.
 Copyright (C) 2008-2011 virtual things - Preisler & Spallek GbR.
 Copyright (C) 2011-2012 Rodrigo Hübner.
diff --git a/PKG-INFO b/PKG-INFO
index 479fd07..80da5e4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 2.6.8
+Version: 2.6.9
 Summary: Tryton client
 Home-page: http://www.tryton.org/
 Author: B2CK
diff --git a/tryton.egg-info/PKG-INFO b/tryton.egg-info/PKG-INFO
index 479fd07..80da5e4 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.6.8
+Version: 2.6.9
 Summary: Tryton client
 Home-page: http://www.tryton.org/
 Author: B2CK
diff --git a/tryton/common/domain_parser.py b/tryton/common/domain_parser.py
index bfb3259..e374140 100644
--- a/tryton/common/domain_parser.py
+++ b/tryton/common/domain_parser.py
@@ -184,7 +184,7 @@ def convert_value(field, value):
 
     def convert_boolean():
         if isinstance(value, basestring):
-            return any(test.lower().startswith(value.lower())
+            return any(test.decode('utf-8').lower().startswith(value.lower())
                 for test in (_('y'), _('yes'), _('true'), _('t'), '1'))
         else:
             return bool(value)
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index fad9d67..7b5b764 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -816,6 +816,12 @@ class ReferenceField(CharField):
             return None
 
     def get(self, record, check_load=True, readonly=True, modified=False):
+        if record.parent_name == self.name:
+            if record.parent:
+                return '%s,%s' % (record.group.parent.model_name,
+                    record.parent.id)
+            else:
+                return None
         if (record.value.get(self.name)
                 and record.value[self.name][0]
                 and record.value[self.name][1] >= -1):
diff --git a/tryton/gui/window/view_form/model/group.py b/tryton/gui/window/view_form/model/group.py
index 8b6565f..da93272 100644
--- a/tryton/gui/window/view_form/model/group.py
+++ b/tryton/gui/window/view_form/model/group.py
@@ -394,9 +394,6 @@ class Group(SignalEvent, list):
                     to_add.keys(), main_iteration=False, context=ctx)
             except RPCException:
                 return False
-            for name in to_add:
-                if name not in values:
-                    values[name] = False
             for record in new:
                 record.set_default(values, signal=signal)
 
diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py
index 5b45f8d..b1a6073 100644
--- a/tryton/gui/window/view_form/model/record.py
+++ b/tryton/gui/window/view_form/model/record.py
@@ -294,7 +294,7 @@ class Record(SignalEvent):
     def save(self, force_reload=True):
         if self.id < 0 or self.modified:
             if self.id < 0:
-                value = self.get(get_readonly=True)
+                value = self.get(check_load=False, get_readonly=True)
                 try:
                     res = RPCExecute('model', self.model_name, 'create', value,
                         main_iteration=False,
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 c290623..1cfce7e 100644
--- a/tryton/gui/window/view_form/view/form_gtk/char.py
+++ b/tryton/gui/window/view_form/view/form_gtk/char.py
@@ -51,8 +51,10 @@ class Char(WidgetInterface, TranslateMixin):
     def translate_widget(self):
         entry = gtk.Entry()
         entry.set_property('activates_default', True)
-        entry.set_width_chars(int(self.attrs.get('size', -1)))
-        entry.set_max_length(int(self.attrs.get('size', 0)))
+        if self.record:
+            field_size = self.record.expr_eval(self.attrs.get('size'))
+            entry.set_width_chars(field_size or -1)
+            entry.set_max_length(field_size or 0)
         return entry
 
     @staticmethod
diff --git a/tryton/gui/window/view_form/view/graph_gtk/bar.py b/tryton/gui/window/view_form/view/graph_gtk/bar.py
index 6833a21..0af9dc2 100644
--- a/tryton/gui/window/view_form/view/graph_gtk/bar.py
+++ b/tryton/gui/window/view_form/view/graph_gtk/bar.py
@@ -65,6 +65,9 @@ class Bar(Graph):
     def motion(self, widget, event):
         super(Bar, self).motion(widget, event)
 
+        if not getattr(self, 'area', None):
+            return
+
         def intersect(bar, event):
             x = self.area.w * bar.x + self.area.x
             y = self.area.h * bar.y + self.area.y
diff --git a/tryton/gui/window/view_form/view/graph_gtk/line.py b/tryton/gui/window/view_form/view/graph_gtk/line.py
index cb54dba..9807efb 100644
--- a/tryton/gui/window/view_form/view/graph_gtk/line.py
+++ b/tryton/gui/window/view_form/view/graph_gtk/line.py
@@ -154,6 +154,9 @@ class Line(Graph):
         cr.restore()
 
     def motion(self, widget, event):
+        if not getattr(self, 'area', None):
+            return
+
         nearest = None
         for point in self.points:
             x = point.x * self.area.w + self.area.x
diff --git a/tryton/gui/window/view_form/view/graph_gtk/pie.py b/tryton/gui/window/view_form/view/graph_gtk/pie.py
index 0ba4287..e85ac3c 100644
--- a/tryton/gui/window/view_form/view/graph_gtk/pie.py
+++ b/tryton/gui/window/view_form/view/graph_gtk/pie.py
@@ -108,6 +108,9 @@ class Pie(Graph):
     def motion(self, widget, event):
         super(Pie, self).motion(widget, event)
 
+        if not getattr(self, 'area', None):
+            return
+
         d = (event.x - self.centerx) ** 2 + (event.y - self.centery) ** 2
         if d > self.radius ** 2:
             self.popup.hide()
diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py
index 70b10d3..0f2258d 100644
--- a/tryton/gui/window/view_form/view/list.py
+++ b/tryton/gui/window/view_form/view/list.py
@@ -586,16 +586,19 @@ class ViewList(ParserView):
 
     def __button_press(self, treeview, event):
         if event.button == 3:
-            path = treeview.get_path_at_pos(int(event.x), int(event.y))
+            try:
+                path, col, x, y = treeview.get_path_at_pos(
+                    int(event.x), int(event.y))
+            except TypeError:
+                # Outside row
+                return False
             selection = treeview.get_selection()
             if selection.get_mode() == gtk.SELECTION_SINGLE:
                 model = selection.get_selected()[0]
             elif selection.get_mode() == gtk.SELECTION_MULTIPLE:
                 model = selection.get_selected_rows()[0]
-            if (not path) or not path[0]:
-                return False
-            group = model.group
-            record = group[path[0][0]]
+            record = model.get_value(model.get_iter(path), 0)
+            group = record.group
             menu = gtk.Menu()
             menu.popup(None, None, None, event.button, event.time)
 
diff --git a/tryton/gui/window/view_form/view/list_gtk/editabletree.py b/tryton/gui/window/view_form/view/list_gtk/editabletree.py
index 6387636..602b721 100644
--- a/tryton/gui/window/view_form/view/list_gtk/editabletree.py
+++ b/tryton/gui/window/view_form/view/list_gtk/editabletree.py
@@ -21,7 +21,7 @@ class TreeView(gtk.TreeView):
     def next_column(self, path, column=None, _sign=1):
         columns = self.get_columns()
         if column is None:
-            column = columns[-1 * _sign]
+            column = columns[-1 if _sign > 0 else 0]
         model = self.get_model()
         record = model.get_value(model.get_iter(path), 0)
         if _sign < 0:
diff --git a/tryton/gui/window/win_search.py b/tryton/gui/window/win_search.py
index 0f901d4..e128655 100644
--- a/tryton/gui/window/win_search.py
+++ b/tryton/gui/window/win_search.py
@@ -107,10 +107,8 @@ class WinSearch(NoModal):
         if response_id == gtk.RESPONSE_OK:
             res = self.screen.sel_ids_get()
         elif response_id == gtk.RESPONSE_APPLY:
-            if not self.screen.search_filter():
-                res = self.screen.sel_ids_get()
-            else:
-                return
+            self.screen.search_filter(self.screen.screen_container.get_text())
+            return
         elif response_id == gtk.RESPONSE_ACCEPT:
             screen = Screen(self.model_name, domain=self.domain,
                 context=self.context, mode=['form'])
diff --git a/tryton/gui/window/wizard.py b/tryton/gui/window/wizard.py
index e366e3c..19a5f6c 100644
--- a/tryton/gui/window/wizard.py
+++ b/tryton/gui/window/wizard.py
@@ -349,9 +349,13 @@ class WizardDialog(Wizard, NoModal):
             dialog = self.page
         if (hasattr(dialog, 'screen')
                 and dialog.screen.current_record
-                and self.sensible_widget != main.window
-                and self.ids):
-            dialog.screen.reload(self.ids, written=True)
+                and self.sensible_widget != main.window):
+            if dialog.screen.model_name == self.model:
+                ids = self.ids
+            else:
+                # Wizard run from a children record so reload parent record
+                ids = [dialog.screen.current_record.id]
+            dialog.screen.reload(ids, written=True)
 
     def end(self):
         super(WizardDialog, self).end()
diff --git a/tryton/version.py b/tryton/version.py
index d1f1b23..68a2e09 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.6.8"
+VERSION = "2.6.9"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-client



More information about the tryton-debian-vcs mailing list