[tryton-debian-vcs] tryton-client branch debian updated. debian/4.2.0-2-2-g40e8531

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Jan 5 10:47:03 UTC 2017


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/4.2.0-2-2-g40e8531

commit 40e8531040081249195574eeeebcc6ff59aca2c7
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jan 4 12:47:42 2017 +0100

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

diff --git a/debian/changelog b/debian/changelog
index 189e81c..e8f7638 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-client (4.2.1-1) unstable; urgency=medium
+
+  * Merging upstream version 4.2.1.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 04 Jan 2017 12:47:41 +0100
+
 tryton-client (4.2.0-2) unstable; urgency=medium
 
   * Replace fixed Python paths by dynamic paths.
commit 585b2da77ff498fd4912f69cf168addb583c8fcd
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jan 4 12:47:41 2017 +0100

    Merging upstream version 4.2.1.

diff --git a/CHANGELOG b/CHANGELOG
index 11335a1..dba7a77 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.1 - 2017-01-03
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.0 - 2016-11-28
 * Bug fixes (see mercurial logs for details)
 * Add support for GTK+ 3.0
diff --git a/PKG-INFO b/PKG-INFO
index e60659f..265f251 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 4.2.0
+Version: 4.2.1
 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 e60659f..265f251 100644
--- a/tryton.egg-info/PKG-INFO
+++ b/tryton.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton client
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/tryton/__init__.py b/tryton/__init__.py
index 9d9331b..75fc627 100644
--- a/tryton/__init__.py
+++ b/tryton/__init__.py
@@ -1,3 +1,3 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
-__version__ = "4.2.0"
+__version__ = "4.2.1"
diff --git a/tryton/client.py b/tryton/client.py
index f57d4d1..d979f52 100644
--- a/tryton/client.py
+++ b/tryton/client.py
@@ -104,24 +104,6 @@ if os.environ.get('GTK_VERSION', '2').startswith('3'):
     Pango.SCALE_LARGE = 1.2
     Pango.SCALE_X_LARGE = 1.2 * 1.2
     Pango.SCALE_XX_LARGE = 1.2 * 1.2 * 1.2
