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>
26 lines
933 B
Python
26 lines
933 B
Python
env = env # noqa
|
|
import re
|
|
rep = env.ref('fusion_plating_reports.action_report_fp_bol_portrait')
|
|
dlv = env['fusion.plating.delivery'].search([], order='id desc', limit=1)
|
|
html, _ = rep.with_context(force_report_rendering=True
|
|
)._render_qweb_html(rep.report_name, [dlv.id])
|
|
out = html.decode() if isinstance(html, bytes) else str(html)
|
|
|
|
# Pull the sig-table block + a bit before
|
|
m = re.search(r'(<div class="fp-keep-together".*?</div>)\s*</div>\s*</div>\s*</t>',
|
|
out, re.S)
|
|
if m:
|
|
print('=== fp-keep-together block ===')
|
|
print(m.group(1)[:3000])
|
|
else:
|
|
# Fallback - just find the sig-table
|
|
m2 = re.search(r'(<table class="sig-table".*?</table>)', out, re.S)
|
|
if m2:
|
|
print('=== sig-table block ===')
|
|
print(m2.group(1))
|
|
|
|
# Also dump the relevant CSS rules
|
|
print('\n=== relevant css ===')
|
|
for rule in re.findall(r'\.fp-report\s+\.(?:sig-|fp-keep)[^{]*\{[^}]*\}', out):
|
|
print(rule)
|