[17.0][ADD] web_action_desktop_only: hide desktop-only menus on small screens#3502
Open
sersanchus wants to merge 1 commit intoOCA:17.0from
Open
[17.0][ADD] web_action_desktop_only: hide desktop-only menus on small screens#3502sersanchus wants to merge 1 commit intoOCA:17.0from
sersanchus wants to merge 1 commit intoOCA:17.0from
Conversation
7b936e1 to
56f6d41
Compare
…us on small screens
56f6d41 to
e4502e0
Compare
maurochip
approved these changes
Apr 2, 2026
zamberjo
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces the new module
web_action_desktop_only.It allows administrators to mark specific actions as desktop only, so their associated menu entries are automatically hidden on small-screen (mobile) devices.
No Python logic is needed at runtime on mobile: the filtering happens entirely on the frontend via a patch to the menu service.
It also introduces a main action flag that designates the primary entry point of an application. When some child menus are hidden on mobile, the app automatically redirects to the first child marked as main action.
Both flags are added to the base
ir.actions.actionsmodel, so they apply to any action type (ir.actions.act_window,ir.actions.client,ir.actions.report, etc.).Typical use case: An ERP module has sub-menus for a real-time map (desktop only), a complex dashboard (desktop only), and a summary list (available everywhere). On mobile, only the summary list is shown and becomes
the app's landing page. On desktop, all menus work normally.
How it works
desktop_only,main_action) are added toir.actions.actions.ir.ui.menu.load_web_menusis extended to includeDesktopOnlyandMainActionproperties in the menu payload, loaded once at startup with no extra RPC calls at runtime.getApps()in the menu service to filter apps and re-assign entry points on small screens.ir.actions.act_windowandir.actions.clientexposes the two fields in the UI under the Visibility tab, so they can be toggled from the web interface without touching XML.