Initial commit
This commit is contained in:
19
fusion_clock/__init__.py
Normal file
19
fusion_clock/__init__.py
Normal 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()
|
||||
Reference in New Issue
Block a user