From 1e3e3b4bbe8f2152884af62c5119b0b19143be92 Mon Sep 17 00:00:00 2001 From: Vincent Adriaensen Date: Wed, 19 Jul 2017 13:34:34 +0200 Subject: [PATCH 01/13] [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 4fdfdb2f8087a83140642be8b607409cde4e0264 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 27 Jul 2017 13:19:54 +0200 Subject: [PATCH 02/13] [FIX] mrp: domain in picking type Limit the picking type domain to 'Manufacturing Operation'. opw-760246 --- addons/mrp/views/mrp_production_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index 46546c4e5e0..1886d119b6e 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -150,7 +150,7 @@ - + From 48c478513f791849c8e5b769b5bc2460ba284ae7 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 27 Jul 2017 13:39:08 +0200 Subject: [PATCH 03/13] [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 04/13] [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 66c22ab20d08416124baaa43943398a5e22b46b2 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 27 Jul 2017 15:20:46 +0200 Subject: [PATCH 05/13] [FIX] crm: Leads Analysis report The Leads Analysis report should filter on "Leads" by default. opw-760265 --- addons/crm/i18n/crm.pot | 3 +-- addons/crm/report/crm_opportunity_report_views.xml | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/crm/i18n/crm.pot b/addons/crm/i18n/crm.pot index 66583c1496a..f59841f7aa2 100644 --- a/addons/crm/i18n/crm.pot +++ b/addons/crm/i18n/crm.pot @@ -3853,8 +3853,7 @@ msgstr "" #. module: crm #: model:ir.actions.act_window,help:crm.crm_opportunity_report_action_lead -msgid "This report analyses the source of your leads\n" -"(including those converted into opportunities)." +msgid "This report analyses the source of your leads." msgstr "" #. module: crm diff --git a/addons/crm/report/crm_opportunity_report_views.xml b/addons/crm/report/crm_opportunity_report_views.xml index 7b5e3720a93..636e872f6c5 100644 --- a/addons/crm/report/crm_opportunity_report_views.xml +++ b/addons/crm/report/crm_opportunity_report_views.xml @@ -188,13 +188,12 @@ with the the sales teams. crm.opportunity.report form pivot,graph - {'search_default_current': True, 'active_test': True} + {'search_default_current': True, 'active_test': True, 'search_default_lead': True} - This report analyses the source of your leads -(including those converted into opportunities). + This report analyses the source of your leads. Date: Thu, 27 Jul 2017 11:19:05 +0200 Subject: [PATCH 06/13] [FIX] purchase : procurement check fail if one move in cancel Use case to reproduce the bug: One procurement is running for a PO. Cancel one move in the picking and create it again. Pass the picking in done. --> The procurement stay in running state It happens because the check method of procurement look if all moves linked are in done state but in this case, there is one move in cancel and one move in done. This commit check instead if all move are in cancel or done and at least one is in done state. opw-753177 --- addons/purchase/models/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index d9f26d54b77..66b2b8304b7 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -918,7 +918,7 @@ class ProcurementOrder(models.Model): if self.purchase_line_id: if not self.move_ids: return False - return all(move.state == 'done' for move in self.move_ids) + return all(move.state in ('done', 'cancel') for move in self.move_ids) and any(move.state == 'done' for move in self.move_ids) return super(ProcurementOrder, self)._check() def _get_purchase_schedule_date(self): From 97bac8d64c93e18669ca6d2ebea2a2a0f7027c3f Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 27 Jul 2017 22:35:03 +0200 Subject: [PATCH 07/13] [IMP] core: capture Warnings though logging --- odoo/netsvc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/netsvc.py b/odoo/netsvc.py index ff904fed2f3..326228bf4f9 100644 --- a/odoo/netsvc.py +++ b/odoo/netsvc.py @@ -115,6 +115,7 @@ def init_logger(): _logger_init = True logging.addLevelName(25, "INFO") + logging.captureWarnings(True) from tools.translate import resetlocale resetlocale() From c39f7e4987e8e768a9096c201fb7099beb9be7d2 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 27 Jul 2017 23:03:02 +0200 Subject: [PATCH 08/13] [FIX] mrp: force help message in unicode --- addons/mrp/models/mrp_bom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/models/mrp_bom.py b/addons/mrp/models/mrp_bom.py index f56470a5aa8..d113b8d0f52 100644 --- a/addons/mrp/models/mrp_bom.py +++ b/addons/mrp/models/mrp_bom.py @@ -53,7 +53,7 @@ class MrpBom(models.Model): default='asap', required=True) picking_type_id = fields.Many2one( 'stock.picking.type', 'Picking Type', domain=[('code', '=', 'mrp_operation')], - help="When a procurement has a ‘produce’ route with a picking type set, it will try to create " + help=u"When a procurement has a ‘produce’ route with a picking type set, it will try to create " "a Manufacturing Order for that product using a BoM of the same picking type. That allows " "to define procurement rules which trigger different manufacturing orders with different BoMs. ") company_id = fields.Many2one( From 586b97e17bc595607c4a88ffc84a0f8a02147520 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 28 Jul 2017 11:18:57 +0200 Subject: [PATCH 09/13] [FIX] crm: correct duplicate record ID Introduced by a8c5b7810f412d2b956f8163e169159471494ea5 + spellchecking --- addons/crm/report/crm_opportunity_report_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/report/crm_opportunity_report_view.xml b/addons/crm/report/crm_opportunity_report_view.xml index de068eae406..1afbfb8c867 100644 --- a/addons/crm/report/crm_opportunity_report_view.xml +++ b/addons/crm/report/crm_opportunity_report_view.xml @@ -78,8 +78,8 @@ [('probability', '=', 100)] {'col_group_by': ['create_date:month'], 'group_by': ['country_id']} - - Expected Revenus by Team + + Expected Revenue by Team crm.opportunity.report {'group_by': ['create_date:month', 'team_id'], 'measures': ['expected_revenue', '__count']} From 55d9c37520def47fd22593c26e5a7863d3f4604b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 28 Jul 2017 14:16:05 +0200 Subject: [PATCH 10/13] [FIX] payment_authorize: avoid crash when contact ogone without street on partner --- addons/payment_authorize/models/authorize_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index f31cf45801a..1ae0e71b6ed 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -111,7 +111,7 @@ class AuthorizeAPI(): payment_profile = etree.SubElement(profile, "paymentProfiles") etree.SubElement(payment_profile, "customerType").text = 'business' if partner.is_company else 'individual' billTo = etree.SubElement(payment_profile, "billTo") - etree.SubElement(billTo, "address").text = (partner.street + (partner.street2 if partner.street2 else '')) or None + etree.SubElement(billTo, "address").text = (partner.street or '' + (partner.street2 if partner.street2 else '')) or None etree.SubElement(billTo, "city").text = partner.city etree.SubElement(billTo, "state").text = partner.state_id.name or None etree.SubElement(billTo, "zip").text = partner.zip From a7b7576536e90b9f736591c62eb1bae8802b7a4f Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 28 Jul 2017 15:33:21 +0200 Subject: [PATCH 11/13] [FIX] test_converter: declare string containing unicode as unicode --- odoo/addons/test_converter/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/odoo/addons/test_converter/models.py b/odoo/addons/test_converter/models.py index b6251a5df3f..55938946b34 100644 --- a/odoo/addons/test_converter/models.py +++ b/odoo/addons/test_converter/models.py @@ -21,12 +21,12 @@ class test_model(models.Model): (4, "réponse "), ]) selection_str = fields.Selection([ - ('A', "Qu'il n'est pas arrivé à Toronto"), - ('B', "Qu'il était supposé arriver à Toronto"), - ('C', "Qu'est-ce qu'il fout ce maudit pancake, tabernacle ?"), - ('D', "La réponse D"), - ], string="Lorsqu'un pancake prend l'avion à destination de Toronto et " - "qu'il fait une escale technique à St Claude, on dit:") + ('A', u"Qu'il n'est pas arrivé à Toronto"), + ('B', u"Qu'il était supposé arriver à Toronto"), + ('C', u"Qu'est-ce qu'il fout ce maudit pancake, tabernacle ?"), + ('D', u"La réponse D"), + ], string=u"Lorsqu'un pancake prend l'avion à destination de Toronto et " + u"qu'il fait une escale technique à St Claude, on dit:") html = fields.Html() text = fields.Text() From d82933d8e77c0b6dc84fc9367e331ae95834c565 Mon Sep 17 00:00:00 2001 From: "Yenthe V.G" Date: Fri, 28 Jul 2017 15:44:18 +0200 Subject: [PATCH 12/13] [FIX] web: change exception name from openerp to Odoo The crash manager still used the old name for the exception. (PR #18522) --- addons/web/static/src/js/framework/crash_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/framework/crash_manager.js b/addons/web/static/src/js/framework/crash_manager.js index df21e87047c..bc9046f5719 100644 --- a/addons/web/static/src/js/framework/crash_manager.js +++ b/addons/web/static/src/js/framework/crash_manager.js @@ -175,7 +175,7 @@ var RedirectWarningHandler = Dialog.extend(ExceptionHandler, { } }); -core.crash_registry.add('openerp.exceptions.RedirectWarning', RedirectWarningHandler); +core.crash_registry.add('odoo.exceptions.RedirectWarning', RedirectWarningHandler); return CrashManager; }); From 1644b92fd8a7a38841333144064772fa50ef3e96 Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Mon, 17 Oct 2016 11:56:12 +0200 Subject: [PATCH 13/13] [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