Files
Odoo-Modules/fusion_plating/fusion_plating_nuclear/models/fp_nuclear_program.py
gsinghpal 8c76a16366 chore(plating): de-dash shipped code + intake-neutral customer emails
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>
2026-06-05 00:16:19 -04:00

101 lines
2.9 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 FpNuclearProgram(models.Model):
"""Nuclear Quality Program per facility.
A facility that supplies the nuclear industry typically runs a
documented quality program aligned to CSA N299 (Canada) and/or
NQA-1 (US), and is listed on one or more nuclear operators'
approved supplier lists. This record tracks the program manual
revision, the target N299 level, supplier certification status, and
the audit cadence (internal, customer, CNSC awareness).
A facility can have more than one nuclear program - e.g. a Level 3
program for OPG work and a separate NQA-1 program for a US utility.
"""
_name = 'fusion.plating.nuclear.program'
_description = 'Fusion Plating - Nuclear Quality Program'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'facility_id, name'
name = fields.Char(
string='Program',
required=True,
tracking=True,
)
facility_id = fields.Many2one(
'fusion.plating.facility',
string='Facility',
required=True,
tracking=True,
)
company_id = fields.Many2one(
'res.company',
related='facility_id.company_id',
store=True,
readonly=True,
)
n299_level_id = fields.Many2one(
'fusion.plating.n299.level',
string='CSA N299 Level',
tracking=True,
)
nqa1_applicable = fields.Boolean(
string='NQA-1 Applicable',
tracking=True,
help='Tick when this program covers work for US nuclear facilities '
'subject to ASME NQA-1.',
)
cnsc_licensed_supplier = fields.Boolean(
string='CNSC Licensed Supplier',
tracking=True,
help='Tick when the facility holds or is listed under a CNSC '
'licence or a CNSC licensee\'s approved supplier programme.',
)
program_manual_rev = fields.Char(
string='Program Manual Rev',
tracking=True,
)
last_audit_date = fields.Date(
string='Last Audit',
tracking=True,
)
next_audit_date = fields.Date(
string='Next Audit',
tracking=True,
)
state = fields.Selection(
[
('draft', 'Draft'),
('active', 'Active'),
('suspended', 'Suspended'),
('withdrawn', 'Withdrawn'),
],
string='Status',
default='draft',
required=True,
tracking=True,
)
notes = fields.Html(
string='Notes',
)
active = fields.Boolean(default=True)
def action_activate(self):
self.write({'state': 'active'})
def action_suspend(self):
self.write({'state': 'suspended'})
def action_withdraw(self):
self.write({'state': 'withdrawn'})
def action_reset_to_draft(self):
self.write({'state': 'draft'})