Skip to content

[FIX] web_responsive: adapt apps_menu template for Odoo 19 (this.ui.isSmall -> env.isSmall)#3607

Open
ethanleellj wants to merge 1 commit into
OCA:19.0from
ethanleellj:19.0
Open

[FIX] web_responsive: adapt apps_menu template for Odoo 19 (this.ui.isSmall -> env.isSmall)#3607
ethanleellj wants to merge 1 commit into
OCA:19.0from
ethanleellj:19.0

Conversation

@ethanleellj

Copy link
Copy Markdown

Problem

In Odoo 19, the NavBar.AppsMenu template uses env.isSmall instead of the old this.ui.isSmall. The web_responsive module's apps_menu.xml still references the old API, causing xpath expressions to fail:

Element '<xpath expr="//t[@t-if='this.ui.isSmall']" ...>' cannot be located in element tree

This OwlError destroys the root component, resulting in a completely blank backend page after login.

Solution

Replace this.ui.isSmall with env.isSmall in apps_menu.xml (2 occurrences).

Tested on

  • Odoo 19.0 (server version 19.0 final)
  • web_responsive from OCA/web 19.0 branch

`web_responsive` 模块的 XML 模板文件中使用了 Odoo 18 的 API `this.ui.isSmall`,但 Odoo 19 已将其改为 `env.isSmall`。这导致 OWL 模板继承时 xpath 定位失败,抛出 `OwlError` 并摧毁根组件,整个后端界面变成空白页。
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants