62 lines
2.1 KiB
Python
62 lines
2.1 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 FpThicknessReading(models.Model):
|
|
"""Fischerscope thickness measurement data.
|
|
|
|
Captures individual XRF readings from equipment like the
|
|
Fischerscope XDAL 600. Linked to certificates and/or MOs.
|
|
Data is manually entered for now; future: CSV import from equipment.
|
|
"""
|
|
_name = 'fp.thickness.reading'
|
|
_description = 'Fusion Plating — Thickness Reading'
|
|
_order = 'reading_number'
|
|
|
|
certificate_id = fields.Many2one(
|
|
'fp.certificate', string='Certificate', ondelete='cascade',
|
|
)
|
|
production_id = fields.Many2one(
|
|
'mrp.production', string='Manufacturing Order',
|
|
)
|
|
reading_number = fields.Integer(
|
|
string='Reading #', default=1, help='Sequence number (n=1, n=2, n=3).',
|
|
)
|
|
nip_mils = fields.Float(
|
|
string='NiP (mils)', digits=(10, 4), help='NiP thickness in mils.',
|
|
)
|
|
ni_percent = fields.Float(
|
|
string='Ni %', digits=(6, 3), help='Nickel content percentage.',
|
|
)
|
|
p_percent = fields.Float(
|
|
string='P %', digits=(6, 4), help='Phosphorus content percentage.',
|
|
)
|
|
position_label = fields.Char(
|
|
string='Position', help='Where on the part this reading was taken.',
|
|
)
|
|
equipment_model = fields.Char(
|
|
string='Equipment', default='Fischerscope XDAL 600',
|
|
)
|
|
product_ref = fields.Char(
|
|
string='Product Ref', help='e.g. "2805031 / NiP/Al-alloys 2805030"',
|
|
)
|
|
calibration_std_ref = fields.Char(
|
|
string='Calibration Std', help='e.g. "NiP/Al STD SET SN 100174568"',
|
|
)
|
|
microscope_image_id = fields.Many2one(
|
|
'ir.attachment', string='Microscope Image',
|
|
)
|
|
operator_id = fields.Many2one(
|
|
'res.users', string='Operator', default=lambda self: self.env.user,
|
|
)
|
|
reading_datetime = fields.Datetime(
|
|
string='Reading Date/Time', default=fields.Datetime.now,
|
|
)
|
|
measuring_time_seconds = fields.Integer(
|
|
string='Measuring Time (sec)', default=120,
|
|
)
|