Reuse the existing Pay Period setting (Frequency + Anchor) as the single source of truth via a shared pure helper (models/pay_period.py); fusion.clock.report delegates to it. Add Current/Previous/Next Pay Period filters to the attendance search view (search-method computed booleans on hr.attendance), a Bi-Weekly Period picker wizard (pick start -> auto +2 weeks, editable; Apply opens the filtered list) reachable from an Attendance menu item and a dashboard tile. Window follows the configured frequency; TZ-correct via local-day boundaries. Bump 3.14.4 -> 3.15.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
1.5 KiB
XML
37 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="view_fusion_clock_period_picker_form" model="ir.ui.view">
|
|
<field name="name">fusion.clock.period.picker.form</field>
|
|
<field name="model">fusion.clock.period.picker</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Bi-Weekly Period">
|
|
<sheet>
|
|
<div class="alert alert-info" role="alert">
|
|
Pick the period start — the end auto-fills to one pay period later
|
|
(two weeks by default). Adjust either date, then click
|
|
<b>View Attendances</b>.
|
|
</div>
|
|
<group>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
</group>
|
|
</sheet>
|
|
<footer>
|
|
<button name="action_apply" string="View Attendances" type="object" class="btn-primary"/>
|
|
<button special="cancel" string="Cancel" class="btn-secondary"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_fusion_clock_period_picker" model="ir.actions.act_window">
|
|
<field name="name">Bi-Weekly Period</field>
|
|
<field name="res_model">fusion.clock.period.picker</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="view_id" ref="view_fusion_clock_period_picker_form"/>
|
|
<field name="target">new</field>
|
|
</record>
|
|
|
|
</odoo>
|