summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-11-06 11:38:08 +0100
committerGéry Debongnie <ged@odoo.com>2017-11-06 11:45:03 +0100
commit8bb6bf4e443236a81517a6c6ee37bd2afb5bdfe6 (patch)
treeacbe0529672701e079fb15a2b050a71c220e750e
parent117351e121cd2ca82eaa9f90407f3958f20c7d3a (diff)
[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...
-rw-r--r--odoo/addons/base/ir/ir_qweb/assetsbundle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/addons/base/ir/ir_qweb/assetsbundle.py b/odoo/addons/base/ir/ir_qweb/assetsbundle.py
index f2221e9f7cd..e3c0b66f8cc 100644
--- a/odoo/addons/base/ir/ir_qweb/assetsbundle.py
+++ b/odoo/addons/base/ir/ir_qweb/assetsbundle.py
@@ -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 ''