-
-    style_provider = Gtk.CssProvider()
-    css = """
-    #editable {
-        background-color: @theme_base_color;
-        color: @theme_text_color;
-    }
-    #readonly {
-        background-color: @insensitive_bg_color;
-        color: @insensitive_fg_color;
-    }
-    """
-    style_provider.load_from_data(css)
-    Gtk.StyleContext.add_provider_for_screen(
-        Gdk.Screen.get_default(),
-        style_provider,
-        Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
-
 else:
     import pygtk
     pygtk.require('2.0')
diff --git a/tryton/common/common.py b/tryton/common/common.py
index a5dc066..cb7e54e 100644
--- a/tryton/common/common.py
+++ b/tryton/common/common.py
@@ -1187,9 +1187,9 @@ class RPCProgress(object):
             # Parent is only useful if it is asynchronous
             # otherwise the cursor is not updated.
             self.parent = get_toplevel_window()
-            if self.parent.window:
+            if self.parent.get_window():
                 watch = gtk.gdk.Cursor(gtk.gdk.WATCH)
-                self.parent.window.set_cursor(watch)
+                self.parent.get_window().set_cursor(watch)
             thread.start_new_thread(self.start, ())
             return
         else:
@@ -1197,8 +1197,8 @@ class RPCProgress(object):
             return self.process()
 
     def process(self):
-        if self.parent and self.parent.window:
-            self.parent.window.set_cursor(None)
+        if self.parent and self.parent.get_window():
+            self.parent.get_window().set_cursor(None)
         if self.exception:
             if self.process_exception_p:
                 def rpc_execute(*args):
diff --git a/tryton/common/placeholder_entry.py b/tryton/common/placeholder_entry.py
index a9e5c35..17ff13e 100644
--- a/tryton/common/placeholder_entry.py
+++ b/tryton/common/placeholder_entry.py
@@ -38,6 +38,8 @@ else:
         def set_placeholder_text(self, text):
             self._placeholder = text
             if not self.has_focus():
+                if self._default:
+                    super(PlaceholderEntry, self).set_text('')
                 self._focus_out()
 
         def get_text(self):
@@ -65,6 +67,8 @@ if __name__ == '__main__':
 
     placeholder_entry = PlaceholderEntry()
     placeholder_entry.set_placeholder_text('Placeholder')
+    # Set twice to check placeholder does not become text
+    placeholder_entry.set_placeholder_text('Placeholder')
     vbox.pack_start(placeholder_entry)
 
     win.show_all()
diff --git a/tryton/common/treeviewcontrol.py b/tryton/common/treeviewcontrol.py
index 79c4192..b886772 100644
--- a/tryton/common/treeviewcontrol.py
+++ b/tryton/common/treeviewcontrol.py
@@ -13,10 +13,6 @@ __all__ = ['TreeViewControl']
 
 
 class TreeViewControl(gtk.TreeView):
-    __gsignals__ = {
-        'button-press-event': 'override',
-        'key-press-event': 'override',
-        }
 
     def do_button_press_event(self, event):
         self.grab_focus()  # grab focus because it doesn't whith CONTROL MASK
diff --git a/tryton/common/widget_style.py b/tryton/common/widget_style.py
index 09ccceb..ab93099 100644
--- a/tryton/common/widget_style.py
+++ b/tryton/common/widget_style.py
@@ -18,4 +18,5 @@ if gtk_version == 2:
             widget.modify_bg(gtk.STATE_NORMAL, style.bg[gtk.STATE_INSENSITIVE])
 else:
     def set_widget_style(widget, editable):
-        widget.set_name('editable' if editable else 'readonly')
+        # TODO
+        pass
diff --git a/tryton/data/locale/bg/LC_MESSAGES/tryton.mo b/tryton/data/locale/bg/LC_MESSAGES/tryton.mo
index 67f3faf..9dc29ea 100644
Binary files a/tryton/data/locale/bg/LC_MESSAGES/tryton.mo and b/tryton/data/locale/bg/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/ca/LC_MESSAGES/tryton.mo b/tryton/data/locale/ca/LC_MESSAGES/tryton.mo
index 0499b42..10fbd9c 100644
Binary files a/tryton/data/locale/ca/LC_MESSAGES/tryton.mo and b/tryton/data/locale/ca/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/cs/LC_MESSAGES/tryton.mo b/tryton/data/locale/cs/LC_MESSAGES/tryton.mo
index ca1f5cb..7072fc1 100644
Binary files a/tryton/data/locale/cs/LC_MESSAGES/tryton.mo and b/tryton/data/locale/cs/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/de/LC_MESSAGES/tryton.mo b/tryton/data/locale/de/LC_MESSAGES/tryton.mo
index 54174ec..45eafd4 100644
Binary files a/tryton/data/locale/de/LC_MESSAGES/tryton.mo and b/tryton/data/locale/de/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/es/LC_MESSAGES/tryton.mo b/tryton/data/locale/es/LC_MESSAGES/tryton.mo
index 069520f..5e40ab7 100644
Binary files a/tryton/data/locale/es/LC_MESSAGES/tryton.mo and b/tryton/data/locale/es/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/es_419/LC_MESSAGES/tryton.mo b/tryton/data/locale/es_419/LC_MESSAGES/tryton.mo
index 565f539..789a924 100644
Binary files a/tryton/data/locale/es_419/LC_MESSAGES/tryton.mo and b/tryton/data/locale/es_419/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/fr/LC_MESSAGES/tryton.mo b/tryton/data/locale/fr/LC_MESSAGES/tryton.mo
index 17ba5b4..6fade0f 100644
Binary files a/tryton/data/locale/fr/LC_MESSAGES/tryton.mo and b/tryton/data/locale/fr/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/hu_HU/LC_MESSAGES/tryton.mo b/tryton/data/locale/hu_HU/LC_MESSAGES/tryton.mo
index 47ed466..f8d849f 100644
Binary files a/tryton/data/locale/hu_HU/LC_MESSAGES/tryton.mo and b/tryton/data/locale/hu_HU/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/it_IT/LC_MESSAGES/tryton.mo b/tryton/data/locale/it_IT/LC_MESSAGES/tryton.mo
index ce33fa7..a4fcc7f 100644
Binary files a/tryton/data/locale/it_IT/LC_MESSAGES/tryton.mo and b/tryton/data/locale/it_IT/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.mo b/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.mo
index 06be136..642970b 100644
Binary files a/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.mo and b/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/lo/LC_MESSAGES/tryton.mo b/tryton/data/locale/lo/LC_MESSAGES/tryton.mo
index 9f09e3d..4fb0557 100644
Binary files a/tryton/data/locale/lo/LC_MESSAGES/tryton.mo and b/tryton/data/locale/lo/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/lt/LC_MESSAGES/tryton.mo b/tryton/data/locale/lt/LC_MESSAGES/tryton.mo
index d8439be..22deb8a 100644
Binary files a/tryton/data/locale/lt/LC_MESSAGES/tryton.mo and b/tryton/data/locale/lt/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/nl/LC_MESSAGES/tryton.mo b/tryton/data/locale/nl/LC_MESSAGES/tryton.mo
index e6ce9e4..b5c8782 100644
Binary files a/tryton/data/locale/nl/LC_MESSAGES/tryton.mo and b/tryton/data/locale/nl/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/pl/LC_MESSAGES/tryton.mo b/tryton/data/locale/pl/LC_MESSAGES/tryton.mo
index 7403fcf..989ccb4 100644
Binary files a/tryton/data/locale/pl/LC_MESSAGES/tryton.mo and b/tryton/data/locale/pl/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/pt_BR/LC_MESSAGES/tryton.mo b/tryton/data/locale/pt_BR/LC_MESSAGES/tryton.mo
index d319832..7879e86 100644
Binary files a/tryton/data/locale/pt_BR/LC_MESSAGES/tryton.mo and b/tryton/data/locale/pt_BR/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/ru/LC_MESSAGES/tryton.mo b/tryton/data/locale/ru/LC_MESSAGES/tryton.mo
index 7b58960..48a5536 100644
Binary files a/tryton/data/locale/ru/LC_MESSAGES/tryton.mo and b/tryton/data/locale/ru/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/sl/LC_MESSAGES/tryton.mo b/tryton/data/locale/sl/LC_MESSAGES/tryton.mo
index 8eac9a0..3a4276d 100644
Binary files a/tryton/data/locale/sl/LC_MESSAGES/tryton.mo and b/tryton/data/locale/sl/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/zh_CN/LC_MESSAGES/tryton.mo b/tryton/data/locale/zh_CN/LC_MESSAGES/tryton.mo
index 1ffe416..528d156 100644
Binary files a/tryton/data/locale/zh_CN/LC_MESSAGES/tryton.mo and b/tryton/data/locale/zh_CN/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/gui/main.py b/tryton/gui/main.py
index c0f49d0..7ed1d7a 100644
--- a/tryton/gui/main.py
+++ b/tryton/gui/main.py
@@ -1272,7 +1272,7 @@ class Main(object):
             try:
                 view_ids = json.loads(params.get('views', 'false'))
                 limit = json.loads(params.get('limit', 'null'))
-                name = json.loads(params.get('name', ''))
+                name = json.loads(params.get('name', '""'))
                 search_value = json.loads(params.get('search_value', '{}'),
                     object_hook=object_hook)
                 domain = json.loads(params.get('domain', '[]'),
@@ -1304,7 +1304,7 @@ class Main(object):
                 direct_print = json.loads(params.get('direct_print', 'false'))
                 email_print = json.loads(params.get('email_print', 'false'))
                 email = json.loads(params.get('email', 'null'))
-                name = json.loads(params.get('name', 'false'))
+                name = json.loads(params.get('name', '""'))
                 window = json.loads(params.get('window', 'false'))
                 context = json.loads(params.get('context', '{}'),
                     object_hook=object_hook)
diff --git a/tryton/gui/window/revision.py b/tryton/gui/window/revision.py
index c2aaaac..1c37d08 100644
--- a/tryton/gui/window/revision.py
+++ b/tryton/gui/window/revision.py
@@ -30,8 +30,9 @@ class Revision(object):
         label = gtk.Label(_('Revision:'))
         hbox.pack_start(label, expand=True, fill=True)
         list_store = gtk.ListStore(str, str)
-        combobox = gtk.ComboBoxEntry(list_store)
-        self.entry = combobox.child
+        combobox = gtk.ComboBoxEntry()
+        combobox.set_model(list_store)
+        self.entry = combobox.get_child()
         self.entry.connect('focus-out-event', self.focus_out)
         self.entry.connect('activate', self.activate)
         label.set_mnemonic_widget(self.entry)
diff --git a/tryton/gui/window/view_board/view_board.py b/tryton/gui/window/view_board/view_board.py
index d800455..360883a 100644
--- a/tryton/gui/window/view_board/view_board.py
+++ b/tryton/gui/window/view_board/view_board.py
@@ -115,7 +115,8 @@ class ViewBoard(object):
     def _parse_group(self, node, container, attributes):
         group = self.parse(node)
         group.table.set_homogeneous(attributes.get('homogeneous', False))
-        frame = gtk.Frame(attributes.get('string'))
+        frame = gtk.Frame()
+        frame.set_label(attributes.get('string'))
         if not attributes.get('string'):
             frame.set_shadow_type(gtk.SHADOW_NONE)
         frame.set_border_width(0)
diff --git a/tryton/gui/window/view_form/model/group.py b/tryton/gui/window/view_form/model/group.py
index 72584ae..7855eb3 100644
--- a/tryton/gui/window/view_form/model/group.py
+++ b/tryton/gui/window/view_form/model/group.py
@@ -299,7 +299,7 @@ class Group(SignalEvent, list):
         for record in self:
             # Assume not loaded records are correctly ordered
             # as far as we do not change any previous records.
-            if (record.get_loaded([field]) and not changed) or record.id < 0:
+            if record.get_loaded([field]) or changed or record.id < 0:
                 if prev:
                     index = prev[field].get(prev)
                 else:
@@ -314,7 +314,7 @@ class Group(SignalEvent, list):
                 if value == index:
                     if prev and record.id >= 0:
                         update = record.id < prev.id
-                elif value < index:
+                elif value <= (index or 0):
                     update = True
                 if update:
                     if index is None:
diff --git a/tryton/gui/window/view_form/view/form_gtk/dictionary.py b/tryton/gui/window/view_form/view/form_gtk/dictionary.py
index 32b5826..f712ff4 100644
--- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py
+++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py
@@ -84,11 +84,12 @@ class DictSelectionEntry(DictEntry):
         widget = gtk.ComboBoxEntry()
 
         # customizing entry
-        widget.child.props.activates_default = True
-        widget.child.connect('changed', self.parent_widget.send_modified)
-        widget.child.connect('focus-out-event',
+        child = widget.get_child()
+        child.props.activates_default = True
+        child.connect('changed', self.parent_widget.send_modified)
+        child.connect('focus-out-event',
             lambda w, e: self.parent_widget._focus_out())
-        widget.child.connect('activate',
+        child.connect('activate',
             lambda w: self.parent_widget._focus_out())
         widget.connect('notify::active',
             lambda w, e: self.parent_widget._focus_out())
@@ -109,18 +110,19 @@ class DictSelectionEntry(DictEntry):
             width = max(width, len(name))
         widget.set_model(model)
         widget.set_text_column(0)
-        widget.child.set_width_chars(width)
+        child.set_width_chars(width)
         completion = gtk.EntryCompletion()
         completion.set_inline_selection(True)
         completion.set_model(model)
-        widget.child.set_completion(completion)
+        child.set_completion(completion)
         completion.set_text_column(0)
         return widget
 
     def get_value(self):
-        if not self.widget.child:  # widget is destroyed
+        child = self.widget.get_child()
+        if not child:  # widget is destroyed
             return
-        text = self.widget.child.get_text()
+        text = child.get_text()
         value = None
         if text:
             for txt, val in self._selection.items():
@@ -134,8 +136,9 @@ class DictSelectionEntry(DictEntry):
 
     def set_value(self, value):
         values = dict(self.definition['selection'])
-        self.widget.child.set_text(values.get(value, ''))
-        reset_position(self.widget.child)
+        child = self.widget.get_child()
+        child.set_text(values.get(value, ''))
+        reset_position(child)
 
     def set_readonly(self, readonly):
         self.widget.set_sensitive(not readonly)
@@ -319,7 +322,8 @@ class DictWidget(Widget):
         self.buttons = {}
         self.rows = {}
 
-        self.widget = gtk.Frame(attrs.get('string', ''))
+        self.widget = gtk.Frame()
+        self.widget.set_label(attrs.get('string', ''))
         self.widget.set_shadow_type(gtk.SHADOW_OUT)
 
         vbox = gtk.VBox()
diff --git a/tryton/gui/window/view_form/view/form_gtk/multiselection.py b/tryton/gui/window/view_form/view/form_gtk/multiselection.py
index 6543290..26a737c 100644
--- a/tryton/gui/window/view_form/view/form_gtk/multiselection.py
+++ b/tryton/gui/window/view_form/view/form_gtk/multiselection.py
@@ -47,7 +47,7 @@ class MultiSelection(Widget, SelectionMixin):
         super(MultiSelection, self)._readonly_set(readonly)
         set_widget_style(self.tree, not readonly)
         selection = self.tree.get_selection()
-        selection.set_select_function(lambda info: not readonly)
+        selection.set_select_function(lambda *a: not readonly)
 
     @property
     def modified(self):
@@ -77,7 +77,7 @@ class MultiSelection(Widget, SelectionMixin):
         try:
             # Remove select_function to allow update,
             # it will be set back in the super call
-            selection.set_select_function(lambda info: True)
+            selection.set_select_function(lambda *a: True)
             self.update_selection(record, field)
             self.model.clear()
             if field is None:
diff --git a/tryton/gui/window/view_form/view/form_gtk/selection.py b/tryton/gui/window/view_form/view/form_gtk/selection.py
index a3663ee..b9d1062 100644
--- a/tryton/gui/window/view_form/view/form_gtk/selection.py
+++ b/tryton/gui/window/view_form/view/form_gtk/selection.py
@@ -44,11 +44,11 @@ class Selection(Widget, SelectionMixin, PopdownMixin):
         gobject.idle_add(focus_out)
 
     def _move_active(self, combobox, scroll_type):
-        if not combobox.child.get_editable():
+        if not combobox.get_child().get_editable():
             combobox.emit_stop_by_name('move-active')
 
     def _scroll_event(self, combobox, event):
-        if not combobox.child.get_editable():
+        if not combobox.get_child().get_editable():
             combobox.emit_stop_by_name('scroll-event')
 
     def _readonly_set(self, value):
diff --git a/tryton/gui/window/view_form/view/list_gtk/widget.py b/tryton/gui/window/view_form/view/list_gtk/widget.py
index 4a2957b..e950dfe 100644
--- a/tryton/gui/window/view_form/view/list_gtk/widget.py
+++ b/tryton/gui/window/view_form/view/list_gtk/widget.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.
-
+import datetime
 import os
 import tempfile
 import gtk
@@ -387,7 +387,9 @@ class Time(Date):
             return ''
         value = record[self.attrs['name']].get_client(record)
         if value is not None:
-            return datetime_strftime(value, self.renderer.props.format)
+            if isinstance(value, datetime.datetime):
+                value = value.time()
+            return value.strftime(self.renderer.props.format)
         else:
             return ''
 
-- 
tryton-client



More information about the tryton-debian-vcs mailing list