changes
This commit is contained in:
@@ -129,19 +129,34 @@ class FpProcessNode(models.Model):
|
||||
('fa-th', 'Grid / Racking'),
|
||||
('fa-fire', 'Fire / Bake'),
|
||||
('fa-bolt', 'Bolt / Electric'),
|
||||
('fa-flash', 'Flash / Discharge'),
|
||||
('fa-diamond', 'Diamond / Plating'),
|
||||
('fa-tint', 'Tint / Rinse'),
|
||||
('fa-shower', 'Shower / Clean'),
|
||||
('fa-bullseye', 'Target / Blast'),
|
||||
('fa-search', 'Search / Inspect'),
|
||||
('fa-check-circle', 'Check / Approve'),
|
||||
('fa-check-square-o', 'Checklist / QC'),
|
||||
('fa-clock-o', 'Clock / Wait'),
|
||||
('fa-pause-circle', 'Pause / Hold'),
|
||||
('fa-sun-o', 'Sun / Dry'),
|
||||
('fa-thermometer-half', 'Temp / Heat'),
|
||||
('fa-cloud', 'Cloud / Atmosphere'),
|
||||
('fa-eye', 'Eye / Visual'),
|
||||
('fa-eye-slash', 'Eye-Slash / Hidden'),
|
||||
('fa-hand-paper-o', 'Hand / Manual'),
|
||||
('fa-cube', 'Cube / Part'),
|
||||
('fa-shield', 'Shield / Protect'),
|
||||
('fa-inbox', 'Inbox / Receiving'),
|
||||
('fa-archive', 'Archive / Storage'),
|
||||
('fa-truck', 'Truck / Ship'),
|
||||
('fa-paper-plane', 'Paper-Plane / Send'),
|
||||
('fa-link', 'Link / Chain'),
|
||||
('fa-scissors', 'Scissors / Cut'),
|
||||
('fa-server', 'Server / Stack'),
|
||||
('fa-tachometer', 'Tachometer / Gauge'),
|
||||
('fa-file-text-o', 'Document / Form'),
|
||||
('fa-plus-circle', 'Plus / Add'),
|
||||
],
|
||||
string='Icon',
|
||||
default='fa-cog',
|
||||
@@ -151,6 +166,32 @@ class FpProcessNode(models.Model):
|
||||
default=0,
|
||||
)
|
||||
|
||||
# ---- Reference images / instruction screenshots -------------------------
|
||||
# Recipe authors attach photos and screenshots here so operators see
|
||||
# them on the shop floor when running the step. Anything from a
|
||||
# process diagram, masking-line photo, or annotated screenshot of the
|
||||
# WI document. Many2many — supports zero, one, or many images.
|
||||
instruction_attachment_ids = fields.Many2many(
|
||||
'ir.attachment',
|
||||
'fp_node_instruction_attachment_rel',
|
||||
'node_id', 'attachment_id',
|
||||
string='Instruction Images',
|
||||
domain=[('mimetype', 'ilike', 'image/')],
|
||||
help='Reference photos and screenshots that operators see at '
|
||||
'runtime. Anything visual that helps them execute the step '
|
||||
'correctly — fixture orientation, masking pattern, gauge '
|
||||
'reading. Supports multiple images per step.',
|
||||
)
|
||||
instruction_attachment_count = fields.Integer(
|
||||
string='Instruction Image Count',
|
||||
compute='_compute_instruction_attachment_count',
|
||||
)
|
||||
|
||||
@api.depends('instruction_attachment_ids')
|
||||
def _compute_instruction_attachment_count(self):
|
||||
for rec in self:
|
||||
rec.instruction_attachment_count = len(rec.instruction_attachment_ids)
|
||||
|
||||
# ---- Timing --------------------------------------------------------------
|
||||
|
||||
estimated_duration = fields.Float(
|
||||
@@ -722,11 +763,16 @@ class FpProcessNodeInput(models.Model):
|
||||
)
|
||||
target_min = fields.Float(
|
||||
string='Target Min',
|
||||
help='Lower bound of the acceptable range, expressed in Target Unit.',
|
||||
digits=(16, 6),
|
||||
help='Lower bound of the acceptable range, expressed in Target Unit. '
|
||||
'Stored to 6 decimal places to support plating thicknesses '
|
||||
'(e.g. 0.000050 in / 50 micro-inches).',
|
||||
)
|
||||
target_max = fields.Float(
|
||||
string='Target Max',
|
||||
help='Upper bound of the acceptable range, expressed in Target Unit.',
|
||||
digits=(16, 6),
|
||||
help='Upper bound of the acceptable range, expressed in Target Unit. '
|
||||
'Stored to 6 decimal places.',
|
||||
)
|
||||
target_unit = fields.Selection(
|
||||
FP_UOM_SELECTION,
|
||||
|
||||
Reference in New Issue
Block a user