8f458017c9f6f0df891d7616a5fed3594187ca50
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>
Description
Odoo 19 custom modules
Languages
Python
55.9%
HTML
26.1%
JavaScript
14.9%
SCSS
1.8%
CSS
0.8%
Other
0.4%