Split 49 modules/suites into independent git repos; untrack from monorepo
Each top-level module/suite folder is now its own private repo on GitHub (gsinghpal/<name>) and gitea (admin/<name>), with a fresh single initial commit. The monorepo no longer tracks them (added to .gitignore + git rm --cached); working-tree files are retained on disk and managed in their own repos. The monorepo keeps shared root files (CLAUDE.md, docs/, scripts/, tools/, AGENTS.md, WIP/obsolete dirs) and full history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2026 Nexa Systems Inc.
|
||||
"""Name-match existing fp_receiving.carrier_name → x_fc_carrier_id.
|
||||
|
||||
Phase A of the shipping integration replaces the free-text carrier
|
||||
field with a Many2one to delivery.carrier. Existing records (16 on
|
||||
entech at write time) have free-text values like "FedEx", "Purolator"
|
||||
in carrier_name. This migration walks them and populates the new M2O
|
||||
when a unique case-insensitive name match exists.
|
||||
|
||||
delivery.carrier.name is jsonb (translatable) in Odoo 19 - match
|
||||
strips to the en_US translation. Ambiguous values stay as text in
|
||||
carrier_name for the operator to pick manually.
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
# Skip if the field doesn't exist yet (defensive - the column is
|
||||
# added by the registry update that runs before post-migrate).
|
||||
cr.execute("""
|
||||
SELECT 1
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'fp_receiving'
|
||||
AND column_name = 'x_fc_carrier_id'
|
||||
""")
|
||||
if not cr.fetchone():
|
||||
_logger.warning('x_fc_carrier_id column not present - skip.')
|
||||
return
|
||||
|
||||
cr.execute("""
|
||||
UPDATE fp_receiving r
|
||||
SET x_fc_carrier_id = dc.id
|
||||
FROM delivery_carrier dc
|
||||
WHERE r.carrier_name IS NOT NULL
|
||||
AND r.carrier_name <> ''
|
||||
AND r.x_fc_carrier_id IS NULL
|
||||
AND LOWER(TRIM(r.carrier_name)) =
|
||||
LOWER(TRIM((dc.name->>'en_US')))
|
||||
""")
|
||||
matched = cr.rowcount
|
||||
_logger.info(
|
||||
'Receiving carrier migration: matched %d record(s) by name.',
|
||||
matched,
|
||||
)
|
||||
Reference in New Issue
Block a user