Skip to content

[18.0][FIX] web_responsive: Fix menu icon rendering by delegating to Odoo's built-in functionality#3433

Open
mohamedhagag wants to merge 4 commits intoOCA:18.0from
mohamedhagag:18.0
Open

[18.0][FIX] web_responsive: Fix menu icon rendering by delegating to Odoo's built-in functionality#3433
mohamedhagag wants to merge 4 commits intoOCA:18.0from
mohamedhagag:18.0

Conversation

@mohamedhagag
Copy link

The previous implementation failed to render menu icons when only base64
image data was present without a file on disk. This happened because the
logic checked for menu.webIcon but ignored menu.webIconData when
webIcon was missing.

The fix simplifies the logic by delegating icon handling to Odoo's
built-in webIconData, which already properly handles all icon formats:

  • Base64 encoded images (PNG and SVG)
  • File paths (module,filename format)
  • Direct data URIs

This approach follows the standards and trusts
Odoo's menu service to provide correctly formatted icon data.

Copilot AI and others added 4 commits February 11, 2026 04:44
The previous implementation failed to render menu icons when only base64
image data was present without a file on disk. This happened because the
logic checked for `menu.webIcon` but ignored `menu.webIconData` when
webIcon was missing.

The fix simplifies the logic by delegating icon handling to Odoo's
built-in webIconData, which already properly handles all icon formats:
- Base64 encoded images (PNG and SVG)
- File paths (module,filename format)
- Direct data URIs

This approach follows the pattern used by muk_web_appsbar and trusts
Odoo's menu service to provide correctly formatted icon data.

Co-authored-by: mohamedhagag <1042088+mohamedhagag@users.noreply.github.com>
Add more detailed JSDoc comment for updateMenuWebIconData to clarify
the function's purpose and how it works with the menu copy pattern.

Co-authored-by: mohamedhagag <1042088+mohamedhagag@users.noreply.github.com>
Fix menu icon rendering for base64-only images
Copilot AI review requested due to automatic review settings February 11, 2026 04:59
@OCA-git-bot
Copy link
Contributor

Hi @Tardo, @SplashS,
some modules you are maintaining are being modified, check this out!

This comment was marked as spam.

@mohamedhagag mohamedhagag changed the title Fix menu icon rendering by delegating to Odoo's built-in functionality [18.0] web_responsive: Fix menu icon rendering by delegating to Odoo's built-in functionality Feb 11, 2026
@mohamedhagag mohamedhagag changed the title [18.0] web_responsive: Fix menu icon rendering by delegating to Odoo's built-in functionality [18.0][FIX]web_responsive: Fix menu icon rendering by delegating to Odoo's built-in functionality Feb 11, 2026
@mohamedhagag mohamedhagag changed the title [18.0][FIX]web_responsive: Fix menu icon rendering by delegating to Odoo's built-in functionality [18.0][FIX] web_responsive: Fix menu icon rendering by delegating to Odoo's built-in functionality Feb 11, 2026
@flotho
Copy link
Member

flotho commented Feb 14, 2026

ping @DorianMAG , seems to fix one of our issues

Copy link

@DorianMAG DorianMAG left a comment

Choose a reason for hiding this comment

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

Hi @mohamedhagag,
Thx for this FIX.
LGTM, but can you squash commit plz and push force plz?
One commit by PR

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.

6 participants