feat(shopfloor): force-lock cron for stale tablet sessions
Every 5 minutes, find active unlock events past 8-hour ceiling and mark them force-locked. SQL bypass of the model's read-only ACL is the only path that can update existing rows (no Python write() works because the model override blocks even sudo writes without the explicit fp_tablet_audit_admin_write context flag). Ceiling configurable via ir.config_parameter[fp.tablet.session_ceiling_hours]. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Placeholder for cron records added in Phase C task C4
|
||||
(force-lock stale tablet sessions). File registered in manifest
|
||||
to keep the data list stable across phase boundaries. -->
|
||||
<data noupdate="1">
|
||||
<record id="ir_cron_force_lock_stale_sessions" model="ir.cron">
|
||||
<field name="name">Tablet: Force-lock Stale PIN Sessions</field>
|
||||
<field name="model_id" ref="model_fp_tablet_session_event"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model._cron_force_lock_stale_sessions()</field>
|
||||
<field name="interval_number">5</field>
|
||||
<field name="interval_type">minutes</field>
|
||||
<field name="active" eval="True"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user