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

@@ -41,37 +41,37 @@
<header>
<button name="action_mark_completed" string="Mark Completed"
type="object" class="oe_highlight"
attrs="{'invisible': [('state', '!=', 'scheduled')]}"/>
invisible="state != 'scheduled'"/>
<button name="action_mark_continued" string="Mark Continued"
type="object"
attrs="{'invisible': [('state', '!=', 'scheduled')]}"/>
invisible="state != 'scheduled'"/>
<button name="action_cancel" string="Cancel Hearing"
type="object" confirm="Cancel this hearing? This cannot be undone."
attrs="{'invisible': [('state', 'not in', ['scheduled', 'continued'])]}"/>
invisible="state not in ['scheduled', 'continued']"/>
<field name="state" widget="statusbar"
statusbar_visible="scheduled,completed,cancelled,continued"/>
</header>
<sheet>
<!-- Outcome section — shown after completion -->
<div class="alert alert-success" role="alert"
attrs="{'invisible': [('state', '!=', 'completed')]}">
invisible="state != 'completed'">
<strong>✅ Hearing Completed</strong>
<span attrs="{'invisible': [('outcome', '=', False)]}">
<span invisible="not outcome">
<field name="outcome" readonly="1" nolabel="1"/>
</span>
<span attrs="{'invisible': [('outcome', '!=', False)]}">
<span invisible="outcome">
— Update the Outcome field below with the judge's ruling.
</span>
</div>
<!-- Continued notice -->
<div class="alert alert-warning" role="alert"
attrs="{'invisible': [('state', '!=', 'continued')]}">
invisible="state != 'continued'">
<strong>⏸️ Hearing Continued</strong> — Contact the court for
the rescheduled date and create a new hearing record.
</div>
<!-- Cancelled notice -->
<div class="alert alert-danger" role="alert"
attrs="{'invisible': [('state', '!=', 'cancelled')]}">
invisible="state != 'cancelled'">
<strong>❌ Hearing Cancelled</strong>
</div>
@@ -88,7 +88,7 @@
<field name="courtroom"/>
<field name="judge_id"/>
<field name="calendar_event_id" readonly="1"
attrs="{'invisible': [('calendar_event_id', '=', False)]}"/>
invisible="not calendar_event_id"/>
</group>
</group>
@@ -116,7 +116,7 @@
<!-- Outcome (visible after hearing) -->
<group string="Outcome"
attrs="{'invisible': [('state', 'not in', ['completed', 'continued'])]}">
invisible="state not in ['completed', 'continued']">
<field name="order_entered"/>
<field name="outcome" placeholder="Describe the judge's ruling, any orders entered, next steps..."/>
</group>