fix(portal): force outer breadcrumb container on every /my/* page
Odoo stock routes (/my/orders, /my/invoices, etc.) call portal.portal_searchbar with breadcrumbs_searchbar=True, which made portal.portal_layout suppress its outer breadcrumb container — the breadcrumb then rendered inside the searchbar nav, which lives inside our shell's <main> and showed up in the right column. We can't edit the stock route handlers, so override portal.portal_layout in fp_portal_shell to ignore breadcrumbs_searchbar (still respect no_breadcrumbs and my_details). CSS-hide the now-duplicate inline breadcrumb inside .o_portal_navbar so we don't show two trails. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -172,4 +172,15 @@
|
||||
#wrap > .container > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// Odoo's portal.portal_searchbar still renders an inline breadcrumb
|
||||
// inside its navbar when the page sets breadcrumbs_searchbar=True.
|
||||
// Now that our shell forces the outer breadcrumb to ALWAYS render
|
||||
// (via the fp_portal_shell xpath above), the inline copy would be
|
||||
// a visible duplicate. Hide it; the navbar's other content (title,
|
||||
// sort/filter dropdowns) stays visible.
|
||||
.o_portal_navbar > .breadcrumb,
|
||||
.o_portal_navbar > ol.breadcrumb {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,15 @@
|
||||
name="FP Portal Shell — Sidebar Wrap"
|
||||
inherit_id="portal.portal_layout"
|
||||
priority="50">
|
||||
<!-- Force Odoo's outer breadcrumb container to render even when a page
|
||||
sets breadcrumbs_searchbar=True (e.g. /my/orders, /my/invoices, and
|
||||
other stock Odoo list pages). Keeps the breadcrumb consistently above
|
||||
our shell, never inside the right column. We still respect
|
||||
no_breadcrumbs and my_details (used by /my/account). -->
|
||||
<xpath expr="//div[hasclass('o_portal') and hasclass('container') and hasclass('mt-3')]" position="attributes">
|
||||
<attribute name="t-if">not no_breadcrumbs and not my_details</attribute>
|
||||
</xpath>
|
||||
|
||||
<!--
|
||||
Replace #wrap entirely. The $0 text node inside
|
||||
<main class="o_fp_portal_main"> causes Odoo's inheritance
|
||||
|
||||
Reference in New Issue
Block a user