[tryton-debian-vcs] tryton-client branch upstream-4.2 updated. upstream/4.2.5-1-g8591bc5

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Aug 17 12:18:57 UTC 2017


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

commit 8591bc5abc1fa3e08dbe82d6388ffa658acc0386
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Aug 17 11:51:58 2017 +0200

    Adding upstream version 4.2.6.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index a07020b..a4ecf41 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.6 - 2017-08-08
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.5 - 2017-06-05
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 9bc66c6..2c813f5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: tryton
-Version: 4.2.5
+Version: 4.2.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 9bc66c6..2c813f5 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.5
+Version: 4.2.6
 Summary: Tryton client
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/tryton/__init__.py b/tryton/__init__.py
index 7899013..8f53798 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.5"
+__version__ = "4.2.6"
diff --git a/tryton/common/htmltextbuffer.py b/tryton/common/htmltextbuffer.py
index c8dac47..3b49593 100644
--- a/tryton/common/htmltextbuffer.py
+++ b/tryton/common/htmltextbuffer.py
@@ -1,5 +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.
+from __future__ import division
 from io import BytesIO
 import xml.etree.ElementTree as ET
 from xml.sax.saxutils import escape, unescape
@@ -37,6 +38,12 @@ JUSTIFICATION2ALIGN = _reverse_dict(ALIGN2JUSTIFICATION)
 FAMILIES = ['normal', 'sans', 'serif', 'monospace']
 
 
+def gdk_to_hex(gdk_color):
+    "Convert color to 2 digit hex"
+    colors = [gdk_color.red, gdk_color.green, gdk_color.blue]
+    return "#" + "".join(["%02x" % (color / 256) for color in colors])
+
+
 def _markup(text):
     return '<markup>%s</markup>' % text
 
@@ -233,7 +240,7 @@ def serialize(register, content, start, end, data):
             # Move to next tag toggle
             while True:
                 iter_.forward_char()
-                if iter_.get_char() == '\0':
+                if iter_.compare(end) == 0:
                     break
                 if iter_.toggles_tag():
                     break
@@ -325,7 +332,7 @@ def _get_tags(content, element):
         yield tag_table.lookup('size %s' % size)
     if 'color' in element.attrib:
         yield register_foreground(
-            content, gtk.gdk.Color(element.attrib['color']))
+            content, gtk.gdk.color_parse(element.attrib['color']))
     align = element.attrib.get('align')
     if align in ALIGN2JUSTIFICATION:
         yield tag_table.lookup('justification %s' % align)
@@ -350,8 +357,8 @@ def _get_html(texttag, close=False, div_only=False):
     if texttag.props.scale_set and texttag.props.scale != pango.SCALE_MEDIUM:
         font['size'] = SCALE2SIZE[texttag.props.scale]
     if (texttag.props.foreground_set
-            and texttag.props.foreground_gdk != gtk.gdk.Color()):
-        font['color'] = str(texttag.props.foreground_gdk)
+            and texttag.props.foreground_gdk != gtk.gdk.Color(0, 0, 0)):
+        font['color'] = gdk_to_hex(texttag.props.foreground_gdk)
     # TODO style background-color
     if font:
         tags.append('font')
@@ -393,7 +400,7 @@ if __name__ == '__main__':
  <u>Underline</u>
 <div><br/></div>
 <div align="center">Center</div>
