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,47 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2026 Nexa Systems Inc.
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
#
|
||||
# Assigns existing fp.coating.config rows (with recipes) to parts that
|
||||
# don't have one yet. Round-robin distribution. Idempotent.
|
||||
#
|
||||
# Field name on fp.part.catalog is x_fc_default_coating_config_id.
|
||||
|
||||
COATING_FIELD = 'x_fc_default_coating_config_id'
|
||||
|
||||
|
||||
def run(env):
|
||||
print('=== Assigning coatings to bare parts ===')
|
||||
|
||||
Part = env['fp.part.catalog']
|
||||
Coating = env['fp.coating.config']
|
||||
|
||||
coatings_with_recipe = Coating.search([('recipe_id', '!=', False)])
|
||||
if not coatings_with_recipe:
|
||||
print(' No coatings with recipes available - abort')
|
||||
return
|
||||
print(f' Coatings with recipes: {len(coatings_with_recipe)}')
|
||||
|
||||
bare_parts = Part.search([(COATING_FIELD, '=', False)])
|
||||
print(f' Parts without coating: {len(bare_parts)}')
|
||||
|
||||
# Assign first 20 bare parts (or all if fewer)
|
||||
to_assign = bare_parts[:20]
|
||||
n = 0
|
||||
for i, part in enumerate(to_assign):
|
||||
coating = coatings_with_recipe[i % len(coatings_with_recipe)]
|
||||
part[COATING_FIELD] = coating.id
|
||||
n += 1
|
||||
print(f' {part.name!r} -> {coating.name!r}')
|
||||
|
||||
env.cr.commit()
|
||||
print()
|
||||
print(f'=== Done. Assigned coatings to {n} parts ===')
|
||||
final_count = Part.search_count([(COATING_FIELD, '!=', False)])
|
||||
print(f' Parts with coating now: {final_count}')
|
||||
|
||||
|
||||
try:
|
||||
run(env)
|
||||
except NameError:
|
||||
print('Run inside `odoo shell`.')
|
||||
Reference in New Issue
Block a user