Skip to content

Commit 84c49ad

Browse files
Merge pull request #32 from OpenSPP/feat/hazard-beta-promotion
feat(spp_hazard): promote to Beta with UX improvements
2 parents 071686c + 4cade82 commit 84c49ad

File tree

7 files changed

+204
-100
lines changed

7 files changed

+204
-100
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ repos:
5656
- --branch=19.0
5757
- --org-name=OpenSPP
5858
- --repo-name=OpenSPP2
59+
- --template-filename=tools/readme_template.rst.jinja
5960
- --if-source-changed
6061
- --keep-source-digest
6162
- --convert-fragments-to-markdown

spp_hazard/README.rst

Lines changed: 43 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
=====================================
62
OpenSPP Hazard & Emergency Management
73
=====================================
84

9-
..
5+
..
106
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
117
!! This file is generated by oca-gen-addon-readme !!
128
!! changes will be overwritten. !!
139
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14-
!! source digest: sha256:55e519b15a45175a4e6fc1033b24a2abcde053ea3f81a873af733d967618d343
10+
!! source digest: sha256:6c799a070608a2c41e92173cb6e13783cda3e3e01c784f1d94decc3c6391a182
1511
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1612
17-
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
19-
:alt: Alpha
15+
:alt: Beta
2016
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
2218
:alt: License: LGPL-3
@@ -51,27 +47,27 @@ Key Capabilities
5147
Key Models
5248
~~~~~~~~~~
5349

54-
+------------------------------+---------------------------------------+
55-
| Model | Description |
56-
+==============================+=======================================+
57-
| ``spp.hazard.category`` | Hierarchical classification of hazard |
58-
| | types |
59-
+------------------------------+---------------------------------------+
60-
| ``spp.hazard.incident`` | Specific disaster event with dates, |
61-
| | severity, and affected areas |
62-
+------------------------------+---------------------------------------+
63-
| ``spp.hazard.incident.area`` | Links incident to area with |
64-
| | area-specific details |
65-
+------------------------------+---------------------------------------+
66-
| ``spp.hazard.impact`` | Records impact on a registrant (type, |
67-
| | damage level, verification) |
68-
+------------------------------+---------------------------------------+
69-
| ``spp.hazard.impact.type`` | Classification of impact types by |
70-
| | category |
71-
+------------------------------+---------------------------------------+
72-
| ``res.partner`` (extended) | Adds hazard impact tracking fields to |
73-
| | registrants |
74-
+------------------------------+---------------------------------------+
50+
+------------------------------+--------------------------------------+
51+
| Model | Description |
52+
+==============================+======================================+
53+
| ``spp.hazard.category`` | Hierarchical classification of |
54+
| | hazard types |
55+
+------------------------------+--------------------------------------+
56+
| ``spp.hazard.incident`` | Specific disaster event with dates, |
57+
| | severity, and affected areas |
58+
+------------------------------+--------------------------------------+
59+
| ``spp.hazard.incident.area`` | Links incident to area with |
60+
| | area-specific details |
61+
+------------------------------+--------------------------------------+
62+
| ``spp.hazard.impact`` | Records impact on a registrant |
63+
| | (type, damage level, verification) |
64+
+------------------------------+--------------------------------------+
65+
| ``spp.hazard.impact.type`` | Classification of impact types by |
66+
| | category |
67+
+------------------------------+--------------------------------------+
68+
| ``res.partner`` (extended) | Adds hazard impact tracking fields |
69+
| | to registrants |
70+
+------------------------------+--------------------------------------+
7571

7672
Configuration
7773
~~~~~~~~~~~~~
@@ -100,20 +96,20 @@ UI Location
10096
Security
10197
~~~~~~~~
10298

103-
+----------------------------------+-----------------------------------+
104-
| Group | Access |
105-
+==================================+===================================+
106-
| ``group_hazard_viewer`` | Read-only access to all hazard |
107-
| | records |
108-
+----------------------------------+-----------------------------------+
109-
| ``group_hazard_officer`` | Create and manage incidents and |
110-
| | impacts (no delete) |
111-
+----------------------------------+-----------------------------------+
112-
| ``group_hazard_manager`` | Full CRUD access including |
113-
| | configuration |
114-
+----------------------------------+-----------------------------------+
115-
| ``spp_security.group_spp_admin`` | Inherits manager access |
116-
+----------------------------------+-----------------------------------+
99+
+----------------------------------+----------------------------------+
100+
| Group | Access |
101+
+==================================+==================================+
102+
| ``group_hazard_viewer`` | Read-only access to all hazard |
103+
| | records |
104+
+----------------------------------+----------------------------------+
105+
| ``group_hazard_officer`` | Create and manage incidents and |
106+
| | impacts (no delete) |
107+
+----------------------------------+----------------------------------+
108+
| ``group_hazard_manager`` | Full CRUD access including |
109+
| | configuration |
110+
+----------------------------------+----------------------------------+
111+
| ``spp_security.group_spp_admin`` | Inherits manager access |
112+
+----------------------------------+----------------------------------+
117113

