diff --git a/fusion_plating/fusion_plating/models/fp_step_template_input.py b/fusion_plating/fusion_plating/models/fp_step_template_input.py new file mode 100644 index 00000000..0df02ed8 --- /dev/null +++ b/fusion_plating/fusion_plating/models/fp_step_template_input.py @@ -0,0 +1,47 @@ +# -*- 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 FpStepTemplateInput(models.Model): + """Operation measurement definition on a step library template. + + Recorded *during* a step (e.g. "Actual Time", "Plating Thickness"). + Distinct from transition_input_ids which fire when leaving the + step. + """ + _name = 'fp.step.template.input' + _description = 'Fusion Plating — Step Template Input' + _order = 'sequence, name' + + name = fields.Char(string='Name', required=True, translate=True) + template_id = fields.Many2one( + 'fp.step.template', string='Template', + required=True, ondelete='cascade', index=True, + ) + input_type = fields.Selection([ + ('text', 'Text'), + ('number', 'Number'), + ('boolean', 'Yes/No'), + ('selection', 'Selection'), + ('date', 'Date / Time'), + ('signature', 'Signature'), + ('time_hms', 'Time (HH:MM:SS)'), + ('time_seconds', 'Time (seconds)'), + ('temperature', 'Temperature'), + ('thickness', 'Thickness'), + ('pass_fail', 'Pass / Fail'), + ], string='Input Type', required=True, default='text') + target_min = fields.Float(string='Target Min') + target_max = fields.Float(string='Target Max') + target_unit = fields.Char(string='Target Unit', + help='Display unit, e.g. "min", "°F", "A", "FT2", "in".') + required = fields.Boolean(string='Required', default=False, + help='If True, sign-off is hard-blocked while this input is blank.') + hint = fields.Char(string='Hint') + selection_options = fields.Text(string='Selection Options', + help='Comma-separated when input_type is "selection".') + sequence = fields.Integer(string='Sequence', default=10)