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:
2026-05-29 14:15:25 +00:00
parent 6f6129550e
commit 983964c6d2
18 changed files with 156 additions and 156 deletions

View File

@@ -18,12 +18,12 @@
<field name="discovery_type"/>
<field name="directed_to"/>
<field name="third_party_id"
attrs="{'invisible': [('directed_to', '!=', 'third_party')]}"/>
invisible="directed_to != 'third_party'"/>
<field name="description"/>
<field name="served_date"/>
<field name="response_due_date"/>
<field name="days_until_response" string="Days Left"
attrs="{'invisible': [('state', 'in', ['draft', 'responded', 'complete'])]}"/>
invisible="state in ['draft', 'responded', 'complete']"/>
<field name="is_overdue" string="Overdue"/>
<field name="admissions_deemed" string="Deemed Admitted" optional="show"/>
<field name="state" widget="badge"
@@ -33,13 +33,13 @@
decoration-muted="state == 'draft'"/>
<button name="action_mark_served" string="Served" type="object"
icon="fa-paper-plane"
attrs="{'invisible': [('state', '!=', 'draft')]}"/>
invisible="state != 'draft'"/>
<button name="action_mark_responded" string="Responded" type="object"
icon="fa-check"
attrs="{'invisible': [('state', '!=', 'served')]}"/>
invisible="state != 'served'"/>
<button name="action_file_motion_to_compel" string="Compel"
type="object" icon="fa-gavel"
attrs="{'invisible': [('state', 'not in', ['served', 'deficient'])]}"/>
invisible="state not in ['served', 'deficient']"/>
</tree>
</field>
</record>
@@ -55,20 +55,20 @@
<header>
<button name="action_mark_served" string="Mark Served"
type="object" class="oe_highlight"
attrs="{'invisible': [('state', '!=', 'draft')]}"/>
invisible="state != 'draft'"/>
<button name="action_mark_responded" string="Response Received"
type="object"
attrs="{'invisible': [('state', '!=', 'served')]}"/>
invisible="state != 'served'"/>
<button name="action_flag_deficient" string="Flag Deficient"
type="object"
attrs="{'invisible': [('state', '!=', 'responded')]}"/>
invisible="state != 'responded'"/>
<button name="action_file_motion_to_compel"
string="File Motion to Compel (FL 1.380)"
type="object"
attrs="{'invisible': [('state', 'not in', ['served', 'deficient'])]}"/>
invisible="state not in ['served', 'deficient']"/>
<button name="action_mark_complete" string="Mark Complete"
type="object"
attrs="{'invisible': [('state', 'in', ['draft', 'complete'])]}"/>
invisible="state in ['draft', 'complete']"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,served,responded,complete"/>
</header>
@@ -76,7 +76,7 @@
<!-- Deemed Admitted Alert (FL 1.370) — CRITICAL -->
<div class="alert alert-danger" role="alert"
attrs="{'invisible': [('admissions_deemed', '=', False)]}">
invisible="not admissions_deemed">
<strong>🚨 FL 1.370 — ADMISSIONS DEEMED ADMITTED</strong><br/>
No response was filed within 30 days. Each matter in this
Request for Admissions is <strong>automatically deemed admitted</strong>
@@ -87,7 +87,7 @@
<!-- Overdue response alert -->
<div class="alert alert-warning" role="alert"
attrs="{'invisible': ['|', ('is_overdue', '=', False), ('admissions_deemed', '=', True)]}">
invisible="(not is_overdue or admissions_deemed)">
<strong>⏰ Response OVERDUE</strong> — Was due
<field name="response_due_date" readonly="1" nolabel="1"/>.
Consider sending a deficiency notice, then filing
@@ -96,7 +96,7 @@
<!-- Complete badge -->
<div class="alert alert-success" role="alert"
attrs="{'invisible': [('state', '!=', 'complete')]}">
invisible="state != 'complete'">
<strong>✅ Discovery Item Complete</strong>
</div>
@@ -106,14 +106,14 @@
<field name="discovery_type"/>
<field name="directed_to"/>
<field name="third_party_id"
attrs="{'invisible': [('directed_to', '!=', 'third_party')], 'required': [('directed_to', '=', 'third_party')]}"/>
invisible="directed_to != 'third_party'" required="directed_to == 'third_party'"/>
<field name="description"/>
</group>
<group string="Timeline">
<field name="served_date"/>
<field name="response_due_date" readonly="1"/>
<field name="days_until_response" readonly="1"
attrs="{'invisible': [('state', 'in', ['draft', 'responded', 'complete'])]}"/>
invisible="state in ['draft', 'responded', 'complete']"/>
<field name="is_overdue" readonly="1"/>
<field name="response_received_date"/>
<field name="response_complete"/>
@@ -122,7 +122,7 @@
<!-- Subpoena info (third party) -->
<group string="Subpoena Information (FL 1.351)"
attrs="{'invisible': [('discovery_type', '!=', 'subpoena')]}">
invisible="discovery_type != 'subpoena'">
<div class="alert alert-info" role="alert">
<strong>FL 1.351 Subpoena for Production:</strong>
Third party must respond within the time stated in the subpoena
@@ -134,7 +134,7 @@
<!-- Admissions specific note -->
<group string="Admissions (FL 1.370) — WARNING"
attrs="{'invisible': [('discovery_type', '!=', 'admissions')]}">
invisible="discovery_type != 'admissions'">
<div class="alert alert-warning" role="alert">
<strong>FL 1.370 Critical Rule:</strong>
If the responding party <strong>fails to respond within 30 days</strong>,
@@ -149,14 +149,14 @@
<group string="Objections / Deficiencies">
<field name="objections_raised"/>
<field name="objection_detail"
attrs="{'invisible': [('objections_raised', '=', False)]}"/>
invisible="not objections_raised"/>
<field name="deficiency_notice_sent"/>
<field name="deficiency_notice_date"
attrs="{'invisible': [('deficiency_notice_sent', '=', False)]}"/>
invisible="not deficiency_notice_sent"/>
</group>
<group string="Motion to Compel (FL 1.380)"
attrs="{'invisible': [('state', '!=', 'compelled')]}">
invisible="state != 'compelled'">
<field name="motion_to_compel_filed" readonly="1"/>
<field name="motion_to_compel_date" readonly="1"/>
<field name="sanctions_requested"/>