Hello community,

here is the log from the commit of package gnuhealth-client for 
openSUSE:Leap:15.2 checked in at 2020-05-18 11:00:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/gnuhealth-client (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.gnuhealth-client.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnuhealth-client"

Mon May 18 11:00:46 2020 rev:33 rq:806283 version:3.6.9

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/gnuhealth-client/gnuhealth-client.changes      
2020-03-02 13:26:07.490728514 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.gnuhealth-client.new.2738/gnuhealth-client.changes
    2020-05-18 11:00:47.322809614 +0200
@@ -1,0 +2,6 @@
+Sun May 17 16:20:07 UTC 2020 - Axel Braun <[email protected]>
+
+- version 3.6.9
+  various bugfixes (including boo#1170553)
+
+-------------------------------------------------------------------

Old:
----
  gnuhealth-client-3.6.8.tar.gz

New:
----
  gnuhealth-client-3.6.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnuhealth-client.spec ++++++
--- /var/tmp/diff_new_pack.0Ic6U6/_old  2020-05-18 11:00:47.742810483 +0200
+++ /var/tmp/diff_new_pack.0Ic6U6/_new  2020-05-18 11:00:47.742810483 +0200
@@ -19,7 +19,7 @@
 
 %define majorver 3.6
 Name:           gnuhealth-client
-Version:        %{majorver}.8
+Version:        %{majorver}.9
 Release:        0
 Summary:        The client of the GNU Health Hospital system
 License:        GPL-3.0-only

++++++ gnuhealth-client-3.6.8.tar.gz -> gnuhealth-client-3.6.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/Changelog 
new/gnuhealth-client-3.6.9/Changelog
--- old/gnuhealth-client-3.6.8/Changelog        2020-03-01 14:23:57.000000000 
+0100
+++ new/gnuhealth-client-3.6.9/Changelog        2020-05-17 13:58:49.000000000 
+0200
@@ -1,3 +1,95 @@
+changeset:   3622:8b32ea377d93
+user:        Luis Falcon <[email protected]>
+date:        Wed May 13 17:52:31 2020 +0100
+summary:     Fix button images for adding or removing server profiles
+
+changeset:   3604:2b8390eecda9
+tag:         tip
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:59:16 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6742. Do not rely on 
cursor column for event with renderer
+
+changeset:   3603:578670170a17
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:55:21 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6739. Use empty text 
for empty Reference in editable tree
+
+changeset:   3602:15de353933f2
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:40:51 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6732. Skip invalid 
branch of domain without the inverted field
+
+changeset:   3601:87ac854f3ac2
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:39:59 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6729. Filter leaf 
before preparing reference domain
+
+changeset:   3600:be059871324d
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:39:06 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6726. Add keys method 
on EvalEnvironment
+
+changeset:   3599:2b1ba0c62e42
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:37:46 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6699. Do not force 
value in OR-ed clause
+
+changeset:   3598:4a3f363933ff
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:35:39 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6694. Set margin on 
main notebook widget
+
+changeset:   3597:8519d1666cdb
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:33:18 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6672. Do not detect or 
set style if there no toolbar
+
+changeset:   3596:0ebc88d9a970
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:31:54 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6666. Use locale 
context to format date in domain parser
+
+changeset:   3595:9195736b2af4
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:30:17 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6649. Do not set all 
day for datetime instance
+
+changeset:   3594:f60c7bc4918c
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:27:53 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6644.  Use 
locale.localize() and new format to format Decimal
+
+changeset:   3593:cd2c5da1e2d5
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:23:34 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6641. Remove id from 
screen context and compare proper attributes
+
+changeset:   3592:cf61240f2e0b
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:21:34 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6630. Consider event 
as all day only for date instances
+
+changeset:   3591:8942523827ed
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:13:44 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6613. Replace sig_quit 
by on_quit call when canceling login
+
+changeset:   3590:51633570b474
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:10:59 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6611. Ensure all 
containers set the tooltip
+
+changeset:   3589:6fdf15f6e590
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:06:30 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6609.  Align CENTER 
instead of FILL when the widget is not expanded
+
+changeset:   3588:21aa23e96452
+user:        Luis Falcon <[email protected]>
+date:        Mon May 04 17:00:20 2020 +0100
+summary:     GNU Health GTK Client . Apply Tryton patch 6591.  Properly test 
always checkbox in user warning
+
+
 changeset:   3546:acff636f68f4
 tag:         tip
 user:        Luis Falcon <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/PKG-INFO 
new/gnuhealth-client-3.6.9/PKG-INFO
--- old/gnuhealth-client-3.6.8/PKG-INFO 2020-03-01 14:29:43.000000000 +0100
+++ new/gnuhealth-client-3.6.9/PKG-INFO 2020-05-17 14:23:00.303046000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: gnuhealth-client
-Version: 3.6.8
+Version: 3.6.9
 Summary: The GNU Health GTK client
 Home-page: http://www.gnuhealth.org
 Author: GNU Solidario
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/gnuhealth_client.egg-info/PKG-INFO 
new/gnuhealth-client-3.6.9/gnuhealth_client.egg-info/PKG-INFO
--- old/gnuhealth-client-3.6.8/gnuhealth_client.egg-info/PKG-INFO       
2020-03-01 14:29:43.000000000 +0100
+++ new/gnuhealth-client-3.6.9/gnuhealth_client.egg-info/PKG-INFO       
2020-05-17 14:23:00.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: gnuhealth-client
-Version: 3.6.8
+Version: 3.6.9
 Summary: The GNU Health GTK client
 Home-page: http://www.gnuhealth.org
 Author: GNU Solidario
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/tryton/__init__.py 
new/gnuhealth-client-3.6.9/tryton/__init__.py
--- old/gnuhealth-client-3.6.8/tryton/__init__.py       2020-03-01 
14:22:31.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/__init__.py       2020-05-17 
13:59:44.000000000 +0200
@@ -1,8 +1,9 @@
 # This file is part of GNU Health.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
-__version__ = "3.6.8"
+__version__ = "3.6.9"
 SERVER_VERSION = "5.0.0"
 import gi
+import locale
 
 gi.require_version('Gtk', '3.0')
 gi.require_version('Gdk', '3.0')
@@ -17,3 +18,24 @@
     import goocalendar
 except ImportError:
     pass
+
+if not hasattr(locale, 'localize'):
+    def localize(formatted, grouping=False, monetary=False):
+        if '.' in formatted:
+            seps = 0
+            parts = formatted.split('.')
+            if grouping:
+                parts[0], seps = locale._group(parts[0], monetary=monetary)
+            decimal_point = locale.localeconv()[
+                monetary and 'mon_decimal_point' or 'decimal_point']
+            formatted = decimal_point.join(parts)
+            if seps:
+                formatted = locale._strip_padding(formatted, seps)
+        else:
+            seps = 0
+            if grouping:
+                formatted, seps = locale._group(formatted, monetary=monetary)
+            if seps:
+                formatted = locale._strip_padding(formatted, seps)
+        return formatted
+    setattr(locale, 'localize', localize)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/tryton/common/common.py 
new/gnuhealth-client-3.6.9/tryton/common/common.py
--- old/gnuhealth-client-3.6.8/tryton/common/common.py  2020-02-28 
13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/common/common.py  2020-05-17 
13:27:02.000000000 +0200
@@ -592,19 +592,11 @@
 
 class UserWarningDialog(WarningDialog):
 
-    def __init__(self):
-        super(UserWarningDialog, self).__init__()
-        self.always = False
-
-    def _set_always(self, toggle):
-        self.always = toggle.get_active()
-
     def build_dialog(self, *args, **kwargs):
         dialog = super().build_dialog(*args, **kwargs)
-        check = Gtk.CheckButton(label=_('Always ignore this warning.'))
-        check.connect_after('toggled', self._set_always)
+        self.always = Gtk.CheckButton(label=_('Always ignore this warning.'))
         alignment = Gtk.Alignment(xalign=0, yalign=0.5)
-        alignment.add(check)
+        alignment.add(self.always)
         dialog.vbox.pack_start(alignment, expand=True, fill=False, padding=0)
         label = Gtk.Label(
             label=_('Do you want to proceed?'), halign=Gtk.Align.END)
@@ -613,7 +605,7 @@
 
     def process_response(self, response):
         if response == Gtk.ResponseType.YES:
-            if self.always:
+            if self.always.get_active():
                 return 'always'
             return 'ok'
         return 'cancel'
@@ -824,7 +816,7 @@
                     Login()
                 except TrytonError as exception:
                     if exception.faultCode == 'QueryCanceled':
-                        Main().sig_quit()
+                        Main().on_quit()
                     raise
                 finally:
                     PLOCK.release()
@@ -1168,13 +1160,16 @@
     return string[:length - len(ellipsis)] + ellipsis
 
 
-def get_align(float_):
+def get_align(float_, expand=True):
     "Convert float align into Gtk.Align"
     value = float(float_)
     if value < 0.5:
         return Gtk.Align.START
     elif value == 0.5:
-        return Gtk.Align.FILL
+        if expand:
+            return Gtk.Align.FILL
+        else:
+            return Gtk.Align.CENTER
     else:
         return Gtk.Align.END
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/common/domain_inversion.py 
new/gnuhealth-client-3.6.9/tryton/common/domain_inversion.py
--- old/gnuhealth-client-3.6.8/tryton/common/domain_inversion.py        
2020-02-28 13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/common/domain_inversion.py        
2020-05-17 13:27:02.000000000 +0200
@@ -340,6 +340,8 @@
             if isinstance(part, And):
                 part_inversion = part.inverse(symbol, context)
                 evaluated = isinstance(part_inversion, bool)
+                if symbol not in part.variables:
+                    continue
                 if not evaluated:
                     result.append(part_inversion)
                 elif part_inversion:
@@ -370,9 +372,8 @@
     def inverse(self, symbol, context):
         result = []
         known_variables = set(context.keys())
-        if (symbol not in self.variables
-                and not known_variables >= self.variables):
-            # In this case we don't know anything about this OR part, we
+        if not known_variables >= (self.variables - {symbol}):
+            # In this case we don't know enough about this OR part, we
             # consider it to be True (because people will have the constraint
             # on this part later).
             return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/common/domain_parser.py 
new/gnuhealth-client-3.6.9/tryton/common/domain_parser.py
--- old/gnuhealth-client-3.6.8/tryton/common/domain_parser.py   2020-02-28 
13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/common/domain_parser.py   2020-05-17 
13:27:02.000000000 +0200
@@ -10,7 +10,7 @@
 import io
 from collections import OrderedDict
 
-from tryton.common import untimezoned_date, timezoned_date
+from tryton.common import untimezoned_date, timezoned_date, date_format
 from tryton.common.datetime_ import date_parse
 from tryton.common.timedelta import parse as timedelta_parse
 from tryton.common.timedelta import format as timedelta_format
@@ -271,7 +271,8 @@
     def convert_datetime():
         if not value:
             return
-        format_ = context.get('date_format', '%x') + ' %X'
+        format_ = (
+            date_format(context.get('date_format')) + ' ' + time_format(field))
         try:
             dt = date_parse(value, format_)
             return untimezoned_date(dt)
@@ -281,7 +282,7 @@
     def convert_date():
         if not value:
             return
-        format_ = context.get('date_format', '%x')
+        format_ = date_format(context.get('date_format'))
         try:
             return date_parse(value, format_).date()
         except (ValueError, TypeError):
@@ -509,7 +510,8 @@
             digit = len(str(value * factor).rstrip('0').split('.')[1])
         except IndexError:
             digit = 0
-        return locale.format('%.*f', (digit, value * factor or 0), True)
+        return locale.localize(
+            '{0:.{1}f}'.format(value * factor or 0, digit), True)
 
     def format_selection():
         selections = dict(field['selection'])
@@ -524,7 +526,8 @@
     def format_datetime():
         if not value:
             return ''
-        format_ = context.get('date_format', '%x') + ' ' + time_format(field)
+        format_ = (
+            date_format(context.get('date_format')) + ' ' + time_format(field))
         if not isinstance(value, datetime.datetime):
             time = datetime.datetime.combine(value, datetime.time.min)
         else:
@@ -536,7 +539,7 @@
     def format_date():
         if not value:
             return ''
-        format_ = context.get('date_format', '%x')
+        format_ = date_format(context.get('date_format'))
         return value.strftime(format_)
 
     def format_time():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/tryton/common/environment.py 
new/gnuhealth-client-3.6.9/tryton/common/environment.py
--- old/gnuhealth-client-3.6.8/tryton/common/environment.py     2019-10-04 
22:37:30.000000000 +0200
+++ new/gnuhealth-client-3.6.9/tryton/common/environment.py     2020-05-17 
13:27:02.000000000 +0200
@@ -52,3 +52,9 @@
             return item in self.parent.get_eval()
         else:
             return item in self.parent.group.fields
+
+    def keys(self):
+        if self.eval_type == 'eval':
+            return self.parent.get_eval().keys()
+        else:
+            return self.parent.group.fields.keys()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/tryton/common/timedelta.py 
new/gnuhealth-client-3.6.9/tryton/common/timedelta.py
--- old/gnuhealth-client-3.6.8/tryton/common/timedelta.py       2020-02-28 
13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/common/timedelta.py       2020-05-17 
13:27:02.000000000 +0200
@@ -56,7 +56,8 @@
 
     for (k, _), v in zip(converter[:-3], values):
         if v:
-            text.append(locale.format('%d', v, True) + _get_separators()[k])
+            text.append(
+                locale.format_string('%d', v, True) + _get_separators()[k])
     if any(values[-3:]) or not text:
         time = '%02d:%02d' % tuple(values[-3:-1])
         if values[-1] or value:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/tryton/gui/main.py 
new/gnuhealth-client-3.6.9/tryton/gui/main.py
--- old/gnuhealth-client-3.6.8/tryton/gui/main.py       2020-03-01 
13:58:12.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/gui/main.py       2020-05-17 
13:27:02.000000000 +0200
@@ -851,6 +851,7 @@
         hbox.show_all()
         label_menu = Gtk.Label(
             label=page.name, halign=Gtk.Align.START)
+        page.widget.props.margin = 3
         self.notebook.insert_page_menu(page.widget, hbox, label_menu, page_id)
         self.notebook.set_tab_reorderable(page.widget, True)
         self.notebook.set_current_page(page_id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/tryton/gui/window/dblogin.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/dblogin.py
--- old/gnuhealth-client-3.6.8/tryton/gui/window/dblogin.py     2020-02-28 
13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/gui/window/dblogin.py     2020-05-17 
13:27:02.000000000 +0200
@@ -57,16 +57,16 @@
             Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         scroll.add(self.profile_tree)
         self.add_button = Gtk.Button()
-        self.add_button.set_image(common.IconFactory.get_image(
-                'tryton-add', Gtk.IconSize.BUTTON))
+        image = Gtk.Image()
+        image.set_from_stock(Gtk.STOCK_ADD, Gtk.IconSize.BUTTON)
+        self.add_button.set_image(image)
         tooltips.set_tip(self.add_button, _("Add new profile"))
         self.add_button.connect('clicked', self.profile_create)
         self.remove_button = Gtk.Button()
-        self.remove_button.set_image(common.IconFactory.get_image(
-                'tryton-remove', Gtk.IconSize.BUTTON))
+        image = Gtk.Image()
+        image.set_from_stock(Gtk.STOCK_REMOVE, Gtk.IconSize.BUTTON)
+        self.remove_button.set_image(image)
         tooltips.set_tip(self.remove_button, _("Remove selected profile"))
-        self.remove_button.get_style_context().add_class(
-            Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION)
         self.remove_button.connect('clicked', self.profile_delete)
         bbox = Gtk.ButtonBox()
         bbox.pack_start(self.remove_button, expand=True, fill=True, padding=0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/tryton/gui/window/form.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/form.py
--- old/gnuhealth-client-3.6.8/tryton/gui/window/form.py        2020-02-28 
13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/gui/window/form.py        2020-05-17 
13:27:02.000000000 +0200
@@ -92,11 +92,11 @@
         return (self.model == model
             and self.res_id == attributes.get('res_id')
             and self.attributes.get('domain') == attributes.get('domain')
-            and (self.attributes.get('mode') or []) == (
-                attributes.get('mode') or [])
             and self.attributes.get('view_ids') == attributes.get('view_ids')
-            and self.attributes.get('context') == attributes.get('context')
-            and self.attributes.get('limit') == attributes.get('limit')
+            and (attributes.get('view_ids')
+                or (self.attributes.get('mode') or ['tree', 'form']) == (
+                    attributes.get('mode') or ['tree', 'form']))
+            and self.screen.local_context == attributes.get('context')
             and self.attributes.get('search_value') == (
                 attributes.get('search_value')))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/model/field.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/model/field.py
--- old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/model/field.py       
2020-02-28 13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/model/field.py       
2020-05-17 13:27:02.000000000 +0200
@@ -356,14 +356,14 @@
         value = record.value.get(self.name)
         if value is not None:
             digits = self.digits(record, factor=factor)
+            d = value * factor
+            if not isinstance(d, Decimal):
+                d = Decimal(repr(d))
             if digits:
                 p = int(digits[1])
             else:
-                d = value * factor
-                if not isinstance(d, Decimal):
-                    d = Decimal(repr(d))
                 p = -int(d.as_tuple().exponent)
-            return locale.format('%.*f', (p, value * factor), True)
+            return locale.localize('{0:.{1}f}'.format(d, p), True)
         else:
             return ''
 
@@ -841,7 +841,8 @@
                     except ValueError:
                         pass
                 if '%s,%s' % (ref_model, ref_id) == self.get(record):
-                    rec_name = record.value.get(self.name + '.rec_name', '')
+                    rec_name = record.value.get(
+                        self.name + '.', {}).get('rec_name') or ''
                 else:
                     rec_name = ''
             record.value[self.name + '.rec_name'] = rec_name
@@ -876,7 +877,7 @@
         elif ref_model:
             rec_name = ''
         else:
-            rec_name = str(ref_id)
+            rec_name = str(ref_id) if ref_id is not None else ''
         record.value[self.name] = ref_model, ref_id
         record.value[self.name + '.rec_name'] = rec_name
 
@@ -904,10 +905,10 @@
         else:
             model = None
         screen_domain, attr_domain = self.domains_get(record)
+        screen_domain = filter_leaf(screen_domain, self.name, model)
         screen_domain = prepare_reference_domain(screen_domain, self.name)
         return concat(localize_domain(
-                filter_leaf(screen_domain, self.name, model),
-                strip_target=True), attr_domain)
+                screen_domain, strip_target=True), attr_domain)
 
     def get_models(self, record):
         screen_domain, attr_domain = self.domains_get(record)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/screen/screen.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/screen/screen.py
--- old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/screen/screen.py     
2020-02-28 13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/screen/screen.py     
2020-05-17 13:27:02.000000000 +0200
@@ -257,7 +257,9 @@
                 self.context_screen.display(set_cursor=True)
                 return False
             context = self.local_context
-            context.update(self.context_screen.get_on_change_value())
+            screen_context = self.context_screen.get_on_change_value()
+            screen_context.pop('id')
+            context.update(screen_context)
             self.new_group(context)
 
         domain = self.search_domain(search_string, True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py
 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py
       2020-02-28 13:18:25.000000000 +0100
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py
       2020-05-17 13:27:02.000000000 +0200
@@ -77,6 +77,9 @@
         return text_color, bg_color
 
     def display(self, group):
+        def is_date_only(value):
+            return (isinstance(value, datetime.date)
+                and not isinstance(value, datetime.datetime))
         dtstart = self.attrs['dtstart']
         dtend = self.attrs.get('dtend')
         if self.view_calendar.record:
@@ -101,14 +104,11 @@
             else:
                 end = None
             midnight = datetime.time(0)
-            all_day = False
+            all_day = is_date_only(start) and (not end or is_date_only(end))
             if not isinstance(start, datetime.datetime):
                 start = datetime.datetime.combine(start, midnight)
             if end and not isinstance(end, datetime.datetime):
                 end = datetime.datetime.combine(end, midnight)
-                all_day = True
-            elif not end:
-                all_day = True
 
             # Skip invalid event
             if end is not None and start > end:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/form.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/form.py
--- old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/form.py 
2020-02-28 13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/form.py 
2020-05-17 13:27:02.000000000 +0200
@@ -39,7 +39,25 @@
 _ = gettext.gettext
 
 
-class Container(object):
+class _Container(object):
+
+    def __init__(self, col=4, homogeneous=False):
+        super().__init__()
+        if col < 0:
+            col = 0
+        self.col = col
+        self.tooltips = Tooltips()
+        self.tooltips.enable()
+
+    def add_row(self):
+        raise NotImplementedError
+
+    def add_col(self):
+        raise NotImplementedError
+
+    def add(self, widget, attributes):
+        if widget and attributes.get('help'):
+            self.tooltips.set_tip(widget, attributes['help'])
 
     @staticmethod
     def constructor(col=4, homogeneous=False):
@@ -52,17 +70,16 @@
         else:
             return Container(col, homogeneous)
 
+
+class Container(_Container):
+
     def __init__(self, col=4, homogeneous=False):
-        if col < 0:
-            col = 0
-        self.col = col
+        super().__init__(col=col, homogeneous=homogeneous)
         self.container = Gtk.Grid(
             column_spacing=3, row_spacing=3,
             column_homogeneous=homogeneous, row_homogeneous=homogeneous,
             border_width=3)
         self.last = (0, 0)
-        self.tooltips = Tooltips()
-        self.tooltips.enable()
 
     def add_row(self):
         height, width = self.last
@@ -73,6 +90,7 @@
         self.last = (height, width + 1)
 
     def add(self, widget, attributes):
+        super().add(widget, attributes)
 
         colspan = attributes.get('colspan', 1)
         if self.col > 0:
@@ -87,22 +105,17 @@
         height, width = self.last
         self.last = height, width + colspan
 
-        if not widget:
-            return
+        if widget:
+            widget.set_vexpand(bool(attributes.get('yexpand')))
+            widget.set_hexpand(bool(attributes.get('xexpand', True)))
+            widget.show_all()
+            self.container.attach(widget, width, height, colspan, 1)
 
-        widget.set_vexpand(bool(attributes.get('yexpand')))
-        widget.set_hexpand(bool(attributes.get('xexpand', True)))
 
-        if attributes.get('help'):
-            self.tooltips.set_tip(widget, attributes['help'])
-
-        widget.show_all()
-        self.container.attach(widget, width, height, colspan, 1)
-
-
-class VContainer(Container):
+class VContainer(_Container):
     def __init__(self, col=1, homogeneous=False):
-        self.col = 1
+        col = 1
+        super().__init__(col=col, homogeneous=homogeneous)
         self.container = Gtk.VBox()
         self.container.set_homogeneous(homogeneous)
 
@@ -113,16 +126,18 @@
         pass
 
     def add(self, widget, attributes):
-        if not widget:
-            return
-        expand = bool(int(attributes.get('yexpand', False)))
-        fill = bool(int(attributes.get('yfill', False)))
-        self.container.pack_start(widget, expand=expand, fill=fill, padding=2)
+        super().add(widget, attributes)
+        if widget:
+            expand = bool(int(attributes.get('yexpand', False)))
+            fill = bool(int(attributes.get('yfill', False)))
+            self.container.pack_start(
+                widget, expand=expand, fill=fill, padding=2)
 
 
-class HContainer(Container):
+class HContainer(_Container):
     def __init__(self, col=0, homogeneous=False):
-        self.col = 0
+        col = 0
+        super().__init__(col=col, homogeneous=homogeneous)
         self.container = Gtk.HBox()
         self.container.set_homogeneous(homogeneous)
 
@@ -133,11 +148,12 @@
         pass
 
     def add(self, widget, attributes):
-        if not widget:
-            return
-        expand = bool(int(attributes.get('xexpand', True)))
-        fill = bool(int(attributes.get('xfill', True)))
-        self.container.pack_start(widget, expand=expand, fill=fill, padding=1)
+        super().add(widget, attributes)
+        if widget:
+            expand = bool(int(attributes.get('xexpand', True)))
+            fill = bool(int(attributes.get('xfill', True)))
+            self.container.pack_start(
+                widget, expand=expand, fill=fill, padding=1)
 
 
 class FormXMLViewParser(XMLViewParser):
@@ -222,8 +238,12 @@
                 int(attributes.get('width', -1)),
                 int(attributes.get('height', -1)))
 
-        widget.widget.set_halign(get_align(attributes.get('xalign', 0.5)))
-        widget.widget.set_valign(get_align(attributes.get('yalign', 0.5)))
+        widget.widget.set_halign(get_align(
+                attributes.get('xalign', 0.5),
+                bool(attributes.get('xexpand', True))))
+        widget.widget.set_valign(get_align(
+                attributes.get('yalign', 0.5),
+                bool(attributes.get('yexpand'))))
         self.container.add(widget.widget, attributes)
 
         if name in self._mnemonics and widget.mnemonic_widget:
@@ -247,8 +267,12 @@
         vbox = VBox(attrs=attributes)
         if attributes.get('string'):
             label = Label(label=attributes['string'], attrs=attributes)
-            label.set_halign(get_align(attributes.get('xalign', 0.0)))
-            label.set_valign(get_align(attributes.get('yalign', 0.5)))
+            label.set_halign(get_align(
+                    attributes.get('xalign', 0.0),
+                    bool(attributes.get('xexpand', True))))
+            label.set_valign(get_align(
+                    attributes.get('yalign', 0.5),
+                    bool(attributes.get('yexpand', False))))
             vbox.pack_start(label, expand=True, fill=True, padding=0)
             self.view.state_widgets.append(label)
         vbox.pack_start(Gtk.HSeparator(), expand=True, fill=True, padding=0)
@@ -263,11 +287,15 @@
         if CONFIG['client.modepda']:
             attributes['xalign'] = 0.0
 
+        attributes.setdefault('xexpand', 0)
         label = Label(label=attributes.get('string', ''), attrs=attributes)
-        label.set_halign(get_align(attributes.get('xalign', 1.0)))
-        label.set_valign(get_align(attributes.get('yalign', 0.5)))
+        label.set_halign(get_align(
+                attributes.get('xalign', 1.0),
+                bool(attributes.get('xexpand'))))
+        label.set_valign(get_align(
+                attributes.get('yalign', 0.5),
+                bool(attributes.get('yexpand'))))
         label.set_angle(int(attributes.get('angle', 0)))
-        attributes.setdefault('xexpand', 0)
         self.view.state_widgets.append(label)
         self.container.add(label, attributes)
         if name:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/form_gtk/dictionary.py
 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/form_gtk/dictionary.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/form_gtk/dictionary.py
  2020-02-28 13:18:25.000000000 +0100
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/form_gtk/dictionary.py
  2020-05-17 13:27:02.000000000 +0200
@@ -174,7 +174,7 @@
 
     def set_value(self, value):
         if value is not None:
-            txt_val = locale.format('%d', value, True)
+            txt_val = locale.format_string('%d', value, True)
         else:
             txt_val = ''
         self.widget.set_text(txt_val)
@@ -211,7 +211,8 @@
             self.widget.digits = None
         self.widget.set_width_chars(self.width)
         if value is not None:
-            txt_val = locale.format('%.*f', (digits[1], value), True)
+            txt_val = locale.localize(
+                '{0:.{1}f}'.format(value, digits[1]), True)
         else:
             txt_val = ''
         self.widget.set_text(txt_val)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/form_gtk/richtextbox.py
 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/form_gtk/richtextbox.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/form_gtk/richtextbox.py
 2020-02-28 13:18:25.000000000 +0100
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/form_gtk/richtextbox.py
 2020-05-17 13:27:03.000000000 +0200
@@ -179,6 +179,8 @@
             self.toolbar.set_sensitive(not value)
 
     def detect_style(self, textview, *args):
+        if not self.toolbar:
+            return
         tag_widgets = self.tag_widgets[textview]
         text_buffer = textview.get_buffer()
         try:
@@ -269,6 +271,8 @@
         toggle_justification(justifications, True)
 
     def insert_text_style(self, text_buffer, iter_, text, length, textview):
+        if not self.toolbar:
+            return
         # Text is already inserted so iter_ point to the end
         start = iter_.copy()
         start.backward_chars(length)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/bar.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/bar.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/bar.py    
    2019-10-04 22:37:20.000000000 +0200
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/bar.py    
    2020-05-17 13:27:04.000000000 +0200
@@ -93,7 +93,8 @@
                         label = common.timedelta.format(
                             datetime.timedelta(seconds=bar.yval), converter)
                     else:
-                        label = locale.format('%.2f', bar.yval, True)
+                        label = locale.localize(
+                            '{:.2f}'.format(bar.yval), True)
                     label += '\n'
                     label += str(self.labels[bar.xname])
                     self.popup.set_text(label)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/graph.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/graph.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/graph.py  
    2020-02-28 13:18:25.000000000 +0100
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/graph.py  
    2020-05-17 13:27:02.000000000 +0200
@@ -178,7 +178,7 @@
         for i in range(int(self.yrange / base) + 1):
             val = int(self.minyval / base) * base + i * base
             h = (val - self.minyval) * self.yscale
-            label = locale.format('%.2f', val, True)
+            label = locale.localize('{:.2f}'.format(val), True)
             ylabels.append((h, label))
         return ylabels
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/line.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/line.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/line.py   
    2019-10-04 22:37:21.000000000 +0200
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/line.py   
    2020-05-17 13:27:04.000000000 +0200
@@ -201,7 +201,8 @@
                                 yfields_timedelta[point.yname])
                         label += common.timedelta.format(point.yval, converter)
                     else:
-                        label += locale.format('%.2f', point.yval, True)
+                        label += locale.localize(
+                            '{:2f}'.format(point.yval), True)
                     label += '\n'
                     label += str(self.labels[point.xname])
                     self.popup.set_text(label)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/pie.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/pie.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/graph_gtk/pie.py    
    2019-10-04 22:37:20.000000000 +0200
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/graph_gtk/pie.py    
    2020-05-17 13:27:04.000000000 +0200
@@ -33,7 +33,7 @@
                 math.cos(normalisedAngle) * (self.radius + 10)
 
             label = '%s (%s%%)' % (self.labels[slice.xname],
-                    locale.format('%.2f', slice.fraction * 100))
+                locale.localize('{:.2f}'.format(slice.fraction * 100)))
             extents = cr.text_extents(label)
             labelWidth = extents[2]
             labelHeight = extents[3]
