Split 49 modules/suites into independent git repos; untrack from monorepo
Each top-level module/suite folder is now its own private repo on GitHub (gsinghpal/<name>) and gitea (admin/<name>), with a fresh single initial commit. The monorepo no longer tracks them (added to .gitignore + git rm --cached); working-tree files are retained on disk and managed in their own repos. The monorepo keeps shared root files (CLAUDE.md, docs/, scripts/, tools/, AGENTS.md, WIP/obsolete dirs) and full history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,74 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2026 Nexa Systems Inc.
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
# Part of the Fusion Plating product family.
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class HrEmployee(models.Model):
|
||||
"""Extend hr.employee with CGP-specific fields.
|
||||
|
||||
Uses the ``x_fc_`` prefix on every new field, per Fusion Central
|
||||
convention for extensions to base Odoo models.
|
||||
"""
|
||||
_inherit = 'hr.employee'
|
||||
|
||||
x_fc_cgp_psa_id = fields.Many2one(
|
||||
'fusion.plating.cgp.psa',
|
||||
string='Current PSA',
|
||||
help='The current Personnel Security Assessment on file for '
|
||||
'this employee.',
|
||||
)
|
||||
x_fc_cgp_psa_status = fields.Selection(
|
||||
[
|
||||
('not_assessed', 'Not Assessed'),
|
||||
('current', 'Current'),
|
||||
('expiring', 'Expiring'),
|
||||
('expired', 'Expired'),
|
||||
],
|
||||
string='PSA Status',
|
||||
compute='_compute_x_fc_cgp_psa_status',
|
||||
store=False,
|
||||
)
|
||||
x_fc_cgp_ai = fields.Boolean(
|
||||
string='Authorized Individual',
|
||||
help='This employee is an Authorized Individual under the '
|
||||
'Controlled Goods Program.',
|
||||
)
|
||||
x_fc_cgp_access_level = fields.Selection(
|
||||
[
|
||||
('none', 'No Access'),
|
||||
('general', 'General Access'),
|
||||
('controlled_area', 'Controlled Area'),
|
||||
('designated_official', 'Designated Official'),
|
||||
],
|
||||
string='CGP Access Level',
|
||||
default='none',
|
||||
help='Level of physical access this employee has to CGP areas.',
|
||||
)
|
||||
|
||||
@api.depends(
|
||||
'x_fc_cgp_psa_id',
|
||||
'x_fc_cgp_psa_id.state',
|
||||
'x_fc_cgp_psa_id.expiry_date',
|
||||
)
|
||||
def _compute_x_fc_cgp_psa_status(self):
|
||||
today = fields.Date.context_today(self)
|
||||
warn_cutoff = today + relativedelta(months=3)
|
||||
for rec in self:
|
||||
psa = rec.x_fc_cgp_psa_id
|
||||
if not psa or psa.state != 'completed':
|
||||
rec.x_fc_cgp_psa_status = 'not_assessed'
|
||||
continue
|
||||
expiry = psa.expiry_date
|
||||
if not expiry:
|
||||
rec.x_fc_cgp_psa_status = 'current'
|
||||
elif expiry < today:
|
||||
rec.x_fc_cgp_psa_status = 'expired'
|
||||
elif expiry <= warn_cutoff:
|
||||
rec.x_fc_cgp_psa_status = 'expiring'
|
||||
else:
|
||||
rec.x_fc_cgp_psa_status = 'current'
|
||||
Reference in New Issue
Block a user