From ba244cef01132347df4d2d9553ea3105ba13a938 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 4 Jun 2020 12:39:11 +0200 Subject: [IMP] *: replace to new _() syntax Using a few regex like \((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\) ($1, $3)) Old syntax is still compatible but starts the migration to the new syntax that catches error. --- addons/base_import_module/models/ir_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/base_import_module/models/ir_module.py') diff --git a/addons/base_import_module/models/ir_module.py b/addons/base_import_module/models/ir_module.py index 9fff8448ffd..9e2116507a6 100644 --- a/addons/base_import_module/models/ir_module.py +++ b/addons/base_import_module/models/ir_module.py @@ -121,7 +121,7 @@ class IrModule(models.Model): with zipfile.ZipFile(module_file, "r") as z: for zf in z.filelist: if zf.file_size > MAX_FILE_SIZE: - raise UserError(_("File '%s' exceed maximum allowed file size") % zf.filename) + raise UserError(_("File '%s' exceed maximum allowed file size", zf.filename)) with tempfile.TemporaryDirectory() as module_dir: import odoo.modules.module as module -- cgit v1.2.3