Files
Odoo-Modules/fusion_planning/views/portal_nav_inherit.xml
gsinghpal 87639a12b5 fix(fusion_planning): add Schedule tab to the Payslips page navs
The Schedule tab is injected into the Clock/Timesheets/Reports navs via xpath
inherits, but the two payslip templates (portal_payslip_list_page,
portal_payslip_detail_page) had no inherit, so Payslips showed only 4 tabs.
Add the matching inherits. Verified on the rendered /my/clock/payslips page:
5 nav items incl. Schedule. Live on entech 19.0.1.4.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 22:50:12 -04:00

67 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Reusable Schedule nav button used by all three inherits -->
<template id="schedule_nav_button" name="Fusion Planning Schedule Nav Button">
<a href="/my/clock/schedule" class="fclk-nav-item">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"/>
<line x1="16" y1="2" x2="16" y2="6"/>
<line x1="8" y1="2" x2="8" y2="6"/>
<line x1="3" y1="10" x2="21" y2="10"/>
<line x1="8" y1="14" x2="10" y2="14"/>
<line x1="14" y1="14" x2="16" y2="14"/>
<line x1="8" y1="18" x2="10" y2="18"/>
<line x1="14" y1="18" x2="16" y2="18"/>
</svg>
<span>Schedule</span>
</a>
</template>
<!-- Inject "Schedule" between Timesheets and Reports on the Clock page -->
<template id="portal_clock_page_inherit_schedule_nav"
inherit_id="fusion_clock.portal_clock_page"
name="Fusion Planning: Add Schedule tab to Clock nav">
<xpath expr="//div[hasclass('fclk-nav-bar')]/a[@href='/my/clock/timesheets']" position="after">
<t t-call="fusion_planning.schedule_nav_button"/>
</xpath>
</template>
<!-- Inject "Schedule" between Timesheets and Reports on the Timesheets page -->
<template id="portal_timesheet_page_inherit_schedule_nav"
inherit_id="fusion_clock.portal_timesheet_page"
name="Fusion Planning: Add Schedule tab to Timesheets nav">
<xpath expr="//div[hasclass('fclk-nav-bar')]/a[@href='/my/clock/timesheets']" position="after">
<t t-call="fusion_planning.schedule_nav_button"/>
</xpath>
</template>
<!-- Inject "Schedule" between Timesheets and Reports on the Reports page -->
<template id="portal_report_page_inherit_schedule_nav"
inherit_id="fusion_clock.portal_report_page"
name="Fusion Planning: Add Schedule tab to Reports nav">
<xpath expr="//div[hasclass('fclk-nav-bar')]/a[@href='/my/clock/timesheets']" position="after">
<t t-call="fusion_planning.schedule_nav_button"/>
</xpath>
</template>
<!-- Inject "Schedule" on the Payslips list page -->
<template id="portal_payslip_list_page_inherit_schedule_nav"
inherit_id="fusion_clock.portal_payslip_list_page"
name="Fusion Planning: Add Schedule tab to Payslips list nav">
<xpath expr="//div[hasclass('fclk-nav-bar')]/a[@href='/my/clock/timesheets']" position="after">
<t t-call="fusion_planning.schedule_nav_button"/>
</xpath>
</template>
<!-- Inject "Schedule" on the Payslip detail page -->
<template id="portal_payslip_detail_page_inherit_schedule_nav"
inherit_id="fusion_clock.portal_payslip_detail_page"
name="Fusion Planning: Add Schedule tab to Payslip detail nav">
<xpath expr="//div[hasclass('fclk-nav-bar')]/a[@href='/my/clock/timesheets']" position="after">
<t t-call="fusion_planning.schedule_nav_button"/>
</xpath>
</template>
</odoo>