Skip to content

[19.0][MIG] web_company_color: Migration to 19.0#3326

Open
BhaveshHeliconia wants to merge 54 commits into
OCA:19.0from
HeliconiaIO:19.0-mig-web_company_color
Open

[19.0][MIG] web_company_color: Migration to 19.0#3326
BhaveshHeliconia wants to merge 54 commits into
OCA:19.0from
HeliconiaIO:19.0-mig-web_company_color

Conversation

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor

No description provided.

@BhaveshHeliconia BhaveshHeliconia mentioned this pull request Oct 17, 2025
46 tasks
@codeagencybe

Copy link
Copy Markdown
Member

What's the status on this ? I see it's been open for 3 months already. What's the blocking?

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

@codeagencybe This PR is currently waiting for a reviewer. That’s the main blocker at the moment.

Tardo and others added 26 commits March 13, 2026 09:23
Currently translated at 100.0% (9 of 9 strings)

Translation: web-13.0/web-13.0-web_company_color
Translate-URL: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_company_color/zh_CN/
We need to disable the company unlinking test, as if not, when tested
in integrated environments, it fails as there are records linked to the
company, like the warehouse when `stock` module is installed.
If we change something with base.document.layout wizard, this will launch the colors computing even without changing the logo. This procedure will change the value of the colors if they were set by hand.

This change forces the user to press a button to recompute the colors and avoid possible undesired changes.

TT34902
Currently translated at 100.0% (10 of 10 strings)

Translation: web-15.0/web-15.0-web_company_color
Translate-URL: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_company_color/de/
Currently translated at 100.0% (10 of 10 strings)

Translation: web-16.0/web-16.0-web_company_color
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_company_color/de/
@BhaveshHeliconia
BhaveshHeliconia force-pushed the 19.0-mig-web_company_color branch from 709ef06 to 94959d9 Compare March 13, 2026 03:53
@Linekio

Linekio commented Apr 15, 2026

Copy link
Copy Markdown

Hello,
Seems it's not compatible with dark mode ? I just clicked on "Compute colors from logo"".
image
image

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

@Linekio Thanks for the feedback. Could you please elaborate on what’s not working in dark mode? That will help me better understand and investigate the issue.

@Linekio

Linekio commented Apr 16, 2026

Copy link
Copy Markdown

Hello,
Most of the menu buttons are invisible by default
image

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

@Linekio I’ve tested it in light mode and it’s working as expected. I haven’t tested it in dark mode, as Odoo doesn’t provide native dark mode support, and I’m not aware of any official OCA module for it.

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

@Linekio I’ve tested it in light mode and it’s working as expected. I haven’t tested it in dark mode, as Odoo doesn’t provide native dark mode support, and I’m not aware of any official OCA module for it.

@pedrobaeza do we need to consider compatibility with third-party dark mode modules in this case?

@pedrobaeza

Copy link
Copy Markdown
Member

I think he's talking about https://github.com/OCA/web/tree/19.0/web_dark_mode

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

I think he's talking about https://github.com/OCA/web/tree/19.0/web_dark_mode

Thanks, I’ll work on that.

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

@Linekio I’ve reviewed the functionality of the module. It extracts colors from the uploaded company logo and applies them to the corresponding fields.

This logic is independent of light or dark mode, as the module itself is not aware of any theme context.

To support dark mode, we would need to introduce a dependency on a module like web_dark_mode and adapt the color extraction logic based on whether dark mode is enabled.

@zigatrcek

Copy link
Copy Markdown

Hi, what's the status of this?

In my opinion, supporting dark mode would warrant a separate connector module in order to avoid any unwanted dependency chains. I think the right decision would be to merge this without dark mode support.

@gbrito gbrito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and looks good

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include #3448 #3568 #3426 #3427 #3484

/ocabot migration web_company_color

Comment thread web_company_color/models/res_company.py Outdated
}
}
.o_menu_systray button,
.o_navbar_breadcrumbs,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Odoo 19 the breadcrumbs element is now <div class="o_navbar_breadcrumbs d-contents">. Because of d-contents the div renders no box of its own, so applying color/background-color hover rules to .o_navbar_breadcrumbs directly is a no-op the breadcrumb text/links are already covered by the navbar text and link color rules. So I dropped it as dead CSS rather than keep a selector that no longer does anything.

.o_menu_systray button wasn't actually removed — I split it into its own dedicated rule lower in the template (.o_menu_systray button { color: ...; &:hover/&:focus { background-color: ... } }), keeping the exact same color and hover behavior. The diff just shows it leaving the old grouped selector.

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.