[tryton-debian-vcs] tryton-server branch upstream-4.2 updated. upstream/4.2.4-1-gcc19a74
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Sun Jul 2 17:58:09 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-server.git;a=commitdiff;h=upstream/4.2.4-1-gcc19a74
commit cc19a74a74245315dc534a51f6f1f37996b3604f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Jul 2 17:03:03 2017 +0200
Adding upstream version 4.2.5.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 8b2f67c..b9a7da8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.5 - 2017-07-01
+* Bug fixes (see mercurial logs for details)
+
Version 4.2.4 - 2017-06-05
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index b197080..5bdce41 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 4.2.4
+Version: 4.2.5
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/bin/trytond-cron b/bin/trytond-cron
index e855d77..9be73f5 100755
--- a/bin/trytond-cron
+++ b/bin/trytond-cron
@@ -12,13 +12,15 @@ if os.path.isdir(DIR):
import trytond.commandline as commandline
from trytond.config import config
-import trytond.cron as cron
parser = commandline.get_parser_daemon()
options = parser.parse_args()
config.update_etc(options.configfile)
commandline.config_log(options)
+# Import after application is configured
+import trytond.cron as cron
+
with commandline.pidfile(options):
while True:
cron.run(options)
diff --git a/trytond.egg-info/PKG-INFO b/trytond.egg-info/PKG-INFO
index b197080..5bdce41 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 4.2.4
+Version: 4.2.5
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond/__init__.py b/trytond/__init__.py
index 80146bb..082599a 100644
--- a/trytond/__init__.py
+++ b/trytond/__init__.py
@@ -5,7 +5,7 @@ import time
import logging
from email import charset
-__version__ = "4.2.4"
+__version__ = "4.2.5"
logger = logging.getLogger(__name__)
os.environ['TZ'] = 'UTC'
diff --git a/trytond/ir/action.py b/trytond/ir/action.py
index 8fdb78f..0aa2298 100644
--- a/trytond/ir/action.py
+++ b/trytond/ir/action.py
@@ -1003,6 +1003,25 @@ class ActionActWindowDomain(ModelSQL, ModelView):
'action': action.rec_name,
})
+ @classmethod
+ def create(cls, vlist):
+ pool = Pool()
+ domains = super(ActionActWindowDomain, cls).create(vlist)
+ pool.get('ir.action.keyword')._get_keyword_cache.clear()
+ return domains
+
+ @classmethod
+ def write(cls, domains, values, *args):
+ pool = Pool()
+ super(ActionActWindowDomain, cls).write(domains, values, *args)
+ pool.get('ir.action.keyword')._get_keyword_cache.clear()
+
+ @classmethod
+ def delete(cls, domains):
+ pool = Pool()
+ super(ActionActWindowDomain, cls).delete(domains)
+ pool.get('ir.action.keyword')._get_keyword_cache.clear()
+
class ActionWizard(ActionMixin, ModelSQL, ModelView):
"Action wizard"
diff --git a/trytond/ir/ui/menu.py b/trytond/ir/ui/menu.py
index 5a5a0e5..5a5e645 100644
--- a/trytond/ir/ui/menu.py
+++ b/trytond/ir/ui/menu.py
@@ -4,6 +4,7 @@ from itertools import groupby
from trytond.model import ModelView, ModelSQL, fields, sequence_ordered
from trytond.transaction import Transaction
+from trytond.tools import grouped_slice
from trytond.pool import Pool
from trytond.rpc import RPC
@@ -178,10 +179,12 @@ class UIMenu(sequence_ordered(), ModelSQL, ModelView):
return menus
if menus:
- parent_ids = [x.parent.id for x in menus if x.parent]
- parents = cls.search([
- ('id', 'in', parent_ids),
- ])
+ parent_ids = {x.parent.id for x in menus if x.parent}
+ parents = set()
+ for sub_parent_ids in grouped_slice(parent_ids):
+ parents.update(cls.search([
+ ('id', 'in', list(sub_parent_ids)),
+ ]))
menus = [x for x in menus
if (x.parent and x.parent in parents) or not x.parent]
diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py
index fe81f6a..754d777 100644
--- a/trytond/protocols/dispatcher.py
+++ b/trytond/protocols/dispatcher.py
@@ -141,8 +141,11 @@ def _dispatch(request, pool, *args, **kwargs):
% (method, obj))
log_message = '%s.%s(*%s, **%s) from %s@%s/%s'
- log_args = (obj, method, args, kwargs,
- request.authorization.username, request.remote_addr, request.path)
+ username = request.authorization.username
+ if isinstance(username, bytes):
+ username = username.decode('utf-8')
+ log_args = (
+ obj, method, args, kwargs, username, request.remote_addr, request.path)
logger.info(log_message, *log_args)
user = request.user_id
diff --git a/trytond/sendmail.py b/trytond/sendmail.py
index cdc5d6e..4a2a2db 100644
--- a/trytond/sendmail.py
+++ b/trytond/sendmail.py
@@ -33,8 +33,9 @@ def sendmail(from_addr, to_addrs, msg, server=None):
senderrs = server.sendmail(from_addr, to_addrs, msg.as_string())
except smtplib.SMTPException:
logger.error('fail to send email', exc_info=True)
- if senderrs:
- logger.warn('fail to send email to %s', senderrs)
+ else:
+ if senderrs:
+ logger.warn('fail to send email to %s', senderrs)
if quit:
server.quit()
--
tryton-server
More information about the tryton-debian-vcs
mailing list