Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 deletions

19
fusion_clock/__init__.py Normal file
View File

@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
from . import models
from . import controllers
def _post_init_backfill_reports(env):
"""Backfill reports for historical pay periods on first install."""
existing = env['fusion.clock.report'].search_count([])
if existing:
return
has_data = env['hr.attendance'].search_count([
('check_out', '!=', False),
('x_fclk_pay_period_start', '!=', False),
], limit=1)
if has_data:
env['fusion.clock.report']._backfill_historical_reports()