[tryton-debian-vcs] tryton-client branch upstream-3.8 updated. upstream/3.8.6-1-g6058cad
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Jul 12 13:02:14 UTC 2016
The following commit has been merged in the upstream-3.8 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-client.git;a=commitdiff;h=upstream/3.8.6-1-g6058cad
commit 6058cadf3bc4bf07c58077020340d7390df70da7
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Jul 11 19:38:22 2016 +0200
Adding upstream version 3.8.7.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index dc3a7b3..c78232a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.7 - 2016-07-04
+* Bug fixes (see mercurial logs for details)
+
Version 3.8.6 - 2016-04-06
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 43d70ed..825f062 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
Copyright (C) 2012-2013 Antoine Smolders.
-Copyright (C) 2010-2015 Nicolas Évrard.
+Copyright (C) 2010-2016 Nicolas Évrard.
Copyright (C) 2007-2016 Cédric Krier.
Copyright (C) 2007-2013 Bertrand Chenal.
Copyright (C) 2008-2016 B2CK SPRL.
diff --git a/PKG-INFO b/PKG-INFO
index 9481a1c..2849976 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: tryton
-Version: 3.8.6
+Version: 3.8.7
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 9481a1c..2849976 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.6
+Version: 3.8.7
Summary: Tryton client
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/tryton/__init__.py b/tryton/__init__.py
index 6390bcc..0f4c622 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.6"
+__version__ = "3.8.7"
diff --git a/tryton/common/common.py b/tryton/common/common.py
index 094eef5..6e4ba1c 100644
--- a/tryton/common/common.py
+++ b/tryton/common/common.py
@@ -1386,11 +1386,12 @@ def humanize(size):
def get_hostname(netloc):
if '[' in netloc and ']' in netloc:
- return netloc.split(']')[0][1:]
+ hostname = netloc.split(']')[0][1:]
elif ':' in netloc:
- return netloc.split(':')[0]
+ hostname = netloc.split(':')[0]
else:
- return netloc
+ hostname = netloc
+ return hostname.strip()
def get_port(netloc):
diff --git a/tryton/common/datetime_.py b/tryton/common/datetime_.py
index 3217def..b6d261f 100644
--- a/tryton/common/datetime_.py
+++ b/tryton/common/datetime_.py
@@ -21,8 +21,10 @@ _ = gettext.gettext
def date_parse(text, format_='%x'):
- dayfirst = datetime.date(1988, 8, 16).strftime(format_).index('16') == 0
- yearfirst = datetime.date(1988, 8, 16).strftime(format_).index('88') <= 2
+ formatted_date = datetime.date(1988, 7, 16).strftime(format_)
+ dayfirst = formatted_date.index('16') == 0
+ monthfirst = formatted_date.index('7') <= 1
+ yearfirst = not dayfirst and not monthfirst
return parse(text, dayfirst=dayfirst, yearfirst=yearfirst, ignoretz=True)
diff --git a/tryton/common/domain_parser.py b/tryton/common/domain_parser.py
index 03a754e..2e2208e 100644
--- a/tryton/common/domain_parser.py
+++ b/tryton/common/domain_parser.py
@@ -1025,6 +1025,8 @@ class DomainParser(object):
operator = None
name = value
value = ''
+ if not name:
+ name = ''
if (name.lower() not in self.strings
and name not in self.fields):
for field in self.strings.itervalues():
@@ -1455,3 +1457,18 @@ def test_parse_clause():
assert rlist(dom.parse_clause([('Many2One', None, ['John', 'Jane'])])) == [
('many2one.rec_name', 'in', ['John', 'Jane']),
]
+
+
+def test_completion():
+ dom = DomainParser({
+ 'name': {
+ 'string': 'Name',
+ 'name': 'name',
+ 'type': 'char',
+ },
+ })
+ assert list(dom.completion(u'Nam')) == ['Name: ']
+ assert list(dom.completion(u'Name:')) == ['Name: ']
+ assert list(dom.completion(u'Name: foo')) == []
+ assert list(dom.completion(u'Name: !=')) == []
+ assert list(dom.completion(u'Name: !=foo')) == []
diff --git a/tryton/data/locale/bg_BG/LC_MESSAGES/tryton.mo b/tryton/data/locale/bg_BG/LC_MESSAGES/tryton.mo
index 5503afb..24285d8 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 c76dc5a..24c5372 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 73c3ef0..7bea5e3 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 fdce4fb..6017011 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 3307414..9308239 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 737d645..d7a8149 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 2d24cc0..9b301aa 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 dc3a412..ca66045 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 3c2ed7a..29cb9d5 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 1cbd3af..b1c07b2 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 bf132f0..89a795f 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 d243d4d..e44f760 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 889665c..dd44f6b 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 948a8eb..7a9ef01 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 8dc6a78..fd88e28 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 accf093..fc7e07b 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 d63a14b..a55fe0c 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 5819252..d991313 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/attachment.py b/tryton/gui/window/attachment.py
index 72aa578..6e563ea 100644
--- a/tryton/gui/window/attachment.py
+++ b/tryton/gui/window/attachment.py
@@ -4,6 +4,7 @@
import os
import urllib
import urlparse
+import sys
from tryton.gui.window.view_form.screen import Screen
from tryton.gui.window.win_form import WinForm
@@ -46,5 +47,6 @@ class Attachment(WinForm):
new_record = self.screen.new()
file_name = os.path.basename(urlparse.urlparse(uri).path)
name_field.set_client(new_record, file_name)
+ uri = uri.decode('utf-8').encode(sys.getfilesystemencoding())
data_field.set_client(new_record, urllib.urlopen(uri).read())
self.screen.display()
diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py
index 2fb8721..ca5b358 100644
--- a/tryton/gui/window/form.py
+++ b/tryton/gui/window/form.py
@@ -346,7 +346,8 @@ class Form(SignalEvent, TabContent):
if widget:
# Called from button so we must save the tree state
self.screen.save_tree_state()
- if not common.MODELACCESS[self.model]['write']:
+ if not (common.MODELACCESS[self.model]['write']
+ or common.MODELACCESS[self.model]['create']):
return
if self.screen.save_current():
self.message_info(_('Record saved.'), gtk.MESSAGE_INFO)
diff --git a/tryton/gui/window/view_board/action.py b/tryton/gui/window/view_board/action.py
index c1774d0..ddd801c 100644
--- a/tryton/gui/window/view_board/action.py
+++ b/tryton/gui/window/view_board/action.py
@@ -94,7 +94,8 @@ class Action(SignalEvent):
return
if (self.screen.current_view.view_type == 'tree' and
- self.screen.current_view.attributes.get('keyword_open')):
+ int(self.screen.current_view.attributes.get(
+ 'keyword_open', 0))):
GenericAction.exec_keyword('tree_open', {
'model': self.screen.model_name,
'id': (self.screen.current_record.id
diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py
index 98fd8d9..98b09a5 100644
--- a/tryton/gui/window/view_form/model/field.py
+++ b/tryton/gui/window/view_form/model/field.py
@@ -395,6 +395,9 @@ class M2OField(Field):
_default = None
+ def _is_empty(self, record):
+ return self.get(record) is None
+
def get_client(self, record):
rec_name = record.value.get(self.name + '.rec_name')
if rec_name is None:
diff --git a/tryton/gui/window/view_form/model/group.py b/tryton/gui/window/view_form/model/group.py
index 397a505..50b68fe 100644
--- a/tryton/gui/window/view_form/model/group.py
+++ b/tryton/gui/window/view_form/model/group.py
@@ -44,7 +44,8 @@ class Group(SignalEvent, list):
def readonly(self):
# Must skip res.user for Preference windows
if (self._context.get('_datetime')
- or (not MODELACCESS[self.model_name]['write']
+ or (not (MODELACCESS[self.model_name]['write']
+ or MODELACCESS[self.model_name]['create'])
and not self.skip_model_access)):
return True
return self.__readonly
diff --git a/tryton/gui/window/view_form/screen/screen.py b/tryton/gui/window/view_form/screen/screen.py
index 37bdb90..e791f66 100644
--- a/tryton/gui/window/view_form/screen/screen.py
+++ b/tryton/gui/window/view_form/screen/screen.py
@@ -57,7 +57,8 @@ class Screen(SignalEvent):
super(Screen, self).__init__()
self.readonly = readonly
- if not MODELACCESS[model_name]['write']:
+ if not (MODELACCESS[model_name]['write']
+ or MODELACCESS[model_name]['create']):
self.readonly = True
self.search_count = 0
if not row_activate:
@@ -346,7 +347,7 @@ class Screen(SignalEvent):
def default_row_activate(self):
if (self.current_view.view_type == 'tree' and
- self.current_view.attributes.get('keyword_open')):
+ int(self.current_view.attributes.get('keyword_open', 0))):
return Action.exec_keyword('tree_open', {
'model': self.model_name,
'id': self.current_record.id if self.current_record else None,
diff --git a/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py b/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py
index c408ef9..ecb46f9 100644
--- a/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py
+++ b/tryton/gui/window/view_form/view/calendar_gtk/calendar_.py
@@ -79,8 +79,8 @@ class Calendar_(goocalendar.Calendar):
if not record[dtstart].get(record):
continue
- start = record[dtstart].get(record)
- end = record[dtend].get(record)
+ start = record[dtstart].get_client(record)
+ end = record[dtend].get_client(record)
midnight = datetime.time(0)
all_day = False
if not isinstance(start, datetime.datetime):
diff --git a/tryton/gui/window/view_form/view/form_gtk/widget.py b/tryton/gui/window/view_form/view/form_gtk/widget.py
index 21d3b8c..bd6d6cc 100644
--- a/tryton/gui/window/view_form/view/form_gtk/widget.py
+++ b/tryton/gui/window/view_form/view/form_gtk/widget.py
@@ -242,6 +242,7 @@ class TranslateMixin:
return button
def translate(self, *args):
+ self.view.set_value()
if self.record.id < 0 or self.record.modified:
common.message(
_('You need to save the record before adding translations!'))
--
tryton-client
More information about the tryton-debian-vcs
mailing list