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>
42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
#
|
|
# 2026-05-20 Step Kind curation - post-migrate.
|
|
#
|
|
# Runs AFTER the schema settles. Marks the 15 retired kinds inactive so
|
|
# they no longer appear in the dropdown. We keep them in the DB rather
|
|
# than deleting because:
|
|
# - ir.model.data rows would dangle and break a future re-import
|
|
# - audit trail / reports may still reference them by code
|
|
# - users who undo the curation get one switch back to active=True
|
|
#
|
|
# Pre-migrate has already re-mapped every template + node pointing at
|
|
# these kinds, so flipping active=False has no operator-facing data
|
|
# impact - it only hides them from pickers.
|
|
|
|
import logging
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
_RETIRED_CODES = [
|
|
'cleaning', 'electroclean', 'etch', 'rinse', 'strike', 'dry',
|
|
'wbf_test', 'demask', 'derack', 'replenishment', 'hardness_test',
|
|
'adhesion_test', 'salt_spray', 'packaging', 'gating',
|
|
]
|
|
|
|
|
|
def migrate(cr, version):
|
|
cr.execute("""
|
|
UPDATE fp_step_kind
|
|
SET active = false
|
|
WHERE code = ANY(%s)
|
|
AND active = true
|
|
""", (_RETIRED_CODES,))
|
|
n = cr.rowcount
|
|
if n:
|
|
_logger.info(
|
|
'Step Kind curation: retired %d kinds (active=False): %s',
|
|
n, _RETIRED_CODES,
|
|
)
|