muk-it / odoo-modules

Odoo App Store Modules
GNU Lesser General Public License v3.0
20 stars 14 forks source link

Muk theme fails after change colors. #7

Open borisduin opened 3 months ago

borisduin commented 3 months ago

Same as https://github.com/muk-it/odoo-modules/issues/4.

Oddo version: Odoo 17 Comunity. Error: ValueError: File(s) /muk_web_colors/static/src/scss/colors_light.scss not found in bundle web._assets_primary_variables. Odoo service is unavailable after this error. I stop odoo service, start odoo shell and run self.env['ir.module.module'].search([('name', '=', 'muk_web_colors')]).button_immediate_uninstall() to remove module, start odoo service and odoo is operative again. I resintall module, and muk themes keep with defaults colors. But, when i change some muk theme colors in setting page, odoo fails again.

trungnguyen119 commented 2 months ago

Same here, even after remove the module folder or stop override web._assets_primary_variables in the manifest file it is still return 500 error, the only way is to uninstall the module, hope this get fix soon.

Kaliuta commented 1 month ago

He also repeated this mistake. Here are the steps:

  1. Change the brand color.
  2. Save.
  3. Change the brand color again (second time).
  4. Save.
  5. Result: Error.

The error occurs if the website module is installed. Everything works fine without the website module installed.

I understood that it is related to the method:

def _get_custom_attachment(self, custom_url, op='=')

which is located in the path: /addons/website/models/assets.py

If the override of this method is commented out, there will be no error.

This requires additional research, but I think the problem is that the attachment is filtered by website_id, and style attachments generated by this module may not have this field, which leads to an error.

keshrath commented 1 month ago

@Kaliuta Thanks for the feedback, I will analyze it further.

AndaChain commented 1 week ago

He also repeated this mistake. Here are the steps:

  1. Change the brand color.
  2. Save.
  3. Change the brand color again (second time).
  4. Save.
  5. Result: Error.

The error occurs if the website module is installed. Everything works fine without the website module installed.

I understood that it is related to the method:

def _get_custom_attachment(self, custom_url, op='=')

which is located in the path: /addons/website/models/assets.py

If the override of this method is commented out, there will be no error.

This requires additional research, but I think the problem is that the attachment is filtered by website_id, and style attachments generated by this module may not have this field, which leads to an error.

Hi, I would like to know, what should I do to fix it? I am not sure what you do. Maybe, you show me your code, to clarify your explanation.