feat(sub12b): fp.rack.tag — rack-label registry + 4 starter tags

M2M tag registry: Rush / Hold for QC / Damaged / Customer Sample.
Each rack can carry many tags; tags surface as coloured chips on the
plant-overview rack rows + Move Rack dialog (Task 13).

Plating → Configuration → Rack Tags menu (sequence 48).
post_init_hook seeds 4 starters — idempotent (no-op if any exist).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-27 21:01:49 -04:00
parent d78ef4228e
commit 86c0e230a1
5 changed files with 93 additions and 0 deletions

View File

@@ -37,3 +37,6 @@ from . import fp_process_node_inherit
from . import fp_step_template
from . import fp_step_template_input
from . import fp_step_template_transition_input
# Sub 12b — Rack-aware moves + persistent labor reconciliation
from . import fp_rack_tag

View File

@@ -0,0 +1,33 @@
# -*- 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 FpRackTag(models.Model):
"""Operator-visible labels applied to physical racks.
"Rush" / "Hold for QC" / "Customer-Amphenol" / "Damaged" — the
coloured tag chips that appear in the Move Rack dialog and on the
plant-overview rack rows. M2M; one rack can carry many tags.
"""
_name = 'fp.rack.tag'
_description = 'Fusion Plating — Rack Tag'
_order = 'sequence, name'
name = fields.Char(string='Tag', required=True, translate=True)
color = fields.Integer(string='Color')
sequence = fields.Integer(string='Sequence', default=10)
active = fields.Boolean(string='Active', default=True)
company_id = fields.Many2one(
'res.company', string='Company',
default=lambda self: self.env.company,
)
_sql_constraints = [
('fp_rack_tag_name_company_uniq',
'unique(name, company_id)',
'Rack tag name must be unique within a company.'),
]