-<div><font face="sans" size="6">Sans6<font color="#f00">red</font></font></div>
+<div><font face="sans" size="6">Sans6<font color="#ff0000">red</font></font></div>
 <div align="center"> <b> <i><u>Title</u></i> </b></div>'''
 
     win = gtk.Window()
diff --git a/tryton/data/locale/bg/LC_MESSAGES/tryton.mo b/tryton/data/locale/bg/LC_MESSAGES/tryton.mo
index 1718f8e..096543c 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/bg/LC_MESSAGES/tryton.po b/tryton/data/locale/bg/LC_MESSAGES/tryton.po
index e78eff1..ca324f8 100644
--- a/tryton/data/locale/bg/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/bg/LC_MESSAGES/tryton.po
@@ -541,7 +541,7 @@ msgstr "Затваряне на таб"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Прикачен файл(%d)"
+msgstr "Прикачен файл(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/ca/LC_MESSAGES/tryton.mo b/tryton/data/locale/ca/LC_MESSAGES/tryton.mo
index de3a17d..91f85cd 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 f5c66d9..928f453 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/cs/LC_MESSAGES/tryton.po b/tryton/data/locale/cs/LC_MESSAGES/tryton.po
index 3710b80..7ee0870 100644
--- a/tryton/data/locale/cs/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/cs/LC_MESSAGES/tryton.po
@@ -542,7 +542,7 @@ msgstr "Zavřít záložku"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Příloha(%d)"
+msgstr "Příloha(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 #, fuzzy
diff --git a/tryton/data/locale/de/LC_MESSAGES/tryton.mo b/tryton/data/locale/de/LC_MESSAGES/tryton.mo
index 8820877..1006618 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 d2444cc..c2fc36b 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/LC_MESSAGES/tryton.po b/tryton/data/locale/es/LC_MESSAGES/tryton.po
index 6b769e5..9b4f8f4 100644
--- a/tryton/data/locale/es/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/es/LC_MESSAGES/tryton.po
@@ -529,7 +529,7 @@ msgstr "Cerrar pestaña"
 #: tryton/gui/window/attachment.py:22
 #, python-format, python-format, python-format
 msgid "Attachments (%s)"
-msgstr "Adjuntos (%d)"
+msgstr "Adjuntos (%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/es_419/LC_MESSAGES/tryton.mo b/tryton/data/locale/es_419/LC_MESSAGES/tryton.mo
index c16d91e..aab03bf 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 ca7f0e7..dfc7d31 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 2151a7f..98c82ee 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/hu_HU/LC_MESSAGES/tryton.po b/tryton/data/locale/hu_HU/LC_MESSAGES/tryton.po
index 930a3df..6e64d27 100644
--- a/tryton/data/locale/hu_HU/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/hu_HU/LC_MESSAGES/tryton.po
@@ -534,7 +534,7 @@ msgstr "Lap bezárása"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Melléklet(%d)"
+msgstr "Melléklet(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/it_IT/LC_MESSAGES/tryton.mo b/tryton/data/locale/it_IT/LC_MESSAGES/tryton.mo
index e0ff515..d2ed089 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/it_IT/LC_MESSAGES/tryton.po b/tryton/data/locale/it_IT/LC_MESSAGES/tryton.po
index 21405c0..a358f9c 100644
--- a/tryton/data/locale/it_IT/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/it_IT/LC_MESSAGES/tryton.po
@@ -535,7 +535,7 @@ msgstr "Chiudere la scheda"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Allegato(%d)"
+msgstr "Allegato(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.mo b/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.mo
index fe8810a..49ab524 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/ja_JP/LC_MESSAGES/tryton.po b/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.po
index 58d78d5..081eea4 100644
--- a/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/ja_JP/LC_MESSAGES/tryton.po
@@ -543,7 +543,7 @@ msgstr "タブを閉じる"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "添付(%d)"
+msgstr "添付(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 #, fuzzy
diff --git a/tryton/data/locale/lo/LC_MESSAGES/tryton.mo b/tryton/data/locale/lo/LC_MESSAGES/tryton.mo
index 0737e05..acd3ea9 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/lo/LC_MESSAGES/tryton.po b/tryton/data/locale/lo/LC_MESSAGES/tryton.po
index d3adf21..78e926c 100644
--- a/tryton/data/locale/lo/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/lo/LC_MESSAGES/tryton.po
@@ -535,7 +535,7 @@ msgstr "ອັດແຖບງານ"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "ຄັດຕິດ(%d)"
+msgstr "ຄັດຕິດ(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/lt/LC_MESSAGES/tryton.mo b/tryton/data/locale/lt/LC_MESSAGES/tryton.mo
index 82423db..e8473a3 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/lt/LC_MESSAGES/tryton.po b/tryton/data/locale/lt/LC_MESSAGES/tryton.po
index 54a85ea..1537620 100644
--- a/tryton/data/locale/lt/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/lt/LC_MESSAGES/tryton.po
@@ -539,7 +539,7 @@ msgstr "Uždaryti kortelę"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Priedai(%d)"
+msgstr "Priedai(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/nl/LC_MESSAGES/tryton.mo b/tryton/data/locale/nl/LC_MESSAGES/tryton.mo
index 6532b2c..019eaa4 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/nl/LC_MESSAGES/tryton.po b/tryton/data/locale/nl/LC_MESSAGES/tryton.po
index 505550c..53593a5 100644
--- a/tryton/data/locale/nl/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/nl/LC_MESSAGES/tryton.po
@@ -546,7 +546,7 @@ msgstr "Tabblad sluiten"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Bijlage (%d)"
+msgstr "Bijlage (%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 #, fuzzy
diff --git a/tryton/data/locale/pl/LC_MESSAGES/tryton.mo b/tryton/data/locale/pl/LC_MESSAGES/tryton.mo
index edc7344..5c18ea3 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 4342fc3..9ca7674 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/pt_BR/LC_MESSAGES/tryton.po b/tryton/data/locale/pt_BR/LC_MESSAGES/tryton.po
index ff983cb..1b29ff9 100644
--- a/tryton/data/locale/pt_BR/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/pt_BR/LC_MESSAGES/tryton.po
@@ -536,7 +536,7 @@ msgstr "Fechar Aba"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Anexo(%d)"
+msgstr "Anexo(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/ru/LC_MESSAGES/tryton.mo b/tryton/data/locale/ru/LC_MESSAGES/tryton.mo
index f7df1b1..96e3b5d 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/ru/LC_MESSAGES/tryton.po b/tryton/data/locale/ru/LC_MESSAGES/tryton.po
index 4d4e939..98cf118 100644
--- a/tryton/data/locale/ru/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/ru/LC_MESSAGES/tryton.po
@@ -541,7 +541,7 @@ msgstr "Закрыть вкладку"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "Вложений (%d)"
+msgstr "Вложений (%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/data/locale/sl/LC_MESSAGES/tryton.mo b/tryton/data/locale/sl/LC_MESSAGES/tryton.mo
index 96e2bed..4a6243c 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 ad3ddc8..060637d 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/data/locale/zh_CN/LC_MESSAGES/tryton.po b/tryton/data/locale/zh_CN/LC_MESSAGES/tryton.po
index d62306a..41381e1 100644
--- a/tryton/data/locale/zh_CN/LC_MESSAGES/tryton.po
+++ b/tryton/data/locale/zh_CN/LC_MESSAGES/tryton.po
@@ -534,7 +534,7 @@ msgstr "关闭标签"
 #: tryton/gui/window/attachment.py:22
 #, python-format, fuzzy, python-format
 msgid "Attachments (%s)"
-msgstr "附件文档(%d)"
+msgstr "附件文档(%s)"
 
 #: tryton/gui/window/board.py:19 tryton/gui/window/form.py:32
 msgid "New"
diff --git a/tryton/gui/window/revision.py b/tryton/gui/window/revision.py
index 3a4d8a1..fb3f111 100644
--- a/tryton/gui/window/revision.py
+++ b/tryton/gui/window/revision.py
@@ -30,8 +30,8 @@ class Revision(object):
         label = gtk.Label(_('Revision:'))
         hbox.pack_start(label, expand=True, fill=True)
         list_store = gtk.ListStore(str, str)
-        combobox = gtk.ComboBoxEntry()
-        combobox.set_model(list_store)
+        # Set model on instantiation to get the default cellrenderer as text
+        combobox = gtk.ComboBoxEntry(model=list_store)
         self.entry = combobox.get_child()
         self.entry.connect('focus-out-event', self.focus_out)
         self.entry.connect('activate', self.activate)
diff --git a/tryton/gui/window/view_form/screen/screen.py b/tryton/gui/window/view_form/screen/screen.py
index 3450638..b50b9d6 100644
--- a/tryton/gui/window/view_form/screen/screen.py
+++ b/tryton/gui/window/view_form/screen/screen.py
@@ -586,11 +586,13 @@ class Screen(SignalEvent):
         fields = self.current_view.get_fields()
         path = self.current_record.get_path(self.group)
         if self.current_view.view_type == 'tree':
-            saved = all(self.group.save())
+            # False value must be not saved
+            saved = all((x is 0 or x > 0 for x in self.group.save()))
             record_id = self.current_record.id
         elif self.current_record.validate(fields):
             record_id = self.current_record.save(force_reload=True)
-            saved = bool(record_id)
+            # False value must be not saved
+            saved = record_id is 0 or record_id > 0
         else:
             self.set_cursor()
             self.current_view.display()
diff --git a/tryton/gui/window/view_form/view/form_gtk/richtextbox.py b/tryton/gui/window/view_form/view/form_gtk/richtextbox.py
index 0023471..5217dc3 100644
--- a/tryton/gui/window/view_form/view/form_gtk/richtextbox.py
+++ b/tryton/gui/window/view_form/view/form_gtk/richtextbox.py
@@ -295,12 +295,13 @@ class RichTextBox(TextBox):
 
         dialog = gtk.ColorSelectionDialog(_('Select a color'))
         dialog.set_transient_for(get_toplevel_window())
-        dialog.colorsel.set_has_palette(True)
+        colorsel = dialog.get_color_selection()
+        colorsel.set_has_palette(True)
         color = self.colors.get(name)
         if color:
-            dialog.colorsel.set_current_color(color)
+            colorsel.set_current_color(color)
         if dialog.run() == gtk.RESPONSE_OK:
-            color = dialog.colorsel.get_current_color()
+            color = colorsel.get_current_color()
             self.colors[name] = color
             if start is not None and end is not None:
                 start = self.text_buffer.get_iter_at_offset(start)
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 3affbdf..76a93d1 100644
--- a/tryton/gui/window/view_form/view/list_gtk/editabletree.py
+++ b/tryton/gui/window/view_form/view/list_gtk/editabletree.py
@@ -98,6 +98,9 @@ class EditableTreeView(TreeView):
             method = model.append
         new_record = model.group.new()
         res = method(new_record)
+        sequence = self.view.attributes.get('sequence')
+        if sequence:
+            model.group.set_sequence(field=sequence)
         return res
 
     def set_cursor(self, path, focus_column=None, start_editing=False):
-- 
tryton-client



More information about the tryton-debian-vcs mailing list