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:
@@ -19,14 +19,14 @@
|
||||
<field name="deadline_type"/>
|
||||
<field name="due_date"/>
|
||||
<field name="days_until_due" string="Days Left"
|
||||
attrs="{'invisible': [('completed', '=', True)]}"/>
|
||||
invisible="completed"/>
|
||||
<field name="statute_reference" optional="show"/>
|
||||
<field name="completed"/>
|
||||
<field name="waived"/>
|
||||
<field name="is_overdue" readonly="1"/>
|
||||
<button name="action_mark_complete" string="✔ Complete"
|
||||
type="object" icon="fa-check"
|
||||
attrs="{'invisible': ['|', ('completed', '=', True), ('waived', '=', True)]}"/>
|
||||
invisible="(completed or waived)"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -42,28 +42,28 @@
|
||||
<header>
|
||||
<button name="action_mark_complete" string="Mark Complete"
|
||||
type="object" class="oe_highlight"
|
||||
attrs="{'invisible': ['|', ('completed', '=', True), ('waived', '=', True)]}"/>
|
||||
invisible="(completed or waived)"/>
|
||||
<button name="action_mark_waived" string="Mark Waived / N/A"
|
||||
type="object"
|
||||
attrs="{'invisible': ['|', ('completed', '=', True), ('waived', '=', True)]}"/>
|
||||
invisible="(completed or waived)"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<!-- Overdue alert banner -->
|
||||
<div class="alert alert-danger" role="alert"
|
||||
attrs="{'invisible': [('is_overdue', '=', False)]}">
|
||||
invisible="not is_overdue">
|
||||
<strong>🔴 OVERDUE</strong> — This deadline has passed.
|
||||
Missed court deadlines can result in default judgment
|
||||
or case dismissal. Take action immediately.
|
||||
</div>
|
||||
<!-- 7-day warning banner -->
|
||||
<div class="alert alert-warning" role="alert"
|
||||
attrs="{'invisible': ['|', ('is_overdue', '=', True), ('days_until_due', '>', 7), ('completed', '=', True)]}">
|
||||
invisible="(is_overdue or days_until_due > 7) and completed">
|
||||
<strong>⏰ Due in ${days_until_due} days</strong> —
|
||||
This deadline is coming up soon.
|
||||
</div>
|
||||
<!-- Completed banner -->
|
||||
<div class="alert alert-success" role="alert"
|
||||
attrs="{'invisible': [('completed', '=', False)]}">
|
||||
invisible="not completed">
|
||||
<strong>✅ Completed</strong> on
|
||||
<field name="completed_date" readonly="1" nolabel="1"/>
|
||||
</div>
|
||||
@@ -86,12 +86,12 @@
|
||||
<group>
|
||||
<field name="completed"/>
|
||||
<field name="completed_date"
|
||||
attrs="{'invisible': [('completed', '=', False)], 'required': [('completed', '=', True)]}"/>
|
||||
invisible="not completed" required="completed"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="waived"/>
|
||||
<field name="calendar_event_id" readonly="1"
|
||||
attrs="{'invisible': [('calendar_event_id', '=', False)]}"/>
|
||||
invisible="not calendar_event_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Alerts Sent" groups="activeblue_familylaw.group_admin">
|
||||
|
||||
Reference in New Issue
Block a user