Skip to content

Commit bf42ea2

Browse files
Merge pull request #31 from OpenSPP/fix/hazard-duplicate-emergency-response
fix(spp_hazard): remove duplicate Emergency Response tab in registrant form
2 parents b3f1fd3 + 6c48a89 commit bf42ea2

File tree

1 file changed

+3
-45
lines changed

1 file changed

+3
-45
lines changed

spp_hazard/views/registrant_views.xml

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -24,51 +24,9 @@
2424
<div class="alert alert-warning" role="alert" invisible="not has_active_impact">
2525
<span class="fw-bold">Active incident impacts recorded</span>
2626
</div>
27-
<group name="hazard_impacts_section" string="Incident Impacts"
28-
invisible="hazard_impact_count == 0">
29-
<field name="hazard_impact_ids" nolabel="1" readonly="1" colspan="2">
30-
<list>
31-
<field name="incident_id"/>
32-
<field name="impact_type_id"/>
33-
<field name="damage_level" widget="badge"/>
34-
<field name="impact_date"/>
35-
<field name="verification_status" widget="badge"
36-
decoration-info="verification_status == 'reported'"
37-
decoration-success="verification_status == 'verified'"
38-
decoration-warning="verification_status == 'disputed'"
39-
decoration-muted="verification_status == 'closed'"/>
40-
</list>
41-
</field>
42-
</group>
43-
</page>
44-
</xpath>
45-
</field>
46-
</record>
47-
48-
<!-- Extend Group Form View to show hazard impacts -->
49-
<record id="view_group_form_hazard" model="ir.ui.view">
50-
<field name="name">view.group.form.hazard</field>
51-
<field name="model">res.partner</field>
52-
<field name="inherit_id" ref="spp_registry.view_groups_form_membership"/>
53-
<field name="priority">50</field>
54-
<field name="arch" type="xml">
55-
<xpath expr="//div[@name='button_box']" position="inside">
56-
<button name="action_view_hazard_impacts"
57-
type="object"
58-
class="oe_stat_button"
59-
icon="fa-bolt"
60-
invisible="hazard_impact_count == 0">
61-
<field name="hazard_impact_count" widget="statinfo" string="Impacts"/>
62-
</button>
63-
</xpath>
64-
<!-- Add Emergency Response tab for hazard impacts -->
65-
<xpath expr="//page[@name='participation']" position="after">
66-
<page string="Emergency Response" name="emergency_response"
67-
invisible="not is_registrant">
68-
<field name="has_active_impact" invisible="1"/>
69-
<div class="alert alert-warning" role="alert" invisible="not has_active_impact">
70-
<span class="fw-bold">Active incident impacts recorded</span>
71-
</div>
27+
<p class="text-muted" invisible="hazard_impact_count != 0">
28+
No emergency response records yet. Impact records will appear here when this registrant is affected by a hazard incident.
29+
</p>
7230
<group name="hazard_impacts_section" string="Incident Impacts"
7331
invisible="hazard_impact_count == 0">
7432
<field name="hazard_impact_ids" nolabel="1" readonly="1" colspan="2">

0 commit comments

Comments
 (0)