Commit Graph

2 Commits

Author SHA1 Message Date
tocmo0nlord
935394620b Rename module to activeblue_familylaw_v2 (coexist with legacy prod module)
Production already has a DIFFERENT, earlier module installed as `activeblue_familylaw`
(models fl.*, real data). Renamed this build's technical name to
`activeblue_familylaw_v2` so it installs ALONGSIDE the legacy app instead of replacing
it. Models (familylaw.*) and test tags (familylaw_step<N>) are unchanged — only the
module name and its group XML IDs change.

Changes:
- Folder activeblue_familylaw -> activeblue_familylaw_v2 (git mv)
- All 44 dotted refs activeblue_familylaw. -> activeblue_familylaw_v2.
  (security group XML IDs in views/python; test patch targets odoo.addons.*)
- Manifest display name -> "Active Blue Family Law v2"; root menu -> "Family Law (v2)"
- scripts/validate_module.py ROOT path; BUILD_STATUS.md run commands + coexistence
  note; START_HERE.md pointer

Verified in live Odoo 18:
- Fresh install + full suite: 200 tests, 0 failed, 0 errors.
- COEXISTENCE on a clone of prod db1: installing _v2 alongside the installed legacy
  activeblue_familylaw left the legacy untouched (still installed 18.0.1.0.0, fl.*
  models registered, fl_caselaw 25 rows intact) while adding the 30 familylaw.* models.
  Exit 0, no errors. Clone dropped; prod DBs untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 11:23:34 +00:00
tocmo0nlord
979bbfa14a Step 3: documents + the attorney review gate (Gate 1)
familylaw.document — every piece of work product, attached to a PROCEEDING:
- States: ai_draft -> attorney_review -> approved (+ rejected, filed, sent)
- AI-sourced documents born in ai_draft
- Gate 1 enforced in code: _ensure_approved() blocks file/send unless approved;
  _ensure_attorney() restricts approve/reject/file/send to the attorney group
- approved_by_id / approved_date stamped on approval; cleared on reject
- mail.thread audit on every transition
- proceeding.document_ids One2many; case_id derived (stored) from proceeding

Views: document list/form/search + menu; inline documents tab on proceeding form.
Security + manifest + menu updated.

Also folds in a correctness fix for Steps 2-3 view bindings: replaced the invalid
`view_id="..."` attribute on x2many fields with canonical inline <list> subviews
(case notebook tabs + proceeding documents tab). Avoids load-order/attr issues.

Added scripts/validate_module.py: static gate (py compile, xml well-formed,
forbidden-construct scan, button->method mapping, manifest+ACL integrity).

Tests (familylaw_step3): 16 tests — born-draft, Gate 1 (no file/send unapproved
from draft or review), attorney-only approve/reject/file/send, full happy path,
reject clears approval + resubmit, audit, proceeding linkage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 03:58:48 +00:00