From f5e803c025bbeba5aa57c62cf9ed7ef9a70aa6b3 Mon Sep 17 00:00:00 2001 From: Bruno PLANCHER Date: Tue, 2 Aug 2016 09:48:47 +0200 Subject: [PATCH] [FIX] tools: strip i18n-overwrite from gevent parameters When gevent is enabled, some arguments are stripped to avodi being retriggered in the other workers (e.g. update of a module). The `--i18n-overwrite` was not stripped and the other worker raised an error has the `overwrite_existing_translations` argument requires the `update` argument (which is stripped in the `stripped_sys_argv` method. Fixes #12566 Closes #12986 --- openerp/tools/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/tools/misc.py b/openerp/tools/misc.py index c47ed00302d..a9f1398ca72 100644 --- a/openerp/tools/misc.py +++ b/openerp/tools/misc.py @@ -984,7 +984,7 @@ class CountingStream(object): def stripped_sys_argv(*strip_args): """Return sys.argv with some arguments stripped, suitable for reexecution or subprocesses""" - strip_args = sorted(set(strip_args) | set(['-s', '--save', '-u', '--update', '-i', '--init'])) + strip_args = sorted(set(strip_args) | set(['-s', '--save', '-u', '--update', '-i', '--init', '--i18n-overwrite'])) assert all(config.parser.has_option(s) for s in strip_args) takes_value = dict((s, config.parser.get_option(s).takes_value()) for s in strip_args)