From 2d0bcce58c58c128626d298800ab42f390c993c3 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Wed, 14 Feb 2018 14:16:46 +0100 Subject: [PATCH 1/4] [FIX] website_forum: allow to submit link Fix/Simplify previous regex that was wrong (eg: http:// instead of http:\/\/) --- addons/website_forum/static/src/js/website_forum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 6806781c594..0d688f081c9 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -223,7 +223,7 @@ if(!$('.website_forum').length) { if (url.search("^http(s?)://.*")) { url = 'http://'+url; } - var regex = new RegExp("(http(s)?://.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)"); + var regex = new RegExp("^(http(s?):\/\/).*[\.]+.*"); if(regex.test(url)){ ajax.jsonRpc("/forum/get_url_title", 'call', {'url': url}).then(function (data) { if (data) { From 962af4b7807090af9a28cca295fb3b9b98a4cea6 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 14 Feb 2018 19:15:02 +0100 Subject: [PATCH 2/4] [FIX] mail: make List-Id header RFC2919 compliant Fixes the header initially introduced in f62f58174baffe8d24787ced02ccb8cc07954b6b See also https://tools.ietf.org/html/rfc2919#section-3 Fixes #18408 --- addons/mail/models/mail_channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index e2a99d350ba..91610463e81 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -186,7 +186,7 @@ class Channel(models.Model): # http://blogs.technet.com/b/exchange/archive/2006/10/06/3395024.aspx headers['X-Auto-Response-Suppress'] = 'OOF' if self.alias_domain and self.alias_name: - headers['List-Id'] = '%s.%s' % (self.alias_name, self.alias_domain) + headers['List-Id'] = '<%s.%s>' % (self.alias_name, self.alias_domain) headers['List-Post'] = '' % (self.alias_name, self.alias_domain) # Avoid users thinking it was a personal message # X-Forge-To: will replace To: after SMTP envelope is determined by ir.mail.server From 16050869435604085e566679863573e6cf0aa187 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 14 Feb 2018 19:22:34 +0100 Subject: [PATCH 3/4] [FIX] reqs.txt: bump up recommended Pillow version We should normally stick as close as possible to the version we depend on in the official DEB packages. This in turn depends on the version of Debian stable at the time of release - for 9.0 that would be Debian 8 (jessie) and thus Pillow 2.6.1. However Pillow versions before 3.1.1 suffer from a few issues that could lead to crashes of Odoo workers. The bugfixes have been backported in the DEB packages for Pillow, so users of Debian/Ubuntu LTS versions won't be affected if they are keeing their systems updated. However it's worth an exception to our rule for pip users. FWD-PORTS: skip --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c41bdd57917..92be4fcd468 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ Babel==1.3 Jinja2==2.7.3 Mako==1.0.1 MarkupSafe==0.23 -Pillow==2.7.0 +Pillow==3.1.1 Python-Chart==1.39 PyYAML==3.11 Werkzeug==0.9.6 From 840c3be7b5b960d9aa67d6521905e8606d2504f8 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 14 Feb 2018 15:04:12 +0100 Subject: [PATCH 4/4] [FIX] point_of_sale: display python except message on partner creation Having base_vat installed (but is potentially more general than this) In the pos frontend, try to save a partner with an incorrect VAT Before this commit, the generic and cryptic message "your internet is probably down" was displayed to the user when a python exception occured After this commit, we display the exception's message OPW 807656 --- addons/point_of_sale/static/src/js/screens.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 140675e0b16..8b28025a2c7 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1177,9 +1177,14 @@ var ClientListScreenWidget = ScreenWidget.extend({ self.saved_client_details(partner_id); },function(err,event){ event.preventDefault(); + var error_body = _t('Your Internet connection is probably down.'); + if (err.data) { + var except = err.data; + error_body = except.arguments && except.arguments[0] || except.message || error_body; + } self.gui.show_popup('error',{ 'title': _t('Error: Could not Save Changes'), - 'body': _t('Your Internet connection is probably down.'), + 'body': error_body, }); }); },