Skip to content

Commit

Permalink
[18.0][FIX] web_responsive: fix modules paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kobros-tech committed Jan 28, 2025
1 parent 4324b3a commit 3ef1bf3
Showing 1 changed file with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,30 @@ export class AppsMenuCanonicalSearchBar extends Component {
const searchField = (item) => item.displayName;
// Update search results paths
for (const root in this.rootMenuItems) {
this.rootMenuItems[root].path =
`/odoo/${this.rootMenuItems[root].actionPath}`;
// Root is an app
if (this.rootMenuItems[root]?.actionPath) {
this.rootMenuItems[root].path =
`/odoo/${this.rootMenuItems[root].actionPath}`;
}
// Root is a module
else {
this.rootMenuItems[root].path =
`/odoo/action-${this.rootMenuItems[root].actionID}`;
}
}
for (const item in this.subMenuItems) {
for (const root in this.rootMenuItems) {
if (this.subMenuItems[item].appID === this.rootMenuItems[root].appID) {
this.subMenuItems[item].path =
`/odoo/${this.rootMenuItems[root].actionPath}/action-${this.subMenuItems[item].actionID}`;
// Root is an app
if (this.rootMenuItems[root]?.actionPath) {
this.subMenuItems[item].path =
`/odoo/${this.rootMenuItems[root].actionPath}/action-${this.subMenuItems[item].actionID}`;
}
// Root is a module
else {
this.subMenuItems[item].path =
`/odoo/action-${this.subMenuItems[item].actionID}`;
}
}
}
}
Expand Down

0 comments on commit 3ef1bf3

Please sign in to comment.