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:
@@ -12,7 +12,7 @@ from odoo import fields # noqa
|
||||
|
||||
def step(num, who, action):
|
||||
bar = '═' * 70
|
||||
print(f'\n{bar}\n STEP {num} — {who}\n → {action}\n{bar}')
|
||||
print(f'\n{bar}\n STEP {num} - {who}\n → {action}\n{bar}')
|
||||
|
||||
|
||||
def show(label, value):
|
||||
@@ -24,7 +24,7 @@ def hr():
|
||||
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────
|
||||
# Setup: pick a generic existing customer? No — fresh customer so we
|
||||
# Setup: pick a generic existing customer? No - fresh customer so we
|
||||
# can prove the full chain of automations on a clean slate.
|
||||
# ─────────────────────────────────────────────────────────────────────
|
||||
stamp = datetime.now().strftime('%y%m%d-%H%M%S')
|
||||
@@ -83,7 +83,7 @@ show('estimator override', f'${quote.estimator_override_price:,.2f}')
|
||||
show('calculated price', f'${quote.calculated_price:,.2f} ({quote.currency_id.name})')
|
||||
show('PO# entered', po_number)
|
||||
|
||||
# Sales clicks "Create Quotation" — this is the SO.
|
||||
# Sales clicks "Create Quotation" - this is the SO.
|
||||
result = quote.action_create_quotation()
|
||||
so = env['sale.order'].browse(result.get('res_id'))
|
||||
show('SO drafted', f'{so.name} (state={so.state})')
|
||||
@@ -122,7 +122,7 @@ show('portal job auto-created',
|
||||
|
||||
# =====================================================================
|
||||
step(4, 'RECEIVING (warehouse)',
|
||||
'Customer parts arrive — count + log + auto-prefill')
|
||||
'Customer parts arrive - count + log + auto-prefill')
|
||||
# =====================================================================
|
||||
|
||||
recv = env['fp.receiving'].create({
|
||||
@@ -199,7 +199,7 @@ step(7, 'MANAGER',
|
||||
try:
|
||||
mo.button_mark_done()
|
||||
except Exception as e:
|
||||
print(f' [info] mark_done: {e} — falling back to _action_done')
|
||||
print(f' [info] mark_done: {e} - falling back to _action_done')
|
||||
try:
|
||||
mo.qty_producing = mo.product_qty
|
||||
mo._action_done()
|
||||
@@ -213,7 +213,7 @@ certs = env['fp.certificate'].search([('production_id', '=', mo.id)])
|
||||
coc = certs.filtered(lambda c: c.certificate_type == 'coc')[:1]
|
||||
thickness = certs.filtered(lambda c: c.certificate_type == 'thickness_report')
|
||||
show('CoC cert', f'{coc.name} (state={coc.state})' if coc else '(MISSING)')
|
||||
show('thickness cert', f'count={len(thickness)} (expected 0 — CoC includes it)')
|
||||
show('thickness cert', f'count={len(thickness)} (expected 0 - CoC includes it)')
|
||||
if coc and coc.attachment_id:
|
||||
kb = len(base64.b64decode(coc.attachment_id.datas)) / 1024
|
||||
show('CoC PDF', f'{coc.attachment_id.name} → {kb:.1f} KB')
|
||||
@@ -253,7 +253,7 @@ show('portal job state', job.state)
|
||||
|
||||
# =====================================================================
|
||||
step(9, 'ACCOUNTING',
|
||||
'Creates + posts invoice (does NOT register payment — '
|
||||
'Creates + posts invoice (does NOT register payment - '
|
||||
'real customer pays through bank/Stripe)')
|
||||
# =====================================================================
|
||||
|
||||
@@ -276,7 +276,7 @@ if inv:
|
||||
show('invoice posted', f'state={inv.state}, payment_state={inv.payment_state}')
|
||||
show('total', f'${inv.amount_total:,.2f}')
|
||||
show('payment_state explanation',
|
||||
'"not_paid" is correct — accountant has not yet registered any payment')
|
||||
'"not_paid" is correct - accountant has not yet registered any payment')
|
||||
|
||||
inv_report = env.ref(
|
||||
'fusion_plating_reports.action_report_fp_invoice_portrait',
|
||||
|
||||
Reference in New Issue
Block a user