- Adds 'job_confirmed' and 'job_complete' trigger events to fp.notification.template (legacy 'mo_confirmed' / 'mo_complete' stay for bridge_mrp). - fp.job.action_confirm and button_mark_done now fire those notifications best-effort via fp.notification.template._dispatch (silent skip if templates absent or notifications module missing). - Adds x_fc_source ['mrp', 'jobs'] tag to fusion.plating.kpi.value so Phase 9 dashboards can filter or display both sources. - Verified aerospace/nuclear/cgp/safety modules don't directly reference mrp.production or mrp.workorder. Configurator integration was already covered by Task 2.5's SO confirm hook (reads x_fc_part_catalog_id and x_fc_coating_config_id from sale.order.line). Manifest 19.0.1.6.0 -> 19.0.1.7.0. Part of: native job model migration (spec 2026-04-25) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
806 B
Python
28 lines
806 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
#
|
|
# Adds 'job_confirmed' and 'job_complete' trigger events to the
|
|
# fp.notification.template selection. Fired from fp.job lifecycle
|
|
# hooks (action_confirm, button_mark_done).
|
|
#
|
|
# bridge_mrp's existing 'mo_confirmed' / 'mo_complete' triggers
|
|
# stay alive for the legacy MO flow.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class FpNotificationTemplate(models.Model):
|
|
_inherit = 'fp.notification.template'
|
|
|
|
trigger_event = fields.Selection(
|
|
selection_add=[
|
|
('job_confirmed', 'Plating Job Confirmed'),
|
|
('job_complete', 'Plating Job Complete'),
|
|
],
|
|
ondelete={
|
|
'job_confirmed': 'cascade',
|
|
'job_complete': 'cascade',
|
|
},
|
|
)
|