folder rename
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
# -*- 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'})
|
||||
Reference in New Issue
Block a user