[FIX] web_responsive: adapt apps_menu template for Odoo 19 (this.ui.isSmall -> env.isSmall)#3607
Open
ethanleellj wants to merge 1 commit into
Open
[FIX] web_responsive: adapt apps_menu template for Odoo 19 (this.ui.isSmall -> env.isSmall)#3607ethanleellj wants to merge 1 commit into
ethanleellj wants to merge 1 commit into
Conversation
`web_responsive` 模块的 XML 模板文件中使用了 Odoo 18 的 API `this.ui.isSmall`,但 Odoo 19 已将其改为 `env.isSmall`。这导致 OWL 模板继承时 xpath 定位失败,抛出 `OwlError` 并摧毁根组件,整个后端界面变成空白页。
Contributor
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.
Problem
In Odoo 19, the
NavBar.AppsMenutemplate usesenv.isSmallinstead of the oldthis.ui.isSmall. Theweb_responsivemodule'sapps_menu.xmlstill references the old API, causing xpath expressions to fail:Element '<xpath expr="//t[@t-if='this.ui.isSmall']" ...>' cannot be located in element treeThis OwlError destroys the root component, resulting in a completely blank backend page after login.
Solution
Replace
this.ui.isSmallwithenv.isSmallinapps_menu.xml(2 occurrences).Tested on
web_responsivefrom OCA/web 19.0 branch