feat(fusion_clock): settings UI for generation horizon + self-unassign; open-shift in backend views [C1]
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -245,6 +245,19 @@ class ResConfigSettings(models.TransientModel):
|
||||
help="Which clock location is bound to the NFC kiosk for this company. "
|
||||
"Required when the kiosk is enabled.",
|
||||
)
|
||||
fclk_planning_generation_months = fields.Integer(
|
||||
related='company_id.fclk_planning_generation_months',
|
||||
readonly=False,
|
||||
string='Schedule Generation Horizon (months)',
|
||||
help="How many months ahead recurring shifts are pre-generated.",
|
||||
)
|
||||
fclk_self_unassign_days_before = fields.Integer(
|
||||
related='company_id.fclk_self_unassign_days_before',
|
||||
readonly=False,
|
||||
string='Self-Unassign Cutoff (days before shift)',
|
||||
help="Employees may release an open shift they claimed up to this many "
|
||||
"days before it starts.",
|
||||
)
|
||||
fclk_photo_retention_days = fields.Integer(
|
||||
string='Auto-Wipe Photos After (days)',
|
||||
config_parameter='fusion_clock.photo_retention_days',
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="is_off"/>
|
||||
<field name="is_open" optional="hide"/>
|
||||
<field name="shift_id"/>
|
||||
<field name="role_id" optional="show"/>
|
||||
<field name="start_time" widget="float_time"/>
|
||||
@@ -36,12 +37,14 @@
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="employee_id"/>
|
||||
<field name="employee_id" required="not is_open"/>
|
||||
<field name="is_open"/>
|
||||
<field name="schedule_date"/>
|
||||
<field name="is_off"/>
|
||||
<field name="shift_id"/>
|
||||
<field name="role_id" options="{'no_quick_create': True}"/>
|
||||
<field name="recurrence_id" readonly="1"/>
|
||||
<field name="crosses_midnight" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="start_time" widget="float_time"/>
|
||||
@@ -72,6 +75,7 @@
|
||||
<field name="schedule_date"/>
|
||||
<filter name="off" string="OFF" domain="[('is_off', '=', True)]"/>
|
||||
<filter name="working" string="Working" domain="[('is_off', '=', False)]"/>
|
||||
<filter name="open" string="Open Shifts" domain="[('is_open', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter name="posted" string="Posted" domain="[('state', '=', 'posted')]"/>
|
||||
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]"/>
|
||||
|
||||
@@ -41,6 +41,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
<setting id="fclk_recurring_open_shifts" string="Recurring & Open Shifts"
|
||||
help="Controls how far ahead recurring shifts generate and when employees may release shifts they claimed.">
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label for="fclk_planning_generation_months" string="Generate ahead (months)" class="col-lg-7 o_light_label"/>
|
||||
<field name="fclk_planning_generation_months"/>
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<label for="fclk_self_unassign_days_before" string="Self-unassign cutoff (days)" class="col-lg-7 o_light_label"/>
|
||||
<field name="fclk_self_unassign_days_before"/>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
Reference in New Issue
Block a user