118114
Extension Points
119115
~~~~~~~~~~~~~~~~
@@ -131,11 +127,6 @@ Dependencies
131127

132128
``base``, ``spp_security``, ``spp_registry``, ``spp_area``
133129

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

141132
.. contents::
@@ -171,10 +162,13 @@ Maintainers
171162
.. |maintainer-reichie020212| image:: https://github.com/reichie020212.png?size=40px
172163
:target: https://github.com/reichie020212
173164
:alt: reichie020212
165+
.. |maintainer-emjay0921| image:: https://github.com/emjay0921.png?size=40px
166+
:target: https://github.com/emjay0921
167+
:alt: emjay0921
174168

175169
Current maintainers:
176170

177-
|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-reichie020212|
171+
|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-reichie020212| |maintainer-emjay0921|
178172

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

spp_hazard/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"author": "OpenSPP.org",
1414
"website": "https://github.com/OpenSPP/OpenSPP2",
1515
"license": "LGPL-3",
16-
"development_status": "Alpha",
17-
"maintainers": ["jeremi", "gonzalesedwin1123", "reichie020212"],
16+
"development_status": "Beta",
17+
"maintainers": ["jeremi", "gonzalesedwin1123", "reichie020212", "emjay0921"],
1818
"depends": [
1919
"base",
2020
"spp_security",

spp_hazard/static/description/index.html

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>OpenSPP Hazard &amp; Emergency Management</title>
77
<style type="text/css">
88

99
/*
@@ -360,27 +360,22 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="openspp-hazard-emergency-management">
364+
<h1 class="title">OpenSPP Hazard &amp; Emergency Management</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="openspp-hazard-emergency-management">
370-
<h1>OpenSPP Hazard &amp; Emergency Management</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375-
!! source digest: sha256:55e519b15a45175a4e6fc1033b24a2abcde053ea3f81a873af733d967618d343
370+
!! source digest: sha256:6c799a070608a2c41e92173cb6e13783cda3e3e01c784f1d94decc3c6391a182
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<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>
372+
<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>
378373
<p>Records disaster events and tracks their impact on individual
379374
registrants. Supports hierarchical hazard classification, geographic
380375
scope tracking, severity levels, and verification workflows to enable
381376
targeted emergency response and humanitarian assistance.</p>
382377
<div class="section" id="key-capabilities">
383-
<h2>Key Capabilities</h2>
378+
<h1>Key Capabilities</h1>
384379
<ul class="simple">
385380
<li>Define hazard categories in a tree structure (e.g., Natural &gt; Storm &gt;
386381
Typhoon)</li>
@@ -398,11 +393,11 @@ <h2>Key Capabilities</h2>
398393
</ul>
399394
</div>
400395
<div class="section" id="key-models">
401-
<h2>Key Models</h2>
396+
<h1>Key Models</h1>
402397
<table border="1" class="docutils">
403398
<colgroup>
404-
<col width="43%" />
405-
<col width="57%" />
399+
<col width="44%" />
400+
<col width="56%" />
406401
</colgroup>
407402
<thead valign="bottom">
408403
<tr><th class="head">Model</th>
@@ -411,8 +406,8 @@ <h2>Key Models</h2>
411406
</thead>
412407
<tbody valign="top">
413408
<tr><td><tt class="docutils literal">spp.hazard.category</tt></td>
414-
<td>Hierarchical classification of hazard
415-
types</td>
409+
<td>Hierarchical classification of
410+
hazard types</td>
416411
</tr>
417412
<tr><td><tt class="docutils literal">spp.hazard.incident</tt></td>
418413
<td>Specific disaster event with dates,
@@ -423,22 +418,22 @@ <h2>Key Models</h2>
423418
area-specific details</td>
424419
</tr>
425420
<tr><td><tt class="docutils literal">spp.hazard.impact</tt></td>
426-
<td>Records impact on a registrant (type,
427-
damage level, verification)</td>
421+
<td>Records impact on a registrant
422+
(type, damage level, verification)</td>
428423
</tr>
429424
<tr><td><tt class="docutils literal">spp.hazard.impact.type</tt></td>
430425
<td>Classification of impact types by
431426
category</td>
432427
</tr>
433428
<tr><td><tt class="docutils literal">res.partner</tt> (extended)</td>
434-
<td>Adds hazard impact tracking fields to
435-
registrants</td>
429+
<td>Adds hazard impact tracking fields
430+
to registrants</td>
436431
</tr>
437432
</tbody>
438433
</table>
439434
</div>
440435
<div class="section" id="configuration">
441-
<h2>Configuration</h2>
436+
<h1>Configuration</h1>
442437
<p>After installing:</p>
443438
<ol class="arabic simple">
444439
<li>Navigate to <strong>Hazard &amp; Emergency &gt; Configuration &gt; Hazard
@@ -451,7 +446,7 @@ <h2>Configuration</h2>
451446
</ol>
452447
</div>
453448
<div class="section" id="ui-location">
454-
<h2>UI Location</h2>
449+
<h1>UI Location</h1>
455450
<ul class="simple">
456451
<li><strong>Menu</strong>: Hazard &amp; Emergency (top-level application menu)</li>
457452
<li><strong>Incidents</strong>: Hazard &amp; Emergency &gt; Incidents &gt; All Incidents</li>
@@ -463,11 +458,11 @@ <h2>UI Location</h2>
463458
</ul>
464459
</div>
465460
<div class="section" id="security">
466-
<h2>Security</h2>
461+
<h1>Security</h1>
467462
<table border="1" class="docutils">
468463
<colgroup>
469-
<col width="49%" />
470-
<col width="51%" />
464+
<col width="50%" />
465+
<col width="50%" />
471466
</colgroup>
472467
<thead valign="bottom">
473468
<tr><th class="head">Group</th>
@@ -494,7 +489,7 @@ <h2>Security</h2>
494489
</table>
495490
</div>
496491
<div class="section" id="extension-points">
497-
<h2>Extension Points</h2>
492+
<h1>Extension Points</h1>
498493
<ul class="simple">
499494
<li>Inherit <tt class="docutils literal">spp.hazard.incident</tt> and override
500495
<tt class="docutils literal">identify_potentially_affected_registrants()</tt> to customize targeting
@@ -506,14 +501,8 @@ <h2>Extension Points</h2>
506501
</ul>
507502
</div>
508503
<div class="section" id="dependencies">
509-
<h2>Dependencies</h2>
504+
<h1>Dependencies</h1>
510505
<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>
511-
<div class="admonition important">
512-
<p class="first admonition-title">Important</p>
513-
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
514-
Only for development or testing purpose, do not use in production.
515-
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
516-
</div>
517506
<p><strong>Table of contents</strong></p>
518507
<div class="contents local topic" id="contents">
519508
<ul class="simple">
@@ -526,31 +515,30 @@ <h2>Dependencies</h2>
526515
</ul>
527516
</div>
528517
<div class="section" id="bug-tracker">
529-
<h3><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h3>
518+
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
530519
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/issues">GitHub Issues</a>.
531520
In case of trouble, please check there if your issue has already been reported.
532521
If you spotted it first, help us to smash it by providing a detailed and welcomed
533522
<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>
534523
<p>Do not contact contributors directly about support or help with technical issues.</p>
535524
</div>
536525
<div class="section" id="credits">
537-
<h3><a class="toc-backref" href="#toc-entry-2">Credits</a></h3>
526+
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
538527
<div class="section" id="authors">
539-
<h4><a class="toc-backref" href="#toc-entry-3">Authors</a></h4>
528+
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
540529
<ul class="simple">
541530
<li>OpenSPP.org</li>
542531
</ul>
543532
</div>
544533
<div class="section" id="maintainers">
545-
<h4><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h4>
534+
<h3><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h3>
546535
<p>Current maintainers:</p>
547-
<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>
536+
<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>
548537
<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>
549538
<p>You are welcome to contribute.</p>
550539
</div>
551540
</div>
552541
</div>
553542
</div>
554-
</div>
555543
</body>
556544
</html>

spp_hazard/views/hazard_impact_views.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
name="registrant_id"
8080
placeholder="Select Registrant..."
8181
options="{'no_create': True}"
82+
readonly="verification_status == 'closed'"
8283
/>
8384
</h1>
8485
<label for="incident_id" />
@@ -87,6 +88,7 @@
8788
name="incident_id"
8889
placeholder="Select Incident..."
8990
options="{'no_create': True}"
91+
readonly="verification_status == 'closed'"
9092
/>
9193
</h2>
9294
</div>
@@ -98,9 +100,16 @@
98100
<field
99101
name="impact_type_id"
100102
options="{'no_create': True}"
103+
readonly="verification_status == 'closed'"
104+
/>
105+
<field
106+
name="damage_level"
107+
readonly="verification_status == 'closed'"
108+
/>
109+
<field
110+
name="impact_date"
111+
readonly="verification_status == 'closed'"
101112
/>
102-
<field name="damage_level" />
103-
<field name="impact_date" />
104113
</group>
105114
</group>
106115
<group
@@ -118,6 +127,7 @@
118127
<field
119128
name="notes"
120129
placeholder="Additional details about the impact..."
130+
readonly="verification_status == 'closed'"
121131
/>
122132
</page>
123133
</notebook>

0 commit comments

Comments
 (0)