# -*- 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()