@@ -156,12 +156,13 @@
                         sum = common.timedelta.format(
                             datetime.timedelta(seconds=self.sum), converter)
                     else:
-                        value = locale.format('%.2f',
-                            slice.fraction * self.sum)
-                        sum = locale.format('%.2f', self.sum)
-                    label = '%s (%s%%)\n%s/%s' % (self.labels[slice.xname],
-                            locale.format('%.2f', slice.fraction * 100),
-                            value, sum)
+                        value = locale.localize(
+                            '{:.2f}'.format(slice.fraction * self.sum))
+                        sum = locale.localize('{:.2f}'.format(self.sum))
+                    label = '%s (%s%%)\n%s/%s' % (
+                        self.labels[slice.xname],
+                        locale.localize('{:.2f}'.format(slice.fraction * 100)),
+                        value, sum)
                     self.popup.set_text(label)
                     self.queue_draw()
             else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/list.py 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/list.py
--- old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/list.py 
2020-02-28 13:18:25.000000000 +0100
+++ new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/list.py 
2020-05-17 13:27:02.000000000 +0200
@@ -1092,14 +1092,15 @@
                     selected_sum = common.timedelta.format(
                         selected_sum, converter)
                     sum_ = common.timedelta.format(sum_, converter)
-                elif digit:
-                    selected_sum = locale.format(
-                        '%.*f', (digit, selected_sum or 0), True)
-                    sum_ = locale.format('%.*f', (digit, sum_ or 0), True)
+                elif digit is not None:
+                    selected_sum = locale.localize(
+                        '{0:.{1}f}'.format(selected_sum or 0, digit), True)
+                    sum_ = locale.localize(
+                        '{0:.{1}f}'.format(sum_ or 0, digit), True)
                 else:
