Repository navigation
Conversation
The module re-registers the "Import records" cog menu item so that it also shows on small screens, where core hides it. In 19.0 core read `isSmall` off the env, so the module could delegate to core's `isDisplayed` with a shadowed env. In 20.0 `env.isSmall` is gone (web/static/src/env.js:21-24) and the check reads the `ui` service through `useService`, which resolves from the scope's env and not from the argument (web/static/src/core/utils/hooks.js:158). The old code still loads and still passes, but it no longer has any effect: the item stays hidden. Core's condition is repeated here without the small-screen check, the same way enterprise's esg module does it in 20.0. The view type list follows core and gains "grid" (base_import/static/src/import_records/import_records.js:46).
…odule card The module had no i18n/ folder. From 20.0 the export also brings the module card, so the .pot and the es.po are created here with its name and summary translated. The description is the whole README and stays untranslated.
Contributor
…mport» and drop «list view» The core item is called «Import» in 20.0 (base_import import_records.xml), and the module also covers kanban and grid, so the summary no longer says list view. The .pot and es.po follow.
Contributor
|
@roboadhoc r+ nobump rebase-ff |
Contributor
|
Merge method set to rebase and fast-forward. |
roboadhoc
pushed a commit
that referenced
this pull request
Nov 12, 2026
The module re-registers the "Import records" cog menu item so that it also shows on small screens, where core hides it. In 19.0 core read `isSmall` off the env, so the module could delegate to core's `isDisplayed` with a shadowed env. In 20.0 `env.isSmall` is gone (web/static/src/env.js:21-24) and the check reads the `ui` service through `useService`, which resolves from the scope's env and not from the argument (web/static/src/core/utils/hooks.js:158). The old code still loads and still passes, but it no longer has any effect: the item stays hidden. Core's condition is repeated here without the small-screen check, the same way enterprise's esg module does it in 20.0. The view type list follows core and gains "grid" (base_import/static/src/import_records/import_records.js:46). Part-of: #498 Signed-off-by: Luciano Esperlazza <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 12, 2026
…odule card The module had no i18n/ folder. From 20.0 the export also brings the module card, so the .pot and the es.po are created here with its name and summary translated. The description is the whole README and stays untranslated. Part-of: #498 Signed-off-by: Luciano Esperlazza <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 12, 2026
…mport» and drop «list view» The core item is called «Import» in 20.0 (base_import import_records.xml), and the module also covers kanban and grid, so the summary no longer says list view. The .pot and es.po follow. closes #498 Signed-off-by: Luciano Esperlazza <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 12, 2026
The module re-registers the "Import records" cog menu item so that it also shows on small screens, where core hides it. In 19.0 core read `isSmall` off the env, so the module could delegate to core's `isDisplayed` with a shadowed env. In 20.0 `env.isSmall` is gone (web/static/src/env.js:21-24) and the check reads the `ui` service through `useService`, which resolves from the scope's env and not from the argument (web/static/src/core/utils/hooks.js:158). The old code still loads and still passes, but it no longer has any effect: the item stays hidden. Core's condition is repeated here without the small-screen check, the same way enterprise's esg module does it in 20.0. The view type list follows core and gains "grid" (base_import/static/src/import_records/import_records.js:46). Part-of: #498 Signed-off-by: Luciano Esperlazza <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Nov 12, 2026
…odule card The module had no i18n/ folder. From 20.0 the export also brings the module card, so the .pot and the es.po are created here with its name and summary translated. The description is the whole README and stays untranslated. Part-of: #498 Signed-off-by: Luciano Esperlazza <[email protected]>
This branch was previously deployed
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.

Migrates
base_import_mobile_uxfrom 19.0 to 20.0.Tarea: https://www.adhoc.inc/odoo/project.task/76811
What the jump broke, and why nothing failed
The module re-registers the "Import records" cog menu item so that it also shows on
small screens, where core hides it.
In 19.0 core decided that with
isDisplayed: ({ config, isSmall }) => !isSmall && ...(
base_import/static/src/import_records/import_records.js:42-43), readingisSmalloff the env, so the module only had to call core's own
isDisplayedwith a shadowedenv.
In 20.0 that no longer works, for two reasons:
env.isSmallwas removed.makeEnv()now returns a Proxy that raises on it:"env.isSmall" was removed when the ui service became UIPlugin
(
web/static/src/env.js:16-44).uiservice instead (import_records.js:39-50), anduseServiceresolves from the scope's env, not from the argument it is given(
web/static/src/core/utils/hooks.js:158).So the shadowed env still arrives and nobody reads it. The module installs, raises no
error, breaks no test — and silently stops having any effect.
The fix
Core's condition is repeated here without the small-screen check, which is what
esgdoes in 20.0 (esg/static/src/components/cog_menu/esg_import_menu.js:10-24).It cannot be delegated without faking the
uiservice, which is global.The view type list follows core and gains
grid(import_records.js:46), which iscore's own criterion and the one the module always delegated to.
The README says why the condition is repeated, so that it is kept in sync.
Test plan
On a narrow viewport (375x667), in a list where creating records is allowed:
create="0"the entry is absent, in both versions:the module lifts only the small-screen guard, not the rest of core's criteria.
Checked on a local 20.0 database with a declarative browser script, against three
combinations: 19.0 with the 19.0 code, 20.0 with the 19.0 code (entry gone, no JS
errors) and 20.0 with this code (entry back).
Notes for the reviewer
dependsandauto_installare unchanged; onlyversionandinstallablemove,both from the migrator.
upgrade_coderan every script of the jump: no file changed.tests/, so there is no regression net; it was migrated withoutone on purpose, and the behaviour above was verified on screen instead.
i18n/is new: from 20.0 the export also brings the module card. Its name andsummary are translated; the description is the whole README and stays untranslated.