Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ repos:
- --branch=19.0
- --org-name=OpenSPP
- --repo-name=OpenSPP2
- --template-filename=tools/readme_template.rst.jinja
- --if-source-changed
- --keep-source-digest
- --convert-fragments-to-markdown
Expand Down
92 changes: 43 additions & 49 deletions spp_hazard/README.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
.. 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
=====================================

..
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:55e519b15a45175a4e6fc1033b24a2abcde053ea3f81a873af733d967618d343
!! source digest: sha256:6c799a070608a2c41e92173cb6e13783cda3e3e01c784f1d94decc3c6391a182
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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 @@ -51,27 +47,27 @@ Key Capabilities
Key Models
~~~~~~~~~~

+------------------------------+---------------------------------------+
| Model | Description |
+==============================+=======================================+
| ``spp.hazard.category`` | Hierarchical classification of hazard |
| | types |
+------------------------------+---------------------------------------+
| ``spp.hazard.incident`` | Specific disaster event with dates, |
| | severity, and affected areas |
+------------------------------+---------------------------------------+
| ``spp.hazard.incident.area`` | Links incident to area with |
| | area-specific details |
+------------------------------+---------------------------------------+
| ``spp.hazard.impact`` | Records impact on a registrant (type, |
| | damage level, verification) |
+------------------------------+---------------------------------------+
| ``spp.hazard.impact.type`` | Classification of impact types by |
| | category |
+------------------------------+---------------------------------------+
| ``res.partner`` (extended) | Adds hazard impact tracking fields to |
| | registrants |
+------------------------------+---------------------------------------+
+------------------------------+--------------------------------------+
| Model | Description |
+==============================+======================================+
| ``spp.hazard.category`` | Hierarchical classification of |
| | hazard types |
+------------------------------+--------------------------------------+
| ``spp.hazard.incident`` | Specific disaster event with dates, |
| | severity, and affected areas |
+------------------------------+--------------------------------------+
| ``spp.hazard.incident.area`` | Links incident to area with |
| | area-specific details |
+------------------------------+--------------------------------------+
| ``spp.hazard.impact`` | Records impact on a registrant |
| | (type, damage level, verification) |
+------------------------------+--------------------------------------+
| ``spp.hazard.impact.type`` | Classification of impact types by |
| | category |
+------------------------------+--------------------------------------+
| ``res.partner`` (extended) | Adds hazard impact tracking fields |
| | to registrants |
+------------------------------+--------------------------------------+

Configuration
~~~~~~~~~~~~~
Expand Down Expand Up @@ -100,20 +96,20 @@ UI Location
Security
~~~~~~~~

+----------------------------------+-----------------------------------+
| Group | Access |
+==================================+===================================+
| ``group_hazard_viewer`` | Read-only access to all hazard |
| | records |
+----------------------------------+-----------------------------------+
| ``group_hazard_officer`` | Create and manage incidents and |
| | impacts (no delete) |
+----------------------------------+-----------------------------------+
| ``group_hazard_manager`` | Full CRUD access including |
| | configuration |
+----------------------------------+-----------------------------------+
| ``spp_security.group_spp_admin`` | Inherits manager access |
+----------------------------------+-----------------------------------+
+----------------------------------+----------------------------------+
| Group | Access |
+==================================+==================================+
| ``group_hazard_viewer`` | Read-only access to all hazard |
| | records |
+----------------------------------+----------------------------------+
| ``group_hazard_officer`` | Create and manage incidents and |
| | impacts (no delete) |
+----------------------------------+----------------------------------+
| ``group_hazard_manager`` | Full CRUD access including |
| | configuration |
+----------------------------------+----------------------------------+
| ``spp_security.group_spp_admin`` | Inherits manager access |
+----------------------------------+----------------------------------+

Extension Points
~~~~~~~~~~~~~~~~
Expand All @@ -131,11 +127,6 @@ Dependencies

``base``, ``spp_security``, ``spp_registry``, ``spp_area``

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
Expand Down Expand Up @@ -171,10 +162,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
66 changes: 27 additions & 39 deletions spp_hazard/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>OpenSPP Hazard &amp; Emergency Management</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,27 +360,22 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="openspp-hazard-emergency-management">
<h1 class="title">OpenSPP Hazard &amp; Emergency Management</h1>


