-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website_theme_flexible: Internal Server Error: not enough arguments for format string when having activated the developer mode with assets #2
Comments
But due to what module? |
Sorry, issue updated (did not mention it, because it is the only module so far in this repo branch 11.0) |
@tarteo can you check? |
The developer mode with assets remains unusable even after proper deinstallation of the app and subsequent database update including Odoo restart. |
@pedrobaeza @tarteo I trace the bug, when installing Probleme was odoo does not generate correctly URL for those file:
I don't know if we could inherit less template like this with inline less .. it work but traceback in debug=assets mode ... here is the complete traceback
When uninstalling the module all is ok .. and when comment this file in manifest.py all is ok .. |
@yajo any clue by your part? |
@pedrobaeza what I understood is odoo try to have an url for those less template file, but have not because it's just template inheritance with inline less code .. (that a good Idea !! ) I never find other module that use it, and when searchin, I find some module that create a controler that return an less file by url with the compiled less code. @yelizariev you did some brand / debrand module with less and css, did you ever encounter this ? |
Sorry, no idea 😕 |
@njeudy In which module is it done by a controller? I need it to be inline because of the qweb variables (we don't want a theme limited by presets). @pedrobaeza
I think it's an issue of Odoo. |
Try to include less file, instead of inline less code |
@yelizariev is it possible to print qweb variables in a .less file? |
I guess no, you need to use presets. I faced a similar problem with the inline code. It's probably an odoo bug, but it's not a big chance that the will fix it in a short period of time. |
@yelizariev Yea I know normal themes use presets. I can't make millions of presets for each color :P. This module exists because of the flexible setting of colors, fonts, etc. |
I don't know if it is a dumb idea, but when I consider my workflow when designing websites for my customers, I could imagine a situation like this: |
@tarteo : @yelizariev did this in https://github.com/it-projects-llc/misc-addons/blob/11.0/theme_kit/models/res_config.py#L88 .. and less / css was generate here: https://github.com/it-projects-llc/misc-addons/blob/11.0/theme_kit/models/theme.py think we can use same thing: changing one value update a view un odoo with less file ... that the mechanisme use when you edit css/less file from web_editor. |
@njeudy thank you, I didn't remember where I faced the problem 😃 |
@njeudy Thanks! I'll try to make it like that when I get some more time. 👍 |
I have looked at this today because maybe we could start using this module and have seen this issue. From my experience there will be other issues regarding to the approach used in this module. The actual error is that the styles are generated inline for the assets_frontend bundle and the less preprocessor cannot obtain an url for the content to be saved in the attachments as usually it's done with the rest when apply. Another drawback that came from the usage of conditionals fragments for assets bundles is that their content will be saved into attachments for cache the results so any change to the conditions need to reevaluate the assets bundles in order for the changes to be updated into the attachments generated. I have implemented this kind of Odoo pattern into a module named custom_styles and I use it to be able to manually add custom styles and even js code editable from the Odoo backend without the need to make a custom module to add the file. You could see it here: That module allow you to do this from the Odoo UI but the same could be managed from the website model write to be able to trigger the attachment content update and view extension inheritance links into the asset bundle |
Module: Website Theme Flexible website-theme-flexible
Environment: Ubuntu 16.04 LTS, Odoo 11.0 CE Vers. 2018-03-21
Traceback:
The text was updated successfully, but these errors were encountered: