[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:
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user