<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>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:55e519b15a45175a4e6fc1033b24a2abcde053ea3f81a873af733d967618d343
!! source digest: sha256:6c799a070608a2c41e92173cb6e13783cda3e3e01c784f1d94decc3c6391a182
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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
targeted emergency response and humanitarian assistance.</p>
<div class="section" id="key-capabilities">
<h2>Key Capabilities</h2>
<h1>Key Capabilities</h1>
<ul class="simple">
<li>Define hazard categories in a tree structure (e.g., Natural &gt; Storm &gt;
Typhoon)</li>
Expand All @@ -398,11 +393,11 @@ <h2>Key Capabilities</h2>
</ul>
</div>
<div class="section" id="key-models">
<h2>Key Models</h2>
<h1>Key Models</h1>
<table border="1" class="docutils">
<colgroup>
<col width="43%" />
<col width="57%" />
<col width="44%" />
<col width="56%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Model</th>
Expand All @@ -411,8 +406,8 @@ <h2>Key Models</h2>
</thead>
<tbody valign="top">
<tr><td><tt class="docutils literal">spp.hazard.category</tt></td>
<td>Hierarchical classification of hazard
types</td>
<td>Hierarchical classification of
hazard types</td>
</tr>
<tr><td><tt class="docutils literal">spp.hazard.incident</tt></td>
<td>Specific disaster event with dates,
Expand All @@ -423,22 +418,22 @@ <h2>Key Models</h2>
area-specific details</td>
</tr>
<tr><td><tt class="docutils literal">spp.hazard.impact</tt></td>
<td>Records impact on a registrant (type,
damage level, verification)</td>
<td>Records impact on a registrant
(type, damage level, verification)</td>
</tr>
<tr><td><tt class="docutils literal">spp.hazard.impact.type</tt></td>
<td>Classification of impact types by
category</td>
</tr>
<tr><td><tt class="docutils literal">res.partner</tt> (extended)</td>
<td>Adds hazard impact tracking fields to
registrants</td>
<td>Adds hazard impact tracking fields
to registrants</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="configuration">
<h2>Configuration</h2>
<h1>Configuration</h1>
<p>After installing:</p>
<ol class="arabic simple">
<li>Navigate to <strong>Hazard &amp; Emergency &gt; Configuration &gt; Hazard
Expand All @@ -451,7 +446,7 @@ <h2>Configuration</h2>
</ol>
</div>
<div class="section" id="ui-location">
<h2>UI Location</h2>
<h1>UI Location</h1>
<ul class="simple">
<li><strong>Menu</strong>: Hazard &amp; Emergency (top-level application menu)</li>
<li><strong>Incidents</strong>: Hazard &amp; Emergency &gt; Incidents &gt; All Incidents</li>
Expand All @@ -463,11 +458,11 @@ <h2>UI Location</h2>
</ul>
</div>
<div class="section" id="security">
<h2>Security</h2>
<h1>Security</h1>
<table border="1" class="docutils">
<colgroup>
<col width="49%" />
<col width="51%" />
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Group</th>
Expand All @@ -494,7 +489,7 @@ <h2>Security</h2>
</table>
</div>
<div class="section" id="extension-points">
<h2>Extension Points</h2>
<h1>Extension Points</h1>
<ul class="simple">
<li>Inherit <tt class="docutils literal">spp.hazard.incident</tt> and override
<tt class="docutils literal">identify_potentially_affected_registrants()</tt> to customize targeting
Expand All @@ -506,14 +501,8 @@ <h2>Extension Points</h2>
</ul>
</div>
<div class="section" id="dependencies">
<h2>Dependencies</h2>
<h1>Dependencies</h1>
<p><tt class="docutils literal">base</tt>, <tt class="docutils literal">spp_security</tt>, <tt class="docutils literal">spp_registry</tt>, <tt class="docutils literal">spp_area</tt></p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
</div>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -526,31 +515,30 @@ <h2>Dependencies</h2>
</ul>
</div>
<div class="section" id="bug-tracker">
<h3><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h3>
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/issues/new?body=module:%20spp_hazard%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h3><a class="toc-backref" href="#toc-entry-2">Credits</a></h3>
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
<div class="section" id="authors">
<h4><a class="toc-backref" href="#toc-entry-3">Authors</a></h4>
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
<ul class="simple">
<li>OpenSPP.org</li>
</ul>
</div>
<div class="section" id="maintainers">
<h4><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h4>
<h3><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h3>
<p>Current maintainers:</p>
<p><a class="reference external image-reference" href="https://github.com/jeremi"><img alt="jeremi" src="https://github.com/jeremi.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/gonzalesedwin1123"><img alt="gonzalesedwin1123" src="https://github.com/gonzalesedwin1123.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/reichie020212"><img alt="reichie020212" src="https://github.com/reichie020212.png?size=40px" /></a></p>
<p><a class="reference external image-reference" href="https://github.com/jeremi"><img alt="jeremi" src="https://github.com/jeremi.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/gonzalesedwin1123"><img alt="gonzalesedwin1123" src="https://github.com/gonzalesedwin1123.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/reichie020212"><img alt="reichie020212" src="https://github.com/reichie020212.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/emjay0921"><img alt="emjay0921" src="https://github.com/emjay0921.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_hazard">OpenSPP/OpenSPP2</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
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'"/>
Comment on lines +70 to +71

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
Loading
Loading