Files
Odoo-Modules/fusion_plating/scripts/fp_print_order.py
gsinghpal 8c76a16366 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>
2026-06-05 00:16:19 -04:00

25 lines
1.1 KiB
Python

env = env # noqa
# Use the SAME path the web client uses (the cog menu) - _get_bindings.
# This honours the new sequence-based sort we just added.
MODELS = ['sale.order', 'account.move', 'stock.picking', 'mrp.production',
'fusion.plating.delivery', 'account.payment', 'fusion.plating.portal.job',
'fp.certificate']
Actions = env['ir.actions.actions']
Actions.clear_caches() if hasattr(Actions, 'clear_caches') else env.registry.clear_cache()
for m in MODELS:
bindings = Actions._get_bindings(m)
reports = bindings.get('report', ())
if not reports:
continue
print(f'\\n=== {m} (top→bottom in Print menu) ===')
for i, r in enumerate(reports, 1):
# Get xmlid
xmlids = env['ir.model.data'].search([
('model', '=', 'ir.actions.report'), ('res_id', '=', r['id'])
])
xmlid = ', '.join(f'{x.module}.{x.name}' for x in xmlids) or '(no xmlid)'
is_fp = 'fusion_plating' in xmlid
marker = '' if is_fp else ' '
seq = r.get('sequence', 100)
print(f' {marker} {i:>2}. seq={seq:<4} {r["name"]}')