From 1e3e3b4bbe8f2152884af62c5119b0b19143be92 Mon Sep 17 00:00:00 2001 From: Vincent Adriaensen Date: Wed, 19 Jul 2017 13:34:34 +0200 Subject: [PATCH 1/4] [CLA] signature for vincentadriaensen Done at #18332 --- doc/cla/individual/vincentadriaensen.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/vincentadriaensen.md diff --git a/doc/cla/individual/vincentadriaensen.md b/doc/cla/individual/vincentadriaensen.md new file mode 100644 index 00000000000..3fcaa1d1352 --- /dev/null +++ b/doc/cla/individual/vincentadriaensen.md @@ -0,0 +1,11 @@ +Belgium, 19/07/2017 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Vincent Adriaensen vincentadriaensen@users.noreply.github.com https://github.com/vincentadriaensen From 48c478513f791849c8e5b769b5bc2460ba284ae7 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 27 Jul 2017 13:39:08 +0200 Subject: [PATCH 2/4] [IMP] core: log address we listen on in multi-worker mode --- openerp/service/server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openerp/service/server.py b/openerp/service/server.py index 60068a6c06e..3cfbd3a2834 100644 --- a/openerp/service/server.py +++ b/openerp/service/server.py @@ -610,6 +610,7 @@ class PreforkServer(CommonServer): if self.address: # listen to socket + _logger.info('HTTP service (werkzeug) running on %s:%s', *self.address) self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.socket.setblocking(0) From e6b91eb55a129687ece64d635ea3412446d78128 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 27 Jul 2017 13:40:19 +0200 Subject: [PATCH 3/4] [FIX] core: werkzeug 0.12 compatibility Since werkzeug 0.12, the `BaseWSGIServer.__init__` method expect the socket to be bound to determine the effective port it listen to [1]. Stop pretend to bind the socket and close it directly after use. [1] see pallets/werkzeug@1fc28cbb30799bf6a09d998aa33f489c5e5a1a71 --- openerp/service/server.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openerp/service/server.py b/openerp/service/server.py index 3cfbd3a2834..58e0345385d 100644 --- a/openerp/service/server.py +++ b/openerp/service/server.py @@ -66,12 +66,11 @@ class BaseWSGIServerNoBind(LoggingBaseWSGIServerMixIn, werkzeug.serving.BaseWSGI use this class, sets the socket and calls the process_request() manually """ def __init__(self, app): - werkzeug.serving.BaseWSGIServer.__init__(self, "1", "1", app) - def server_bind(self): - # we dont bind beause we use the listen socket of PreforkServer#socket - # instead we close the socket + werkzeug.serving.BaseWSGIServer.__init__(self, "127.0.0.1", 0, app) + # Directly close the socket. It will be replaced by WorkerHTTP when processing requests if self.socket: self.socket.close() + def server_activate(self): # dont listen as we use PreforkServer#socket pass From 1644b92fd8a7a38841333144064772fa50ef3e96 Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Mon, 17 Oct 2016 11:56:12 +0200 Subject: [PATCH 4/4] [FIX] account format error message correctly Cherry-Pick of a04c1a2ac5244fe2fd3098fc22c59d336e352981 --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index c08be3323b5..6f49b3cd464 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1564,7 +1564,7 @@ class account_move(osv.osv): if line.account_id.currency_id and line.currency_id: if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id): - raise osv.except_osv(_('Error!'), _("""Cannot create move with currency different from ..""") % (line.account_id.code, line.account_id.name)) + raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""") % (line.account_id.code, line.account_id.name)) if round(abs(amount), prec) < 10 ** (-max(5, prec)): # If the move is balanced