Files
Odoo-Modules/fusion_plating
gsinghpal 8f458017c9 feat(jobs): cleanup + seed scripts for demo data reset
cleanup_demo_data.py: deletes ALL fp.job, fp.job.step, timelogs,
mrp.production, mrp.workorder, and dependent records (deliveries,
certs, holds, portal jobs, racking inspections, uninvoiced SOs).
Resets the fp.job sequence. Preserves masters. Force-cancels MOs/SOs
via SQL UPDATE before unlink to bypass Odoo's _unlink_except_done
and _unlink_except_draft_or_cancel guards.

seed_demo_data.py: creates 31 fp.job rows distributed across all
6 states (draft=5, confirmed=6, in_progress=8, on_hold=3, done=6,
cancelled=3). In_progress jobs have mixed step states with real
timelogs to simulate a live shop floor. Falls back to direct
fp.job creation when a customer's parts have no coating/recipe,
ensuring customer variety even with sparse coating data.

Both scripts: idempotent (safe to re-run), commit at end, walk
dependents bottom-up to avoid FK violations. Used to reset entech
demo data after the migration trial.

Part of: native job model migration (spec 2026-04-25)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 05:43:48 -04:00
..
2026-04-20 13:07:15 -04:00
2026-04-16 20:53:53 -04:00
2026-04-16 20:53:53 -04:00
2026-04-24 21:04:38 -04:00
2026-04-16 20:53:53 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-16 20:53:53 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-16 20:53:53 -04:00
2026-04-20 01:16:12 -04:00
2026-04-16 20:53:53 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-16 20:53:53 -04:00
2026-04-16 20:53:53 -04:00
2026-04-24 21:04:38 -04:00
2026-04-20 01:16:12 -04:00
2026-04-20 01:16:12 -04:00
2026-04-16 20:53:53 -04:00