Files
Odoo-Modules/fusion_planning/views/portal_nav_inherit.xml
gsinghpal 19c1cbdf15 feat(fusion_planning): new module bridging fusion_clock with Odoo Planning
Adds a 'My Schedule' tab to the Fusion Clock portal that lists the current
employee's published planning.slot records, grouped by day. Reuses the
fusion_clock dark theme and reuses Odoo Planning's stock backend UI
(Gantt, send wizard, recurrence) unchanged.

- Controller /my/clock/schedule: pulls published slots in next 60 days
- Portal template with next-shift hero card, summary stats, grouped list
- Bottom-nav xpath inherits target the nav bar specifically (not the
  Recent Activity 'View All' link, which also linked to /my/clock/timesheets)
- 4-tab nav fits via reduced padding and flex sizing

Module depends on stock 'planning' (Enterprise) + fusion_clock.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 22:16:02 -04:00

49 lines
2.3 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>
</odoo>