Migrate views to Odoo 17/18 syntax; fix pre-existing XML blockers
- Convert all 124 attrs="{...}" across 13 view files to direct Odoo 17/18
attributes (invisible/readonly/required with Python expressions); prefix-domain
OR/AND/NOT and operators handled (e.g. "(is_overdue or days_until_due > 7) and completed")
- Fix pre-existing XML errors that blocked module load on any version:
- Replace invalid HTML entity with   in 4 files (reports + portal)
- Merge duplicate style= attributes (3 spots in website_intake_templates)
- Replace 3 illegal <t t-if> embedded in class="" attributes with t-attf-class
- All 44 module XML files now parse clean
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<field name="notice_date"/>
|
||||
<field name="scheduled_date"/>
|
||||
<field name="days_until_deposition" string="Days Away"
|
||||
attrs="{'invisible': [('state', 'in', ['completed', 'cancelled'])]}"/>
|
||||
invisible="state in ['completed', 'cancelled']"/>
|
||||
<field name="notice_valid" string="Notice OK" optional="show"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-success="state == 'completed'"
|
||||
@@ -44,24 +44,24 @@
|
||||
<header>
|
||||
<button name="action_mark_noticed" string="Mark Notice Served"
|
||||
type="object" class="oe_highlight"
|
||||
attrs="{'invisible': [('state', '!=', 'draft')]}"/>
|
||||
invisible="state != 'draft'"/>
|
||||
<button name="action_confirm" string="Confirm"
|
||||
type="object"
|
||||
attrs="{'invisible': [('state', '!=', 'noticed')]}"/>
|
||||
invisible="state != 'noticed'"/>
|
||||
<button name="action_mark_completed" string="Mark Completed"
|
||||
type="object" class="oe_highlight"
|
||||
attrs="{'invisible': [('state', 'not in', ['confirmed', 'noticed'])]}"/>
|
||||
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."
|
||||
attrs="{'invisible': [('state', 'not in', ['confirmed', 'noticed'])]}"/>
|
||||
invisible="state not in ['confirmed', 'noticed']"/>
|
||||
<button name="action_reschedule" string="Reschedule"
|
||||
type="object"
|
||||
attrs="{'invisible': [('state', 'not in', ['draft', 'noticed', 'confirmed'])]}"/>
|
||||
invisible="state not in ['draft', 'noticed', 'confirmed']"/>
|
||||
<button name="action_cancel" string="Cancel"
|
||||
type="object"
|
||||
confirm="Cancel this deposition?"
|
||||
attrs="{'invisible': [('state', 'in', ['completed', 'cancelled'])]}"/>
|
||||
invisible="state in ['completed', 'cancelled']"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,noticed,confirmed,completed"/>
|
||||
</header>
|
||||
@@ -74,18 +74,18 @@
|
||||
|
||||
<!-- Notice validity warning -->
|
||||
<div class="alert alert-warning" role="alert"
|
||||
attrs="{'invisible': ['|', ('notice_valid', '=', True), ('notice_date', '=', False), ('scheduled_date', '=', False)]}">
|
||||
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"
|
||||
attrs="{'invisible': ['|', ('notice_valid', '=', False), ('notice_date', '=', False)]}">
|
||||
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"
|
||||
attrs="{'invisible': [('state', '!=', 'no_show')]}">
|
||||
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).
|
||||
@@ -93,9 +93,9 @@
|
||||
|
||||
<!-- Completed summary -->
|
||||
<div class="alert alert-success" role="alert"
|
||||
attrs="{'invisible': [('state', '!=', 'completed')]}">
|
||||
invisible="state != 'completed'">
|
||||
<strong>✅ Deposition Completed</strong>
|
||||
<span attrs="{'invisible': [('income_verified', '=', False)]}">
|
||||
<span invisible="not income_verified">
|
||||
— Income verified at
|
||||
<field name="income_verified_amount" readonly="1" nolabel="1"/> /month
|
||||
</span>
|
||||
@@ -121,7 +121,7 @@
|
||||
<field name="location"/>
|
||||
<field name="court_reporter"/>
|
||||
<field name="calendar_event_id" readonly="1"
|
||||
attrs="{'invisible': [('calendar_event_id', '=', False)]}"/>
|
||||
invisible="not calendar_event_id"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -129,29 +129,29 @@
|
||||
<group string="Duces Tecum — Document Production Requirement">
|
||||
<field name="duces_tecum"/>
|
||||
<field name="duces_tecum_items"
|
||||
attrs="{'invisible': [('duces_tecum', '=', False)], 'required': [('duces_tecum', '=', True)]}"
|
||||
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"
|
||||
attrs="{'invisible': [('state', 'not in', ['completed', 'no_show'])]}">
|
||||
invisible="state not in ['completed', 'no_show']">
|
||||
<field name="income_verified"/>
|
||||
<field name="income_verified_amount"
|
||||
attrs="{'invisible': [('income_verified', '=', False)]}"/>
|
||||
invisible="not income_verified"/>
|
||||
<field name="transcript_received"/>
|
||||
</group>
|
||||
|
||||
<field name="key_findings"
|
||||
attrs="{'invisible': [('state', 'not in', ['completed'])]}"
|
||||
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)"
|
||||
attrs="{'invisible': [('state', '!=', 'no_show')]}">
|
||||
invisible="state != 'no_show'">
|
||||
<field name="motion_to_compel_filed"/>
|
||||
<field name="motion_to_compel_date"
|
||||
attrs="{'invisible': [('motion_to_compel_filed', '=', False)]}"/>
|
||||
invisible="not motion_to_compel_filed"/>
|
||||
<field name="sanctions_requested"/>
|
||||
</group>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user