From 7a0e74c456198af7e309e20e58c67dc5b6dc5f12 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Mon, 27 Apr 2026 20:31:45 -0400 Subject: [PATCH] feat(sub12a): add fp.step.template.transition.input Transition-time prompts (fired when leaving a step). Authored now, runtime-consumed in Sub 12b's Move Parts dialog. Carries a compliance_tag selection (none/as9100/nadcap/cgp/nuclear) so audit reports can filter by regulation regime. input_type covers Steelhead's transition prompts: text, number, boolean, selection, date, signature, photo, location_picker, customer_wo. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../fp_step_template_transition_input.py | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 fusion_plating/fusion_plating/models/fp_step_template_transition_input.py diff --git a/fusion_plating/fusion_plating/models/fp_step_template_transition_input.py b/fusion_plating/fusion_plating/models/fp_step_template_transition_input.py new file mode 100644 index 00000000..47d9aa09 --- /dev/null +++ b/fusion_plating/fusion_plating/models/fp_step_template_transition_input.py @@ -0,0 +1,50 @@ +# -*- 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 FpStepTemplateTransitionInput(models.Model): + """Transition-time compliance field definition. + + Fires when leaving a step (e.g. "Customer WO #", "Photo Evidence", + "Scrap Reason"). Authored on `fp.step.template`, snapshot-copied + onto `fusion.plating.process.node` when the library step is dragged + into a recipe. Sub 12b uses these to render the Move Parts dialog. + """ + _name = 'fp.step.template.transition.input' + _description = 'Fusion Plating — Step Template Transition 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'), + ('photo', 'Photo'), + ('location_picker', 'Location Picker'), + ('customer_wo', 'Customer WO #'), + ], string='Input Type', required=True, default='text') + required = fields.Boolean(string='Required', default=False, + help='If True, the move 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) + compliance_tag = fields.Selection([ + ('none', 'None'), + ('as9100', 'AS9100'), + ('nadcap', 'Nadcap'), + ('cgp', 'Controlled Goods'), + ('nuclear', 'Nuclear'), + ], string='Compliance Tag', default='none', + help='Drives audit-report inclusion / filtering.')