Skip to content
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

[16.0] web_company_color: not working if not all colors are filled #2721

Open
LauraCForgeFlow opened this issue Jan 16, 2024 · 4 comments
Open
Labels

Comments

@LauraCForgeFlow
Copy link

Module

web_company_color

Describe the bug

If not all company colors are filled, then the colors which are filled do not get applied to the company's page.

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior:

  1. Click on the 'Compute Colors From Logo' button in 'Company Styles' (only the 3 first colors should be filled) and refresh the page.
  2. The colors on the page will stay the same, they won't change according to the company colors.
  3. If we look a the Odoo logs, we will be able to see a warning similar to this, since it does not recognise 'theme-color("primary")' as a color:
Error: argument `$color` of `darken($color, $amount)` must be a color
        on line 41:18 of stdin, in function `darken`
        from line 41:18 of stdin
>>           color: darken(theme-color("primary"), 10%) !important;

Expected behavior
The colors of the page should change according to the company colors, and not throw the previously mentioned warning. This should happen even if not all colors are filled.

Additional context
This problem was introduced in PR #2534 (by @aleuffre), at least in version 16.0.

@LoisRForgeFlow
Copy link
Contributor

LoisRForgeFlow commented Jan 16, 2024

I thinks this affects more versions, the original PR is this one #1903.

cc @hbrunn @StefanRijnhart

@peterromao
Copy link
Contributor

On v16 I confirm this and I think there should be a way to revert to odoo's original color scheme. Also color_link_test seems to be changing the menu text colors in some menus, but probably in some modules that do not follow correct css linking of attributes.
Also is there a way to define a color as alpha? Empty?

@LoisRForgeFlow
Copy link
Contributor

@hbrunn your feedback would be really appreciated here.

Thanks!

@hbrunn
Copy link
Member

hbrunn commented Feb 12, 2024

that's simply a case of a wrong migration that has been merged without enough testing, nothing to do with me or earlier versions.

The scss function theme-color has been deprecated, this needs to be replaced with map-get($theme-colors, 'primary') in v16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants