diff --git a/odoo/tools/js_transpiler.py b/odoo/tools/js_transpiler.py index 19d26a62333..f494853380e 100644 --- a/odoo/tools/js_transpiler.py +++ b/odoo/tools/js_transpiler.py @@ -402,7 +402,7 @@ IMPORT_BASIC_RE = re.compile(r""" ^ (?P\s*) # space and empty line import\s+ # import - (?P{(\s*\w+\s*,?\s*)+})\s* # { a, b, c as x, ... } + (?P{[\s\w,]+})\s* # { a, b, c as x, ... } from\s* # from (?P(?P["'`])([^"'`]+)(?P=quote)) # "file path" ("some/path") """, re.MULTILINE | re.VERBOSE) @@ -484,7 +484,7 @@ IMPORT_DEFAULT_AND_NAMED_RE = re.compile(r""" (?P\s*) # space and empty line import\s+ # import (?P\w+)\s*,\s* # default variable name, - (?P{(\s*\w+\s*,?\s*)+})\s* # { a, b, c as x, ... } + (?P{[\s\w,]+})\s* # { a, b, c as x, ... } from\s* # from (?P(?P["'`])([^"'`]+)(?P=quote)) # "file path" ("some/path") """, re.MULTILINE | re.VERBOSE)