Caught and fixed by running an actual install on a throwaway DB:
- Strip 29 # comment lines from ir.model.access.csv (Odoo CSV loader treats
them as malformed rows → IndexError); 79 data rows preserved
- Remove obsolete ir.cron.numbercall field (removed in Odoo 17+) from 4 cron
records in fl_deadline_rules.xml
- Rename <tree>→<list> across 26 sites; inside x2many inline views Odoo 18 no
longer recognizes <tree>, which made it fall back to the outer model and
reject inner fields ("Field 'partner_id' does not exist in model 'fl.case'")
- Add store=True to non-stored computed fields referenced by search filters,
which Odoo 18 now rejects as unsearchable:
- fl.case: overdue_deadline_count, next_deadline_label
- fl.deposition: notice_valid
Module loads cleanly: 31 fl.* models registered, no errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
237 lines
14 KiB
XML
237 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
|
|
<!-- ══════════════════════════════════════════════════════
|
|
TREE VIEW
|
|
══════════════════════════════════════════════════════ -->
|
|
<record id="view_fl_deposition_tree" model="ir.ui.view">
|
|
<field name="name">fl.deposition.tree</field>
|
|
<field name="model">fl.deposition</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Depositions"
|
|
decoration-danger="state == 'no_show'"
|
|
decoration-success="state == 'completed'"
|
|
decoration-muted="state in ('cancelled', 'rescheduled')"
|
|
decoration-warning="state == 'noticed' and not notice_valid">
|
|
<field name="case_id"/>
|
|
<field name="deponent_id"/>
|
|
<field name="deponent_type"/>
|
|
<field name="notice_date"/>
|
|
<field name="scheduled_date"/>
|
|
<field name="days_until_deposition" string="Days Away"
|
|
invisible="state in ['completed', 'cancelled']"/>
|
|
<field name="notice_valid" string="Notice OK" optional="show"/>
|
|
<field name="state" widget="badge"
|
|
decoration-success="state == 'completed'"
|
|
decoration-danger="state == 'no_show'"
|
|
decoration-warning="state in ('noticed', 'draft')"
|
|
decoration-info="state == 'confirmed'"/>
|
|
<field name="duces_tecum" optional="show"/>
|
|
<field name="income_verified" optional="show"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ══════════════════════════════════════════════════════
|
|
FORM VIEW
|
|
══════════════════════════════════════════════════════ -->
|
|
<record id="view_fl_deposition_form" model="ir.ui.view">
|
|
<field name="name">fl.deposition.form</field>
|
|
<field name="model">fl.deposition</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Deposition">
|
|
<header>
|
|
<button name="action_mark_noticed" string="Mark Notice Served"
|
|
type="object" class="oe_highlight"
|
|
invisible="state != 'draft'"/>
|
|
<button name="action_confirm" string="Confirm"
|
|
type="object"
|
|
invisible="state != 'noticed'"/>
|
|
<button name="action_mark_completed" string="Mark Completed"
|
|
type="object" class="oe_highlight"
|
|
invisible="state not in ['confirmed', 'noticed']"/>
|
|
<button name="action_no_show" string="Deponent No-Show"
|
|
type="object"
|
|
confirm="Mark this deponent as a no-show? This will trigger the Motion to Compel workflow."
|
|
invisible="state not in ['confirmed', 'noticed']"/>
|
|
<button name="action_reschedule" string="Reschedule"
|
|
type="object"
|
|
invisible="state not in ['draft', 'noticed', 'confirmed']"/>
|
|
<button name="action_cancel" string="Cancel"
|
|
type="object"
|
|
confirm="Cancel this deposition?"
|
|
invisible="state in ['completed', 'cancelled']"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="draft,noticed,confirmed,completed"/>
|
|
</header>
|
|
<sheet>
|
|
<!-- FL 1.310 Notice Alert -->
|
|
<div class="alert alert-info" role="alert">
|
|
<strong>FL 1.310 Requirements:</strong>
|
|
<span class="ml-2">Minimum <strong>10 days notice</strong> (b) | Maximum <strong>7 hours/day</strong> per deponent (d)</span>
|
|
</div>
|
|
|
|
<!-- Notice validity warning -->
|
|
<div class="alert alert-warning" role="alert"
|
|
invisible="(notice_valid or not notice_date) and not scheduled_date">
|
|
<strong>⚠️ INSUFFICIENT NOTICE</strong> —
|
|
<field name="notice_warning" readonly="1" nolabel="1"/>
|
|
</div>
|
|
<div class="alert alert-success" role="alert"
|
|
invisible="(not notice_valid or not notice_date)">
|
|
<field name="notice_warning" readonly="1" nolabel="1"/>
|
|
</div>
|
|
|
|
<!-- No-Show alert -->
|
|
<div class="alert alert-danger" role="alert"
|
|
invisible="state != 'no_show'">
|
|
<strong>⚠️ DEPONENT NO-SHOW</strong> — File Motion to Compel
|
|
Attendance (FL 1.380). Check the Deadlines tab for the deadline.
|
|
You may also request sanctions under FL 1.380(b)(2).
|
|
</div>
|
|
|
|
<!-- Completed summary -->
|
|
<div class="alert alert-success" role="alert"
|
|
invisible="state != 'completed'">
|
|
<strong>✅ Deposition Completed</strong>
|
|
<span invisible="not income_verified">
|
|
— Income verified at
|
|
<field name="income_verified_amount" readonly="1" nolabel="1"/> /month
|
|
</span>
|
|
</div>
|
|
|
|
<group>
|
|
<group string="Deponent">
|
|
<field name="case_id"/>
|
|
<field name="deponent_id"/>
|
|
<field name="deponent_type"/>
|
|
</group>
|
|
<group string="Schedule (FL 1.310)">
|
|
<field name="notice_date"/>
|
|
<field name="scheduled_date"/>
|
|
<field name="days_notice" readonly="1"/>
|
|
<field name="days_until_deposition" readonly="1"/>
|
|
<field name="max_duration_hours"/>
|
|
</group>
|
|
</group>
|
|
|
|
<group>
|
|
<group string="Location">
|
|
<field name="location"/>
|
|
<field name="court_reporter"/>
|
|
<field name="calendar_event_id" readonly="1"
|
|
invisible="not calendar_event_id"/>
|
|
</group>
|
|
</group>
|
|
|
|
<!-- Duces Tecum -->
|
|
<group string="Duces Tecum — Document Production Requirement">
|
|
<field name="duces_tecum"/>
|
|
<field name="duces_tecum_items"
|
|
invisible="not duces_tecum" required="duces_tecum"
|
|
placeholder="List documents deponent must bring to the deposition: - Last 3 years federal/state tax returns - Last 6 months paystubs - All bank statements last 12 months - Business financial statements - Corporate tax returns - Quickbooks / accounting records"/>
|
|
</group>
|
|
|
|
<!-- Results (shown when completed) -->
|
|
<group string="Results / Findings"
|
|
invisible="state not in ['completed', 'no_show']">
|
|
<field name="income_verified"/>
|
|
<field name="income_verified_amount"
|
|
invisible="not income_verified"/>
|
|
<field name="transcript_received"/>
|
|
</group>
|
|
|
|
<field name="key_findings"
|
|
invisible="state not in ['completed']"
|
|
placeholder="Summarize key testimony: income figures, contradictions, admissions, document admissions..."/>
|
|
|
|
<!-- Motion to Compel (no-show only) -->
|
|
<group string="Motion to Compel (FL 1.380)"
|
|
invisible="state != 'no_show'">
|
|
<field name="motion_to_compel_filed"/>
|
|
<field name="motion_to_compel_date"
|
|
invisible="not motion_to_compel_filed"/>
|
|
<field name="sanctions_requested"/>
|
|
</group>
|
|
|
|
<field name="notes" placeholder="Notes, preparation strategy, questions to ask..."/>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ══════════════════════════════════════════════════════
|
|
CALENDAR VIEW
|
|
══════════════════════════════════════════════════════ -->
|
|
<record id="view_fl_deposition_calendar" model="ir.ui.view">
|
|
<field name="name">fl.deposition.calendar</field>
|
|
<field name="model">fl.deposition</field>
|
|
<field name="arch" type="xml">
|
|
<calendar string="Deposition Calendar"
|
|
date_start="scheduled_date"
|
|
date_stop="scheduled_date"
|
|
color="deponent_type"
|
|
mode="month"
|
|
quick_create="False">
|
|
<field name="deponent_id"/>
|
|
<field name="case_id"/>
|
|
<field name="deponent_type"/>
|
|
<field name="state"/>
|
|
<field name="location"/>
|
|
</calendar>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ══════════════════════════════════════════════════════
|
|
SEARCH VIEW
|
|
══════════════════════════════════════════════════════ -->
|
|
<record id="view_fl_deposition_search" model="ir.ui.view">
|
|
<field name="name">fl.deposition.search</field>
|
|
<field name="model">fl.deposition</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Depositions">
|
|
<field name="deponent_id"/>
|
|
<field name="case_id"/>
|
|
<field name="deponent_type"/>
|
|
<filter string="Pending" name="filter_pending"
|
|
domain="[('state', 'in', ['draft', 'noticed', 'confirmed'])]"/>
|
|
<filter string="No-Show" name="filter_no_show"
|
|
domain="[('state', '=', 'no_show')]"/>
|
|
<filter string="Completed" name="filter_completed"
|
|
domain="[('state', '=', 'completed')]"/>
|
|
<filter string="Invalid Notice" name="filter_invalid"
|
|
domain="[('notice_valid', '=', False), ('notice_date', '!=', False)]"/>
|
|
<filter string="Duces Tecum" name="filter_duces"
|
|
domain="[('duces_tecum', '=', True)]"/>
|
|
<group string="Group By">
|
|
<filter string="Case" name="group_case"
|
|
context="{'group_by': 'case_id'}"/>
|
|
<filter string="Status" name="group_state"
|
|
context="{'group_by': 'state'}"/>
|
|
<filter string="Deponent Type" name="group_type"
|
|
context="{'group_by': 'deponent_type'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ══════════════════════════════════════════════════════
|
|
ACTIONS
|
|
══════════════════════════════════════════════════════ -->
|
|
<record id="action_fl_deposition_list" model="ir.actions.act_window">
|
|
<field name="name">Depositions</field>
|
|
<field name="res_model">fl.deposition</field>
|
|
<field name="view_mode">tree,calendar,form</field>
|
|
<field name="search_view_id" ref="view_fl_deposition_search"/>
|
|
<field name="domain">[('state', 'not in', ['cancelled'])]</field>
|
|
<field name="context">{'search_default_filter_pending': 1}</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|