feat(fusion_clock): add NFC Clock Kiosk settings block
Extends res.config.settings with 5 NFC kiosk fields (enable toggle, photo required, enroll password, debug mode, kiosk location via related company field) and adds the corresponding settings view block with conditional sub-fields hidden until the kiosk is enabled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -232,6 +232,41 @@ class ResConfigSettings(models.TransientModel):
|
||||
help="Custom column names for CSV export (JSON format). Leave blank for defaults.",
|
||||
)
|
||||
|
||||
# ── NFC Clock Kiosk ────────────────────────────────────────────────
|
||||
fclk_enable_nfc_kiosk = fields.Boolean(
|
||||
string='Enable NFC Clock Kiosk',
|
||||
config_parameter='fusion_clock.enable_nfc_kiosk',
|
||||
default=False,
|
||||
help="Enable the tap-to-clock NFC kiosk page at /fusion_clock/kiosk/nfc.",
|
||||
)
|
||||
fclk_nfc_photo_required = fields.Boolean(
|
||||
string='Require Photo on Tap',
|
||||
config_parameter='fusion_clock.nfc_photo_required',
|
||||
default=True,
|
||||
help="If enabled, the kiosk rejects taps when the front camera is unavailable. "
|
||||
"Recommended for buddy-punch deterrence.",
|
||||
)
|
||||
fclk_nfc_enroll_password = fields.Char(
|
||||
string='Enroll Mode Password',
|
||||
config_parameter='fusion_clock.nfc_enroll_password',
|
||||
help="Short password the manager types on the kiosk to enter Enroll Mode. "
|
||||
"Leave empty to fall back to manager-group membership only.",
|
||||
)
|
||||
fclk_nfc_kiosk_debug = fields.Boolean(
|
||||
string='Enable Mock-Tap Debug',
|
||||
config_parameter='fusion_clock.nfc_kiosk_debug',
|
||||
default=False,
|
||||
help="Enables a Ctrl+Shift+T keyboard shortcut on the kiosk page for "
|
||||
"simulating a tap with a configurable UID. Off in production.",
|
||||
)
|
||||
fclk_nfc_kiosk_location_id = fields.Many2one(
|
||||
related='company_id.x_fclk_nfc_kiosk_location_id',
|
||||
readonly=False,
|
||||
string='NFC Kiosk Location',
|
||||
help="Which clock location is bound to the NFC kiosk for this company. "
|
||||
"Required when the kiosk is enabled.",
|
||||
)
|
||||
|
||||
def set_values(self):
|
||||
super().set_values()
|
||||
ICP = self.env['ir.config_parameter'].sudo()
|
||||
|
||||
Reference in New Issue
Block a user