From d824769b3cf3300732bee0bb4074d78d910217b9 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 5 Sep 2014 11:44:20 +0200 Subject: [PATCH 01/30] [FIX] tools,mail: improve parsing of references from rev. 0bee015dd67cb809fd235215b43d331074824e42 Backport of 8.0 fix was not enough for 7.0, because it still fails for the legacy reference match (model+res_id), which is not used in 8.0 --- addons/mail/mail_thread.py | 1 - openerp/tools/mail.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 7ff1af038f0..c88cea7499c 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -29,7 +29,6 @@ import re import socket import time import xmlrpclib -import re from email.message import Message from openerp import tools diff --git a/openerp/tools/mail.py b/openerp/tools/mail.py index fdcb44e040d..49ec5849b18 100644 --- a/openerp/tools/mail.py +++ b/openerp/tools/mail.py @@ -312,7 +312,7 @@ command_re = re.compile("^Set-([a-z]+) *: *(.+)$", re.I + re.UNICODE) # Updated in 7.0 to match the model name as well # Typical form of references is # group(1) = the record ID ; group(2) = the model (if any) ; group(3) = the domain -reference_re = re.compile("<.*-open(?:object|erp)-(\\d+)(?:-([\w.]+))?.*@(.*)>", re.UNICODE) +reference_re = re.compile("<.*-open(?:object|erp)-(\\d+)(?:-([\w.]+))?[^>]*@([^>]*)>", re.UNICODE) def generate_tracking_message_id(res_id): """Returns a string that can be used in the Message-ID RFC822 header field From f51dac038eafe3f80b6d30f49317fe741591f570 Mon Sep 17 00:00:00 2001 From: Rifakathusen Haradwala Date: Mon, 1 Sep 2014 18:56:04 +0530 Subject: [PATCH 02/30] [FIX] mail: translate tracked fields name in chatter Status tracking messages are not translated into user's language while updating any document with tracked fields (opw 612847) --- addons/mail/mail_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index c88cea7499c..63cb3a845a1 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -299,7 +299,7 @@ class mail_thread(osv.AbstractModel): if not context.get('mail_notrack'): # Perform the tracking - tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=context) + tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=track_ctx) else: tracked_fields = None if tracked_fields: From 085ad7fcc4d8a288e959ea98e8f74807aa6c5cf1 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 5 Sep 2014 14:57:20 +0200 Subject: [PATCH 03/30] [FIX] web: do not allow to access a database if not matching db-filter --- addons/web/controllers/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 584bb3e35b5..6bfc249cc9a 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -101,13 +101,13 @@ def db_redirect(req, match_first_only_if_unique): db = False redirect = False + dbs = db_list(req, True) + # 1 try the db in the url db_url = req.params.get('db') - if db_url: + if db_url and db_url in dbs: return (db_url, False) - dbs = db_list(req, True) - # 2 use the database from the cookie if it's listable and still listed cookie_db = req.httprequest.cookies.get('last_used_database') if cookie_db in dbs: @@ -584,6 +584,8 @@ class Home(openerpweb.Controller): @openerpweb.httprequest def login(self, req, db, login, key): + if db not in db_list(req, True): + return werkzeug.utils.redirect('/', 303) return login_and_redirect(req, db, login, key) class WebClient(openerpweb.Controller): From 31d2476c8640753c863d3d0df2c49dd13bd3320e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bellier?= Date: Tue, 29 Jul 2014 18:48:26 +0200 Subject: [PATCH 04/30] [FIX] stock: show the UoS quantity on picking lines The pickings already show the UoS, but not the associated quantity, which makes it useless. --- addons/stock/stock_view.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index fcf7bad01cb..7c065df0b26 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1129,6 +1129,7 @@ +