[tryton-debian-vcs] tryton-server branch debian-stretch-4.0 updated. debian/4.0.9-1-2-ge1504eb

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Jul 2 17:58:08 UTC 2017


The following commit has been merged in the debian-stretch-4.0 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=debian/4.0.9-1-2-ge1504eb

commit e1504ebf12c1a537982ce5460f7d7a74dc8f5793
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Jul 2 16:59:31 2017 +0200

    Releasing debian version 4.0.10-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 9fa043e..553159c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-server (4.0.10-1) unstable; urgency=medium
+
+  * Merging upstream version 4.0.10.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sun, 02 Jul 2017 16:59:31 +0200
+
 tryton-server (4.0.9-1) unstable; urgency=medium
 
   * Merging upstream version 4.0.9.
commit 0c224c0ac202d51bac9651c7d522b94aa4c746da
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Jul 2 16:59:31 2017 +0200

    Merging upstream version 4.0.10.

diff --git a/CHANGELOG b/CHANGELOG
index cd682e6..d5cdf55 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.10 - 2017-07-01
+* Bug fixes (see mercurial logs for details)
+
 Version 4.0.9 - 2017-06-05
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index eb94563..54185f3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 4.0.9
+Version: 4.0.10
 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 eb94563..54185f3 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.0.9
+Version: 4.0.10
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/__init__.py b/trytond/__init__.py
index c224b9b..fc11cec 100644
--- a/trytond/__init__.py
+++ b/trytond/__init__.py
@@ -5,7 +5,7 @@ import time
 import logging
 from email import charset
 
-__version__ = "4.0.9"
+__version__ = "4.0.10"
 logger = logging.getLogger(__name__)
 
 os.environ['TZ'] = 'UTC'
diff --git a/trytond/ir/action.py b/trytond/ir/action.py
index 40970b0..c20103f 100644
--- a/trytond/ir/action.py
+++ b/trytond/ir/action.py
@@ -990,6 +990,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 00ac991..9fd4a6a 100644
--- a/trytond/ir/ui/menu.py
+++ b/trytond/ir/ui/menu.py
@@ -7,6 +7,7 @@ from sql.conditionals import Case
 
 from trytond.model import ModelView, ModelSQL, fields
 from trytond.transaction import Transaction
+from trytond.tools import grouped_slice
 from trytond.pool import Pool
 from trytond.rpc import RPC
 
@@ -183,10 +184,12 @@ class UIMenu(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 7414ec3..dedcf69 100644
--- a/trytond/protocols/dispatcher.py
+++ b/trytond/protocols/dispatcher.py
@@ -182,8 +182,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