[tryton-debian-vcs] tryton-client branch upstream updated. upstream/3.8.3-1-g0b7f86a
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Feb 10 19:53:00 UTC 2016
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-client.git;a=commitdiff;h=upstream/3.8.3-1-g0b7f86a
commit 0b7f86a99e1d893b19260ea016f0d313b7dffed6
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:55:42 2016 +0100
Adding upstream version 3.8.4.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index db9500f..8e697bf 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.4 - 2016-02-06
+* Bug fixes (see mercurial logs for details)
+
Version 3.8.3 - 2016-01-11
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 3280e89..b582218 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tryton
-Version: 3.8.3
+Version: 3.8.4
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 3280e89..b582218 100644
--- a/tryton.egg-info/PKG-INFO
+++ b/tryton.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tryton
-Version: 3.8.3
+Version: 3.8.4
Summary: Tryton client
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/tryton/__init__.py b/tryton/__init__.py
index 72aa46b..5729054 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__ = "3.8.3"
+__version__ = "3.8.4"
diff --git a/tryton/common/cellrendererfloat.py b/tryton/common/cellrendererfloat.py
index 9b8e396..0eba228 100644
--- a/tryton/common/cellrendererfloat.py
+++ b/tryton/common/cellrendererfloat.py
@@ -12,9 +12,9 @@ class CellRendererFloat(CellRendererInteger):
super(CellRendererFloat, self).__init__()
self.digits = None
- def on_start_editing(self, event, widget, path, background_area,
+ def do_start_editing(self, event, widget, path, background_area,
cell_area, flags):
- editable = super(CellRendererFloat, self).on_start_editing(event,
+ editable = super(CellRendererFloat, self).do_start_editing(event,
widget, path, background_area, cell_area, flags)
editable.connect('key-press-event', self.key_press_event)
return editable
diff --git a/tryton/common/cellrendererinteger.py b/tryton/common/cellrendererinteger.py
index 8705544..a811c24 100644
--- a/tryton/common/cellrendererinteger.py
+++ b/tryton/common/cellrendererinteger.py
@@ -7,9 +7,9 @@ import locale
class CellRendererInteger(CellRendererText):
- def on_start_editing(self, event, widget, path, background_area,
+ def do_start_editing(self, event, widget, path, background_area,
cell_area, flags):
- editable = super(CellRendererInteger, self).on_start_editing(event,
+ editable = super(CellRendererInteger, self).do_start_editing(event,
widget, path, background_area, cell_area, flags)
editable.set_alignment(1.0)
editable.connect('insert_text', self.sig_insert_text)
diff --git a/tryton/common/cellrenderertoggle.py b/tryton/common/cellrenderertoggle.py
index 04e6dd3..cfb3e1c 100644
--- a/tryton/common/cellrenderertoggle.py
+++ b/tryton/common/cellrenderertoggle.py
@@ -22,7 +22,7 @@ class CellRendererToggle(gtk.CellRendererToggle):
cell_area, flags):
if not self.props.visible:
return
- return gtk.CellRendererToggle.do_start_editing(event, widget, path,
- background_area, cell_area, flags)
+ return gtk.CellRendererToggle.do_start_editing(self, event, widget,
+ path, background_area, cell_area, flags)
gobject.type_register(CellRendererToggle)
diff --git a/tryton/data/locale/bg_BG/LC_MESSAGES/tryton.mo b/tryton/data/locale/bg_BG/LC_MESSAGES/tryton.mo
index 03d1e5b..55dc6ff 100644
Binary files a/tryton/data/locale/bg_BG/LC_MESSAGES/tryton.mo and b/tryton/data/locale/bg_BG/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/ca_ES/LC_MESSAGES/tryton.mo b/tryton/data/locale/ca_ES/LC_MESSAGES/tryton.mo
index 1590355..fa4f07f 100644
Binary files a/tryton/data/locale/ca_ES/LC_MESSAGES/tryton.mo and b/tryton/data/locale/ca_ES/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/cs_CZ/LC_MESSAGES/tryton.mo b/tryton/data/locale/cs_CZ/LC_MESSAGES/tryton.mo
index 7a24d58..fd04d82 100644
Binary files a/tryton/data/locale/cs_CZ/LC_MESSAGES/tryton.mo and b/tryton/data/locale/cs_CZ/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/de_DE/LC_MESSAGES/tryton.mo b/tryton/data/locale/de_DE/LC_MESSAGES/tryton.mo
index a04815a..dc8a66a 100644
Binary files a/tryton/data/locale/de_DE/LC_MESSAGES/tryton.mo and b/tryton/data/locale/de_DE/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/es_AR/LC_MESSAGES/tryton.mo b/tryton/data/locale/es_AR/LC_MESSAGES/tryton.mo
index e3e6049..b37febb 100644
Binary files a/tryton/data/locale/es_AR/LC_MESSAGES/tryton.mo and b/tryton/data/locale/es_AR/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/es_CO/LC_MESSAGES/tryton.mo b/tryton/data/locale/es_CO/LC_MESSAGES/tryton.mo
index 7075174..3e28d4a 100644
Binary files a/tryton/data/locale/es_CO/LC_MESSAGES/tryton.mo and b/tryton/data/locale/es_CO/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/es_EC/LC_MESSAGES/tryton.mo b/tryton/data/locale/es_EC/LC_MESSAGES/tryton.mo
index 1484545..e77a6af 100644
Binary files a/tryton/data/locale/es_EC/LC_MESSAGES/tryton.mo and b/tryton/data/locale/es_EC/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/es_ES/LC_MESSAGES/tryton.mo b/tryton/data/locale/es_ES/LC_MESSAGES/tryton.mo
index d526b4d..45c44bf 100644
Binary files a/tryton/data/locale/es_ES/LC_MESSAGES/tryton.mo and b/tryton/data/locale/es_ES/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/es_MX/LC_MESSAGES/tryton.mo b/tryton/data/locale/es_MX/LC_MESSAGES/tryton.mo
index 411daa0..433d51c 100644
Binary files a/tryton/data/locale/es_MX/LC_MESSAGES/tryton.mo and b/tryton/data/locale/es_MX/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/fr_FR/LC_MESSAGES/tryton.mo b/tryton/data/locale/fr_FR/LC_MESSAGES/tryton.mo
index 86e285d..755b2c2 100644
Binary files a/tryton/data/locale/fr_FR/LC_MESSAGES/tryton.mo and b/tryton/data/locale/fr_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 b0e5676..5acb45c 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 92de4e7..963b4ea 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 a3a9e1a..94c3f71 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/lt_LT/LC_MESSAGES/tryton.mo b/tryton/data/locale/lt_LT/LC_MESSAGES/tryton.mo
index 3a59659..0e59220 100644
Binary files a/tryton/data/locale/lt_LT/LC_MESSAGES/tryton.mo and b/tryton/data/locale/lt_LT/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/nl_NL/LC_MESSAGES/tryton.mo b/tryton/data/locale/nl_NL/LC_MESSAGES/tryton.mo
index f2df951..ef4c792 100644
Binary files a/tryton/data/locale/nl_NL/LC_MESSAGES/tryton.mo and b/tryton/data/locale/nl_NL/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 6d59286..9fd3aba 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_RU/LC_MESSAGES/tryton.mo b/tryton/data/locale/ru_RU/LC_MESSAGES/tryton.mo
index 4743326..b1d43ae 100644
Binary files a/tryton/data/locale/ru_RU/LC_MESSAGES/tryton.mo and b/tryton/data/locale/ru_RU/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/data/locale/sl_SI/LC_MESSAGES/tryton.mo b/tryton/data/locale/sl_SI/LC_MESSAGES/tryton.mo
index ad17afb..edb85c8 100644
Binary files a/tryton/data/locale/sl_SI/LC_MESSAGES/tryton.mo and b/tryton/data/locale/sl_SI/LC_MESSAGES/tryton.mo differ
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index 4a9e075..98fd8d9 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -67,10 +67,13 @@ class Field(object):
context.update(record.expr_eval(self.attrs.get('context', {})))
return context
+ def _is_empty(self, record):
+ return not self.get_eval(record)
+
def check_required(self, record):
state_attrs = self.get_state_attrs(record)
if bool(int(state_attrs.get('required') or 0)):
- if (not self.get_eval(record)
+ if (self._is_empty(record)
and not bool(int(state_attrs.get('readonly') or 0))):
return False
return True
@@ -255,6 +258,9 @@ class TimeField(Field):
_default = None
+ def _is_empty(self, record):
+ return self.get(record) is None
+
def set_client(self, record, value, force_change=False):
if isinstance(value, datetime.datetime):
value = value.time()
@@ -269,6 +275,9 @@ class TimeDeltaField(Field):
_default = None
+ def _is_empty(self, record):
+ return self.get(record) is None
+
def converter(self, record):
# TODO allow local context converter
return rpc.CONTEXT.get(self.attrs.get('converter'))
@@ -287,13 +296,8 @@ class TimeDeltaField(Field):
class FloatField(Field):
_default = None
- def check_required(self, record):
- state_attrs = self.get_state_attrs(record)
- if bool(int(state_attrs.get('required') or 0)):
- if (self.get(record) is None
- and not bool(int(state_attrs.get('readonly') or 0))):
- return False
- return True
+ def _is_empty(self, record):
+ return self.get(record) is None
def get(self, record):
return record.value.get(self.name, self._default)
@@ -607,7 +611,6 @@ class O2MField(Field):
new_record.set_default(vals)
group.add(new_record)
else:
- new_record.id *= -1 # Don't consider record as unsaved
new_record.set(vals)
group.append(new_record)
diff --git a/tryton/gui/window/view_form/view/form_gtk/calendar.py b/tryton/gui/window/view_form/view/form_gtk/calendar.py
index 8e061ef..6f82d06 100644
--- a/tryton/gui/window/view_form/view/form_gtk/calendar.py
+++ b/tryton/gui/window/view_form/view/form_gtk/calendar.py
@@ -3,6 +3,8 @@
import gtk
import gettext
+import gobject
+
from .widget import Widget
from tryton.common.datetime_ import (Date as DateEntry, Time as TimeEntry,
DateTime as DateTimeEntry, add_operators)
@@ -77,6 +79,7 @@ class Time(Date):
def __init__(self, view, attrs):
super(Time, self).__init__(view, attrs, _entry=TimeEntry)
self.entry.set_focus_chain([self.entry.get_child()])
+ self.entry.connect('time-changed', self.changed)
def _set_editable(self, value):
self.entry.set_sensitive(value)
@@ -95,6 +98,15 @@ class Time(Date):
format_ = '%X'
self.entry.props.format = format_
+ def changed(self, combobox):
+ def focus_out():
+ if combobox.props.window:
+ self._focus_out()
+ # Only when changed from pop list
+ if not combobox.get_child().has_focus():
+ # Must be deferred because it triggers a display of the form
+ gobject.idle_add(focus_out)
+
class DateTime(Date):
def __init__(self, view, attrs):
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 94606c8..181a121 100644
--- a/tryton/gui/window/view_form/view/list_gtk/widget.py
+++ b/tryton/gui/window/view_form/view/list_gtk/widget.py
@@ -377,7 +377,7 @@ class Time(Date):
if not record:
return ''
value = record[self.attrs['name']].get_client(record)
- if value:
+ if value is not None:
return value.strftime(self.renderer.props.format)
else:
return ''
--
tryton-client
More information about the tryton-debian-vcs
mailing list