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:
@@ -17,7 +17,7 @@ def banner(txt):
|
||||
|
||||
def check(label, ok, detail=''):
|
||||
flag = 'PASS' if ok else 'FAIL'
|
||||
print(f" [{flag}] {label}{(' — ' + detail) if detail else ''}")
|
||||
print(f" [{flag}] {label}{(' - ' + detail) if detail else ''}")
|
||||
return ok
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def expect(label, ok, detail=''):
|
||||
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 1 — Quote configurator + PO → client_order_ref')
|
||||
banner('PHASE 1 - Quote configurator + PO → client_order_ref')
|
||||
# =====================================================================
|
||||
|
||||
# Fresh customer per run so we can verify automations on a clean slate.
|
||||
@@ -74,7 +74,7 @@ expect('client_order_ref carries PO', so.client_order_ref == po_number,
|
||||
f'got "{so.client_order_ref}"')
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 2 — SO confirm → MO + portal job + WOs')
|
||||
banner('PHASE 2 - SO confirm → MO + portal job + WOs')
|
||||
# =====================================================================
|
||||
|
||||
so.action_confirm()
|
||||
@@ -106,7 +106,7 @@ expect('work orders generated', len(mo.workorder_ids) > 0,
|
||||
f'{len(mo.workorder_ids)} WOs')
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 3 — Receiving with auto-prefilled qty')
|
||||
banner('PHASE 3 - Receiving with auto-prefilled qty')
|
||||
# =====================================================================
|
||||
|
||||
Receiving = env['fp.receiving']
|
||||
@@ -131,11 +131,11 @@ if recv.state == 'draft':
|
||||
print(f" [info] receiving confirm: {e}")
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 4 — Execute work orders + audit timing')
|
||||
banner('PHASE 4 - Execute work orders + audit timing')
|
||||
# =====================================================================
|
||||
|
||||
# Use the first operator we can find. Auto-promotion test only needs
|
||||
# one completion for verification — N is configurable per role.
|
||||
# one completion for verification - N is configurable per role.
|
||||
operator = env['hr.employee'].search([('active', '=', True)], limit=1)
|
||||
expect('operator available', bool(operator), operator.name or '')
|
||||
|
||||
@@ -175,7 +175,7 @@ except Exception as e:
|
||||
expect('MO state = done', mo.state == 'done', mo.state)
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 5 — Certificates (CoC issued + rich PDF, no thickness dup)')
|
||||
banner('PHASE 5 - Certificates (CoC issued + rich PDF, no thickness dup)')
|
||||
# =====================================================================
|
||||
|
||||
certs = env['fp.certificate'].search([('production_id', '=', mo.id)])
|
||||
@@ -200,7 +200,7 @@ if coc:
|
||||
coc.attachment_id.name)
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 6 — Delivery auto-prefilled + chain of custody')
|
||||
banner('PHASE 6 - Delivery auto-prefilled + chain of custody')
|
||||
# =====================================================================
|
||||
|
||||
dlv = env['fusion.plating.delivery'].search(
|
||||
@@ -235,7 +235,7 @@ expect('portal job state advanced to shipped/complete',
|
||||
job.state in ('shipped', 'complete'), job.state)
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 7 — Invoice creation + post + body has lines')
|
||||
banner('PHASE 7 - Invoice creation + post + body has lines')
|
||||
# =====================================================================
|
||||
|
||||
# Let Odoo's standard invoice flow handle it.
|
||||
@@ -277,7 +277,7 @@ if inv:
|
||||
job.state == 'complete', job.state)
|
||||
|
||||
# =====================================================================
|
||||
banner('PHASE 8 — Notification log + email attachments')
|
||||
banner('PHASE 8 - Notification log + email attachments')
|
||||
# =====================================================================
|
||||
|
||||
logs = env['fp.notification.log'].search(
|
||||
|
||||
Reference in New Issue
Block a user