[DOC] base: improve error message in asset bundles

When compiling a less file in the asset bundles, we make sure that the
@import statements are 'sanitized', which is really non intuitive to
many developers.  With this commit, we simply add more information to
the error message, to give them a better chance of not wasting their
time.

Thank you yenthe for the message...
This commit is contained in:
Géry Debongnie
2017-11-06 11:45:03 +01:00
parent 117351e121
commit 8bb6bf4e44
+1 -1
View File
@@ -388,7 +388,7 @@ class AssetsBundle(object):
if '.' not in ref and line not in imports and not ref.startswith(('.', '/', '~')):
imports.append(line)
return line
msg = "Local import '%s' is forbidden for security reasons." % ref
msg = "Local import '%s' is forbidden for security reasons. Please remove all @import \"your_file.less\" imports in your custom less files. In Odoo you have to import all less files in the assets, and not through the @import statement." % ref
_logger.warning(msg)
self.css_errors.append(msg)
return ''