-                    selected_sum = locale.format(
-                        '%s', selected_sum or 0, True)
-                    sum_ = locale.format('%s', sum_ or 0, True)
+                    selected_sum = locale.localize(
+                        '{}'.format(selected_sum or 0), True)
+                    sum_ = locale.localize('{}'.format(sum_ or 0), True)
 
                 text = '%s / %s' % (selected_sum, sum_)
             else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/list_gtk/editabletree.py
 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/list_gtk/editabletree.py
--- 
old/gnuhealth-client-3.6.8/tryton/gui/window/view_form/view/list_gtk/editabletree.py
        2020-02-28 13:18:25.000000000 +0100
+++ 
new/gnuhealth-client-3.6.9/tryton/gui/window/view_form/view/list_gtk/editabletree.py
        2020-05-17 13:27:02.000000000 +0200
@@ -156,7 +156,8 @@
         return True
 
     def on_keypressed(self, entry, event, renderer):
-        path, column = self.get_cursor()
+        path = self.get_cursor()[0]
+        column = self.get_column_from_renderer(renderer)
         model = self.get_model()
         record = model.get_value(model.get_iter(path), 0)
         self.display_counter += 1  # Force a display
@@ -299,9 +300,10 @@
         return new_path
 
     def on_editing_done(self, entry, renderer):
