Replace em-dashes and en-dashes with hyphens across 789 shipped source files (py/xml/js/scss) so the delivered module reads as human-written; em-dashes had become a recognizable AI-generated tell. Internal .md dev notes are excluded. The WO-sticker mojibake strippers keep their dash search targets (now written — / –). No logic changes: comments and display strings only; validated with py_compile + lxml parse. Rewrite the 7 customer notification emails to be intake-neutral (ship-in / drop-off / pickup) and repair-aware, and fix the Shipped email documents line (packing slip vs bill of lading; certificate only when issued). Subjects use a hyphen separator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
100 lines
2.8 KiB
Python
100 lines
2.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
# Part of the Fusion Plating product family.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class FpCnscLicence(models.Model):
|
|
"""CNSC Licence record.
|
|
|
|
The Canadian Nuclear Safety Commission (CNSC) regulates all nuclear
|
|
activities in Canada. A plating / finishing supplier that works on
|
|
nuclear items may hold - or be listed under - one or more CNSC
|
|
licences:
|
|
|
|
* Class II nuclear facility licence (on-site sources,
|
|
irradiators, handling of nuclear substances)
|
|
* Transport licence for nuclear substances
|
|
* Export licence for controlled nuclear items
|
|
|
|
This record tracks the licence number, issue and expiry dates, and
|
|
any key conditions so the facility can manage renewals and
|
|
compliance awareness.
|
|
"""
|
|
_name = 'fusion.plating.cnsc.licence'
|
|
_description = 'Fusion Plating - CNSC Licence'
|
|
_inherit = ['mail.thread', 'mail.activity.mixin']
|
|
_order = 'expiry_date, name'
|
|
|
|
name = fields.Char(
|
|
string='Title',
|
|
required=True,
|
|
tracking=True,
|
|
)
|
|
licence_number = fields.Char(
|
|
string='Licence Number',
|
|
required=True,
|
|
tracking=True,
|
|
)
|
|
facility_id = fields.Many2one(
|
|
'fusion.plating.facility',
|
|
string='Facility',
|
|
tracking=True,
|
|
)
|
|
company_id = fields.Many2one(
|
|
'res.company',
|
|
related='facility_id.company_id',
|
|
store=True,
|
|
readonly=True,
|
|
)
|
|
licence_type = fields.Selection(
|
|
[
|
|
('class_ii_nuclear_facility', 'Class II Nuclear Facility'),
|
|
('transport', 'Transport of Nuclear Substances'),
|
|
('export', 'Export of Controlled Nuclear Items'),
|
|
('other', 'Other'),
|
|
],
|
|
string='Licence Type',
|
|
default='class_ii_nuclear_facility',
|
|
required=True,
|
|
tracking=True,
|
|
)
|
|
issue_date = fields.Date(
|
|
string='Issue Date',
|
|
tracking=True,
|
|
)
|
|
expiry_date = fields.Date(
|
|
string='Expiry Date',
|
|
tracking=True,
|
|
)
|
|
conditions = fields.Html(
|
|
string='Licence Conditions',
|
|
)
|
|
state = fields.Selection(
|
|
[
|
|
('active', 'Active'),
|
|
('expiring', 'Expiring Soon'),
|
|
('expired', 'Expired'),
|
|
('revoked', 'Revoked'),
|
|
],
|
|
string='Status',
|
|
default='active',
|
|
required=True,
|
|
tracking=True,
|
|
)
|
|
attachment_id = fields.Many2one(
|
|
'ir.attachment',
|
|
string='Licence Document',
|
|
)
|
|
active = fields.Boolean(default=True)
|
|
|
|
_sql_constraints = [
|
|
(
|
|
'fp_cnsc_licence_number_uniq',
|
|
'unique(licence_number, company_id)',
|
|
'CNSC licence number must be unique per company.',
|
|
),
|
|
]
|