Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions spp_hazard/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================================
OpenSPP Hazard & Emergency Management
=====================================
Expand All @@ -14,9 +10,9 @@ OpenSPP Hazard & Emergency Management
!! source digest: sha256:55e519b15a45175a4e6fc1033b24a2abcde053ea3f81a873af733d967618d343
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Expand Down Expand Up @@ -171,10 +167,13 @@ Maintainers
.. |maintainer-reichie020212| image:: https://github.com/reichie020212.png?size=40px
:target: https://github.com/reichie020212
:alt: reichie020212
.. |maintainer-emjay0921| image:: https://github.com/emjay0921.png?size=40px
:target: https://github.com/emjay0921
:alt: emjay0921

Current maintainers:

|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-reichie020212|
|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-reichie020212| |maintainer-emjay0921|

This module is part of the `OpenSPP/OpenSPP2 <https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_hazard>`_ project on GitHub.

Expand Down
4 changes: 2 additions & 2 deletions spp_hazard/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
"license": "LGPL-3",
"development_status": "Alpha",
"maintainers": ["jeremi", "gonzalesedwin1123", "reichie020212"],
"development_status": "Beta",
"maintainers": ["jeremi", "gonzalesedwin1123", "reichie020212", "emjay0921"],
"depends": [
"base",
"spp_security",
Expand Down
5 changes: 1 addition & 4 deletions spp_hazard/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,6 @@
<div class="document">


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="openspp-hazard-emergency-management">
<h1>OpenSPP Hazard &amp; Emergency Management</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand All @@ -374,7 +371,7 @@ <h1>OpenSPP Hazard &amp; Emergency Management</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:55e519b15a45175a4e6fc1033b24a2abcde053ea3f81a873af733d967618d343
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_hazard"><img alt="OpenSPP/OpenSPP2" src="https://img.shields.io/badge/github-OpenSPP%2FOpenSPP2-lightgray.png?logo=github" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_hazard"><img alt="OpenSPP/OpenSPP2" src="https://img.shields.io/badge/github-OpenSPP%2FOpenSPP2-lightgray.png?logo=github" /></a></p>
<p>Records disaster events and tracks their impact on individual
registrants. Supports hierarchical hazard classification, geographic
scope tracking, severity levels, and verification workflows to enable
Expand Down
20 changes: 14 additions & 6 deletions spp_hazard/views/hazard_impact_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,28 @@
<div class="oe_title">
<label for="registrant_id"/>
<h1>
<field name="registrant_id" placeholder="Select Registrant..." options="{'no_create': True}"/>
<field name="registrant_id" placeholder="Select Registrant..."
options="{'no_create': True}"
readonly="verification_status == 'closed'"/>
</h1>
<label for="incident_id"/>
<h2>
<field name="incident_id" placeholder="Select Incident..." options="{'no_create': True}"/>
<field name="incident_id" placeholder="Select Incident..."
options="{'no_create': True}"
readonly="verification_status == 'closed'"/>
</h2>
</div>
<group>
<group name="incident_info">
<field name="incident_status" invisible="1"/>
</group>
<group name="impact_details">
<field name="impact_type_id" options="{'no_create': True}"/>
<field name="damage_level"/>
<field name="impact_date"/>
<field name="impact_type_id" options="{'no_create': True}"
readonly="verification_status == 'closed'"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The formatting of attributes for this field tag is inconsistent with other fields in this file (e.g., registrant_id on line 54). For better readability and maintainability, please adopt a consistent style where attributes other than name and placeholder are on new lines.

Suggested change
<field name="impact_type_id" options="{'no_create': True}"
readonly="verification_status == 'closed'"/>
<field name="impact_type_id"
options="{'no_create': True}"
readonly="verification_status == 'closed'"/>

<field name="damage_level"
readonly="verification_status == 'closed'"/>
<field name="impact_date"
readonly="verification_status == 'closed'"/>
</group>
</group>
<group name="verification_info" string="Verification Information"
Expand All @@ -77,7 +84,8 @@
</group>
<notebook>
<page string="Notes" name="notes">
<field name="notes" placeholder="Additional details about the impact..."/>
<field name="notes" placeholder="Additional details about the impact..."
readonly="verification_status == 'closed'"/>
</page>
</notebook>
</sheet>
Expand Down
27 changes: 17 additions & 10 deletions spp_hazard/views/hazard_incident_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,35 @@
<div class="oe_title">
<label for="name"/>
<h1>
<field name="name" placeholder="e.g., Typhoon Yolanda"/>
<field name="name" placeholder="e.g., Typhoon Yolanda"
readonly="status == 'closed'"/>
</h1>
</div>
<group>
<group name="main_info">
<field name="code" placeholder="e.g., 2013-YOLANDA"/>
<field name="category_id" options="{'no_create': True}"/>
<field name="severity"/>
<field name="code" placeholder="e.g., 2013-YOLANDA"
readonly="status == 'closed'"/>
<field name="category_id" options="{'no_create': True}"
readonly="status == 'closed'"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The formatting of attributes for this field tag is inconsistent with other fields in this file (e.g., name on line 66). For better readability and maintainability, please adopt a consistent style where attributes other than name and placeholder are on new lines.

Suggested change
<field name="category_id" options="{'no_create': True}"
readonly="status == 'closed'"/>
<field name="category_id"
options="{'no_create': True}"
readonly="status == 'closed'"/>

<field name="severity"
readonly="status == 'closed'"/>
</group>
<group name="dates">
<field name="start_date"/>
<field name="end_date"/>
<field name="start_date"
readonly="status == 'closed'"/>
<field name="end_date"
readonly="status == 'closed'"/>
<field name="is_ongoing" invisible="1"/>
</group>
</group>
<notebook>
<page string="Description" name="description">
<field name="description" placeholder="Describe the incident in detail..."/>
<field name="description" placeholder="Describe the incident in detail..."
readonly="status == 'closed'"/>
</page>
<page string="Affected Areas" name="areas">
<p class="text-muted">Add areas affected by this incident. Specify severity and population estimates for each area.</p>
<field name="incident_area_ids">
<p class="text-muted" invisible="status == 'closed'">Add areas affected by this incident. Specify severity and population estimates for each area.</p>
<field name="incident_area_ids" readonly="status == 'closed'">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For fields that contain child elements, it's better to place attributes on new lines for readability. This also makes it consistent with how other fields are formatted in this file.

                            <field name="incident_area_ids"
                                readonly="status == 'closed'">

<list editable="bottom">
<field name="area_id" options="{'no_create': True}"/>
<field name="severity_override"/>
Expand All @@ -94,7 +101,7 @@
</field>
</page>
<page string="Impacts" name="impacts">
<field name="impact_ids">
<field name="impact_ids" readonly="status == 'closed'">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For fields that contain child elements, it's better to place attributes on new lines for readability. This also makes it consistent with how other fields are formatted in this file.

                            <field name="impact_ids"
                                readonly="status == 'closed'">

<list>
<field name="registrant_id"/>
<field name="impact_type_id"/>
Expand Down
Loading