Standardise user-facing terminology across 5 modules (27 files):
- display_name compute: 'Work Order # 01368' -> 'WO # 01368'
- _description on 5 models: Plating Job{," Step"," Step Time Log"," Margin Report"," Recipe Node Override"} -> Work Order equivalents
- field labels (string=...) on 13 Many2one / One2many fields
across fp.batch, fp.thickness_reading, fp.quality.hold,
fp.job_consumption, fp.portal.job, fp.certificate, fp.delivery,
fp.quality.check, fp.racking.inspection, res.partner, sale.order
- XML view labels: action names, list/form/search strings,
portal template names, dashboard tile titles
What's deliberately preserved:
- DB model name 'fp.job' (technical identifier — used by
sale_order.x_fc_plating_job_ids and all comodel refs)
- Module name 'fusion_plating_jobs' (directory / import path)
- Settings -> Apps display label 'Fusion Plating Jobs' (module
identity for Odoo's app picker)
- 'Use Native Plating Jobs' migration toggle (internal mechanism
flag, not user-facing terminology)
Verified on entech: WH/JOB/01368 now displays as 'WO # 01368'
everywhere humans look (form header, breadcrumbs, M2O dropdowns,
error messages, smart-button titles).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
# -*- 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 api, fields, models
|
|
|
|
|
|
class ResPartner(models.Model):
|
|
_inherit = 'res.partner'
|
|
|
|
x_fc_portal_enabled = fields.Boolean(
|
|
string='Plating Portal Access',
|
|
default=False,
|
|
help='Allow this customer to see Plating quote requests and jobs '
|
|
'in their portal.',
|
|
)
|
|
x_fc_quote_request_ids = fields.One2many(
|
|
'fusion.plating.quote.request',
|
|
'partner_id',
|
|
string='Quote Requests',
|
|
)
|
|
x_fc_portal_job_ids = fields.One2many(
|
|
'fusion.plating.portal.job',
|
|
'partner_id',
|
|
string='Work Orders',
|
|
)
|
|
x_fc_quote_request_count = fields.Integer(
|
|
string='Quote Request Count',
|
|
compute='_compute_x_fc_quote_request_count',
|
|
)
|
|
x_fc_portal_job_count = fields.Integer(
|
|
string='Work Order Count',
|
|
compute='_compute_x_fc_portal_job_count',
|
|
)
|
|
|
|
@api.depends('x_fc_quote_request_ids')
|
|
def _compute_x_fc_quote_request_count(self):
|
|
for partner in self:
|
|
partner.x_fc_quote_request_count = len(partner.x_fc_quote_request_ids)
|
|
|
|
@api.depends('x_fc_portal_job_ids')
|
|
def _compute_x_fc_portal_job_count(self):
|
|
for partner in self:
|
|
partner.x_fc_portal_job_count = len(partner.x_fc_portal_job_ids)
|