chore(plating): de-dash shipped code + intake-neutral customer emails
Replace em-dashes and en-dashes with hyphens across 789 shipped source files (py/xml/js/scss) so the delivered module reads as human-written; em-dashes had become a recognizable AI-generated tell. Internal .md dev notes are excluded. The WO-sticker mojibake strippers keep their dash search targets (now written — / –). No logic changes: comments and display strings only; validated with py_compile + lxml parse. Rewrite the 7 customer notification emails to be intake-neutral (ship-in / drop-off / pickup) and repair-aware, and fix the Shipped email documents line (packing slip vs bill of lading; certificate only when issued). Subjects use a hyphen separator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ class FpCapa(models.Model):
|
||||
string='Quality Documents',
|
||||
compute='_compute_x_fc_document_ids',
|
||||
store=False,
|
||||
help='Documents in the Plating — Quality workspace mirrored from '
|
||||
help='Documents in the Plating - Quality workspace mirrored from '
|
||||
'attachments on this CAPA.',
|
||||
)
|
||||
x_fc_document_count = fields.Integer(
|
||||
|
||||
@@ -26,7 +26,7 @@ class FpDocControl(models.Model):
|
||||
string='Quality Documents',
|
||||
compute='_compute_x_fc_document_ids',
|
||||
store=False,
|
||||
help='Documents in the Plating — Quality workspace mirrored from '
|
||||
help='Documents in the Plating - Quality workspace mirrored from '
|
||||
'attachments on this controlled document record.',
|
||||
)
|
||||
x_fc_document_count = fields.Integer(
|
||||
|
||||
@@ -20,7 +20,7 @@ class FpFair(models.Model):
|
||||
string='Quality Documents',
|
||||
compute='_compute_x_fc_document_ids',
|
||||
store=False,
|
||||
help='Documents in the Plating — Quality workspace mirrored from '
|
||||
help='Documents in the Plating - Quality workspace mirrored from '
|
||||
'attachments on this FAIR.',
|
||||
)
|
||||
x_fc_document_count = fields.Integer(
|
||||
|
||||
@@ -26,7 +26,7 @@ class FpNcr(models.Model):
|
||||
string='Quality Documents',
|
||||
compute='_compute_x_fc_document_ids',
|
||||
store=False,
|
||||
help='Documents in the Plating — Quality workspace mirrored from '
|
||||
help='Documents in the Plating - Quality workspace mirrored from '
|
||||
'attachments on this NCR.',
|
||||
)
|
||||
x_fc_document_count = fields.Integer(
|
||||
|
||||
@@ -27,17 +27,17 @@ class IrAttachment(models.Model):
|
||||
|
||||
Whenever an attachment is created on one of the Fusion Plating QMS
|
||||
record types (NCR, CAPA, FAIR, Doc Control) we silently mirror it as
|
||||
a `documents.document` record inside the "Plating — Quality"
|
||||
a `documents.document` record inside the "Plating - Quality"
|
||||
workspace, tagged with the corresponding record type. The original
|
||||
`ir.attachment` record is untouched and continues to live on the
|
||||
quality record as before — the bridge is purely additive.
|
||||
quality record as before - the bridge is purely additive.
|
||||
|
||||
Design notes
|
||||
------------
|
||||
* We resolve the folder and tag XML ids via ``env.ref`` with
|
||||
``raise_if_not_found=False`` so that a partial install, a missing
|
||||
demo record, or a future schema change can never break attachment
|
||||
creation on a quality record — the worst case is that the
|
||||
creation on a quality record - the worst case is that the
|
||||
`documents.document` mirror record isn't created and a line goes
|
||||
to the log.
|
||||
* The write is wrapped in a broad try/except for the same reason:
|
||||
@@ -45,7 +45,7 @@ class IrAttachment(models.Model):
|
||||
failure.
|
||||
* We use ``sudo()`` on the `documents.document` create because the
|
||||
user uploading the attachment may not have write access to the
|
||||
Documents app — the bridge is a system-level convenience.
|
||||
Documents app - the bridge is a system-level convenience.
|
||||
"""
|
||||
_inherit = 'ir.attachment'
|
||||
|
||||
@@ -90,7 +90,7 @@ class IrAttachment(models.Model):
|
||||
for att in attachments:
|
||||
if att.res_model not in _QUALITY_MODELS_TO_TAG:
|
||||
continue
|
||||
# Skip attachments linked to a specific field (e.g. image_1920) —
|
||||
# Skip attachments linked to a specific field (e.g. image_1920) -
|
||||
# those are UI artefacts, not user-uploaded docs.
|
||||
if att.res_field:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user