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:
@@ -3,12 +3,12 @@
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
# Part of the Fusion Plating product family.
|
||||
#
|
||||
# Sub 3 — part-scoped Process Composer RPC.
|
||||
# Sub 3 - part-scoped Process Composer RPC.
|
||||
#
|
||||
# Endpoints:
|
||||
# POST /fp/part/composer/state — part info + current tree status
|
||||
# POST /fp/part/composer/templates — list shared-template recipes
|
||||
# POST /fp/part/composer/load_template — clone a shared template into a part
|
||||
# POST /fp/part/composer/state - part info + current tree status
|
||||
# POST /fp/part/composer/templates - list shared-template recipes
|
||||
# POST /fp/part/composer/load_template - clone a shared template into a part
|
||||
|
||||
import logging
|
||||
|
||||
@@ -74,16 +74,16 @@ def _clone_subtree(env, source, part, parent):
|
||||
Node = env['fusion.plating.process.node']
|
||||
|
||||
# Root clone gets a part-identifier suffix so the part form's
|
||||
# Default Process field reads like "General Processing — 1234567
|
||||
# Default Process field reads like "General Processing - 1234567
|
||||
# Rev 2" instead of a bare template name. Child nodes keep the
|
||||
# source names unchanged — the suffix would only clutter the tree.
|
||||
# source names unchanged - the suffix would only clutter the tree.
|
||||
if parent is False:
|
||||
suffix_bits = []
|
||||
if part.part_number:
|
||||
suffix_bits.append(part.part_number)
|
||||
if part.revision:
|
||||
# `revision` sometimes already carries a "Rev " prefix
|
||||
# (e.g. "Rev 2") — don't double up.
|
||||
# (e.g. "Rev 2") - don't double up.
|
||||
rev = (part.revision or '').strip()
|
||||
if rev and not rev.lower().startswith('rev'):
|
||||
rev = 'Rev %s' % rev
|
||||
@@ -91,7 +91,7 @@ def _clone_subtree(env, source, part, parent):
|
||||
suffix_bits.append(rev)
|
||||
node_name = source.name or ''
|
||||
if suffix_bits:
|
||||
node_name = '%s — %s' % (node_name, ' '.join(suffix_bits))
|
||||
node_name = '%s - %s' % (node_name, ' '.join(suffix_bits))
|
||||
else:
|
||||
node_name = source.name
|
||||
|
||||
@@ -107,7 +107,7 @@ def _clone_subtree(env, source, part, parent):
|
||||
'parent_id': parent.id if parent else False,
|
||||
}
|
||||
|
||||
# Copy additional fields defensively — skip anything missing on the
|
||||
# Copy additional fields defensively - skip anything missing on the
|
||||
# model (future-safe for field removals).
|
||||
for fname in _CLONABLE_FIELDS:
|
||||
if fname in source._fields:
|
||||
@@ -119,7 +119,7 @@ def _clone_subtree(env, source, part, parent):
|
||||
else:
|
||||
vals[fname] = value
|
||||
except Exception:
|
||||
# Field exists but read failed — ignore and move on.
|
||||
# Field exists but read failed - ignore and move on.
|
||||
pass
|
||||
|
||||
new_node = Node.create(vals)
|
||||
@@ -127,7 +127,7 @@ def _clone_subtree(env, source, part, parent):
|
||||
# Copy operator-input prompts (temperature reading, visual inspection,
|
||||
# etc.) onto the cloned node. Without this, "Load Template" copies the
|
||||
# step structure but loses every custom prompt the recipe author set up
|
||||
# — operators end up with empty data-capture screens. .copy() handles
|
||||
# - operators end up with empty data-capture screens. .copy() handles
|
||||
# every field on the input model (kind, target_min/max/unit,
|
||||
# compliance_tag, sequence, hint, …) and rebinds node_id via override.
|
||||
for src_input in source.input_ids:
|
||||
@@ -144,7 +144,7 @@ class FpPartComposerController(http.Controller):
|
||||
"""JSON-RPC endpoints for the part-scoped Process Composer."""
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Read — current part + tree status
|
||||
# Read - current part + tree status
|
||||
# ------------------------------------------------------------------
|
||||
@http.route('/fp/part/composer/state', type='jsonrpc', auth='user')
|
||||
def state(self, part_id):
|
||||
@@ -169,7 +169,7 @@ class FpPartComposerController(http.Controller):
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# List — shared-template recipes
|
||||
# List - shared-template recipes
|
||||
# ------------------------------------------------------------------
|
||||
@http.route('/fp/part/composer/templates', type='jsonrpc', auth='user')
|
||||
def templates(self):
|
||||
@@ -189,7 +189,7 @@ class FpPartComposerController(http.Controller):
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Write — create a new variant by cloning a template OR another variant
|
||||
# Write - create a new variant by cloning a template OR another variant
|
||||
# ------------------------------------------------------------------
|
||||
@http.route('/fp/part/composer/load_template', type='jsonrpc', auth='user')
|
||||
def load_template(self, part_id, template_id, variant_label=None,
|
||||
|
||||
Reference in New Issue
Block a user