From c1abb1841e77e766d9cc3e75901093160393c855 Mon Sep 17 00:00:00 2001 From: "Francois (fge)" Date: Fri, 23 Apr 2021 10:01:41 +0000 Subject: [PATCH] [DOC] web: export an object containing a comment is not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes odoo/odoo#69407 Signed-off-by: Géry Debongnie (ged) --- doc/reference/javascript_reference.rst | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst index e89abd680f7..b4fd5e536a5 100644 --- a/doc/reference/javascript_reference.rst +++ b/doc/reference/javascript_reference.rst @@ -766,6 +766,33 @@ parser to transform native modules. There are, therefore, a number of limitation import X ... */ +- when you ``export`` an object, it can't contain a comment + +.. code-block:: javascript + + // supported + export { + a as b, + c, + d, + } + + export { + a + } from "./file_a" + + + // not supported + export { + a as b, // this is a comment + c, + d, + } + + export { + a /* this is a comment */ + } from "./file_a" + - Odoo needs a way to determine if a module is described by a path (like ``./views/form_view``) or a name (like ``web.FormView``). It has to use a heuristic to do just that: if there is a ``/`` in the name, it is considered a path. This means that Odoo does not really support anymore module names with a ``/``.