-        path, column = self.get_cursor()
+        path = self.get_cursor()[0]
         if not path:
             return True
+        column = self.get_column_from_renderer(renderer)
         model = self.get_model()
         record = model.get_value(model.get_iter(path), 0)
         if isinstance(entry, (Date, Time)):
@@ -309,9 +311,17 @@
             text = entry.props.value
         elif isinstance(entry, Gtk.ComboBox):
             model = entry.get_model()
-            text = model.get_value(
-                entry.get_active_iter(),
-                entry.props.entry_text_column)
+            iter_ = entry.get_active_iter()
+            if iter_:
+                text = model.get_value(iter_, entry.props.entry_text_column)
+            else:
+                text = ''
         else:
             text = entry.get_text()
         self.on_quit_cell(record, column, renderer, text)
+
+    def get_column_from_renderer(self, renderer):
+        for column in self.get_columns():
+            for cell in column.get_cells():
+                if cell == renderer:
+                    return column
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnuhealth-client-3.6.8/version 
new/gnuhealth-client-3.6.9/version
--- old/gnuhealth-client-3.6.8/version  2020-03-01 14:22:21.000000000 +0100
+++ new/gnuhealth-client-3.6.9/version  2020-05-17 13:59:32.000000000 +0200
@@ -1 +1 @@
-3.6.8
+3.6.9


Reply via email to