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>
49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1
|
|
#
|
|
# Phase 1 (Sub 11) - relocate fp.work.role, fp.operator.proficiency,
|
|
# and the hr.employee shop-roles inherit from fusion_plating_bridge_mrp
|
|
# into fusion_plating core. Re-key all related ir.model.data so the
|
|
# new module owner picks up the existing records cleanly.
|
|
|
|
import logging
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
def migrate(cr, version):
|
|
if not version:
|
|
return # Fresh install - nothing to migrate
|
|
|
|
patterns = [
|
|
'model_fp_work_role',
|
|
'model_fp_operator_proficiency',
|
|
'access_fp_work_role_%',
|
|
'access_fp_proficiency_%',
|
|
'view_fp_work_role_%',
|
|
'action_fp_work_role%',
|
|
'menu_fp_work_role%',
|
|
'role_%', # data records seeded by fp_work_role_data.xml
|
|
]
|
|
for pat in patterns:
|
|
cr.execute(
|
|
"""
|
|
UPDATE ir_model_data
|
|
SET module = 'fusion_plating'
|
|
WHERE module = 'fusion_plating_bridge_mrp'
|
|
AND name LIKE %s
|
|
AND NOT EXISTS (
|
|
SELECT 1 FROM ir_model_data d2
|
|
WHERE d2.module = 'fusion_plating'
|
|
AND d2.name = ir_model_data.name
|
|
)
|
|
""",
|
|
(pat,),
|
|
)
|
|
if cr.rowcount:
|
|
_logger.info(
|
|
"Sub 11: re-keyed %d row(s) for %s -> fusion_plating",
|
|
cr.rowcount, pat,
|
|
)
|