From 4380308a2f64a745cfc9205c450dca0f311cb475 Mon Sep 17 00:00:00 2001 From: emjay0921 Date: Thu, 12 Feb 2026 12:36:38 +0800 Subject: [PATCH 1/2] feat(spp_hazard): promote to Beta, add readonly on closed, add maintainer - Set development_status to Beta - Add emjay0921 as maintainer - Make impact records readonly when verification_status is closed - Make incident forms readonly when status is closed - Remove OCA banner from README --- spp_hazard/README.rst | 13 +++++------ spp_hazard/__manifest__.py | 4 ++-- spp_hazard/static/description/index.html | 5 +--- spp_hazard/views/hazard_impact_views.xml | 20 +++++++++++----- spp_hazard/views/hazard_incident_views.xml | 27 ++++++++++++++-------- 5 files changed, 40 insertions(+), 29 deletions(-) diff --git a/spp_hazard/README.rst b/spp_hazard/README.rst index 5621da3..7d5bed9 100644 --- a/spp_hazard/README.rst +++ b/spp_hazard/README.rst @@ -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 ===================================== @@ -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 @@ -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 `_ project on GitHub. diff --git a/spp_hazard/__manifest__.py b/spp_hazard/__manifest__.py index 77ec717..794e332 100644 --- a/spp_hazard/__manifest__.py +++ b/spp_hazard/__manifest__.py @@ -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", diff --git a/spp_hazard/static/description/index.html b/spp_hazard/static/description/index.html index fc51131..20cabb5 100644 --- a/spp_hazard/static/description/index.html +++ b/spp_hazard/static/description/index.html @@ -363,9 +363,6 @@
- -Odoo Community Association -

OpenSPP Hazard & Emergency Management

-

Alpha License: LGPL-3 OpenSPP/OpenSPP2

+

Beta License: LGPL-3 OpenSPP/OpenSPP2

Records disaster events and tracks their impact on individual registrants. Supports hierarchical hazard classification, geographic scope tracking, severity levels, and verification workflows to enable diff --git a/spp_hazard/views/hazard_impact_views.xml b/spp_hazard/views/hazard_impact_views.xml index a0e7937..3d7933e 100644 --- a/spp_hazard/views/hazard_impact_views.xml +++ b/spp_hazard/views/hazard_impact_views.xml @@ -51,11 +51,15 @@

@@ -63,9 +67,12 @@ - - - + + + - + diff --git a/spp_hazard/views/hazard_incident_views.xml b/spp_hazard/views/hazard_incident_views.xml index 7324135..75b9101 100644 --- a/spp_hazard/views/hazard_incident_views.xml +++ b/spp_hazard/views/hazard_incident_views.xml @@ -63,28 +63,35 @@
- - - + + + - - + + - + -

Add areas affected by this incident. Specify severity and population estimates for each area.

- +

Add areas affected by this incident. Specify severity and population estimates for each area.

+ @@ -94,7 +101,7 @@
- + From 473e01da8823aec4456b16b00b5ceecc65342994 Mon Sep 17 00:00:00 2001 From: emjay0921 Date: Thu, 12 Feb 2026 12:50:09 +0800 Subject: [PATCH 2/2] chore: add readme template and regenerate spp_hazard README Add custom tools/readme_template.rst.jinja to avoid OCA banner in generated READMEs. Add --template-filename to pre-commit config. Regenerate spp_hazard README with correct template. --- .pre-commit-config.yaml | 1 + spp_hazard/README.rst | 81 ++++++++++---------- spp_hazard/static/description/index.html | 61 +++++++-------- tools/readme_template.rst.jinja | 94 ++++++++++++++++++++++++ 4 files changed, 159 insertions(+), 78 deletions(-) create mode 100644 tools/readme_template.rst.jinja diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d48cbec..0c737b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/spp_hazard/README.rst b/spp_hazard/README.rst index 7d5bed9..a7244fa 100644 --- a/spp_hazard/README.rst +++ b/spp_hazard/README.rst @@ -2,12 +2,12 @@ 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-Beta-yellow.png @@ -47,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 ~~~~~~~~~~~~~ @@ -96,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 ~~~~~~~~~~~~~~~~ @@ -127,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 `_ - **Table of contents** .. contents:: @@ -173,7 +168,7 @@ Maintainers Current maintainers: -|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-reichie020212| |maintainer-emjay0921| +|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-reichie020212| |maintainer-emjay0921| This module is part of the `OpenSPP/OpenSPP2 `_ project on GitHub. diff --git a/spp_hazard/static/description/index.html b/spp_hazard/static/description/index.html index 20cabb5..8bac9cf 100644 --- a/spp_hazard/static/description/index.html +++ b/spp_hazard/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +OpenSPP Hazard & Emergency Management -
+
+

OpenSPP Hazard & Emergency Management

- -
-

OpenSPP Hazard & Emergency Management

Beta License: LGPL-3 OpenSPP/OpenSPP2

Records disaster events and tracks their impact on individual @@ -377,7 +375,7 @@

OpenSPP Hazard & Emergency Management

scope tracking, severity levels, and verification workflows to enable targeted emergency response and humanitarian assistance.

-

Key Capabilities

+

Key Capabilities

  • Define hazard categories in a tree structure (e.g., Natural > Storm > Typhoon)
  • @@ -395,11 +393,11 @@

    Key Capabilities

-

Key Models

+

Key Models

--++ @@ -408,8 +406,8 @@

Key Models

- + - + - +
Model
spp.hazard.categoryHierarchical classification of hazard -typesHierarchical classification of +hazard types
spp.hazard.incident Specific disaster event with dates, @@ -420,22 +418,22 @@

Key Models

area-specific details
spp.hazard.impactRecords impact on a registrant (type, -damage level, verification)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 -registrantsAdds hazard impact tracking fields +to registrants
-

Configuration

+

Configuration

After installing:

  1. Navigate to Hazard & Emergency > Configuration > Hazard @@ -448,7 +446,7 @@

    Configuration

-

UI Location

+

UI Location

  • Menu: Hazard & Emergency (top-level application menu)
  • Incidents: Hazard & Emergency > Incidents > All Incidents
  • @@ -460,11 +458,11 @@

    UI Location

-

Security

+

Security

--++ @@ -491,7 +489,7 @@

Security

Group
-

Extension Points

+

Extension Points

  • Inherit spp.hazard.incident and override identify_potentially_affected_registrants() to customize targeting @@ -503,14 +501,8 @@

    Extension Points

-

Dependencies

+

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

-

Table of contents

    @@ -523,7 +515,7 @@

    Dependencies

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. 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 @@ -531,23 +523,22 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • OpenSPP.org
-

Maintainers

+

Maintainers

Current maintainers:

-

jeremi gonzalesedwin1123 reichie020212

+

jeremi gonzalesedwin1123 reichie020212 emjay0921

This module is part of the OpenSPP/OpenSPP2 project on GitHub.

You are welcome to contribute.

-
diff --git a/tools/readme_template.rst.jinja b/tools/readme_template.rst.jinja new file mode 100644 index 0000000..e7b666c --- /dev/null +++ b/tools/readme_template.rst.jinja @@ -0,0 +1,94 @@ +{%- macro fragment(name, title, sub='=') %} +{%- if name in fragments %} +{{- title }} +{{ sub * title|length }} + +{{ fragments[name] }} +{% endif %} +{%- endmacro -%} + +{{ '=' * manifest.name|length }} +{{ manifest.name }} +{{ '=' * manifest.name|length }} + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: {{ source_digest }} + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +{% for (image, target, alt) in badges -%} +.. |badge{{ loop.index }}| image:: {{ image }} + :target: {{ target or '#' }} + {%- if alt %} + :alt: {{ alt }} + {%- endif %} +{% endfor %} +{% for _ in badges %}|badge{{ loop.index }}|{% if loop.index != badges|length %} {% endif %}{% endfor %} + +{{ fragments.get('DESCRIPTION', '') }} +{% if development_status == 'alpha' -%} + +.. 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. + +{% endif -%} + +**Table of contents** + +.. contents:: + :local: + +{{ fragment('CONTEXT', 'Use Cases / Context') }} +{{- fragment('INSTALL', 'Installation') }} +{{- fragment('CONFIGURE', 'Configuration') }} +{{- fragment('USAGE', 'Usage') }} +{{- fragment('DEVELOP', 'Development') }} +{{- fragment('ROADMAP', 'Known issues / Roadmap') -}} +{{- fragment('HISTORY', 'Changelog') -}} +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +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 +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +{% if authors -%} +Authors +{{ level3_underline * 7 }} + +{% for author in authors -%} +* {{ author }} +{% endfor %} +{% endif -%} + +{{ fragment('CONTRIBUTORS', 'Contributors', sub=level3_underline) }} +{{- fragment('CREDITS', 'Other credits', sub=level3_underline) -}} +Maintainers +{{ level3_underline * 11 }} + +{%- if manifest.maintainers %} +{% for maintainer in manifest.maintainers %} +.. |maintainer-{{ maintainer }}| image:: https://github.com/{{ maintainer }}.png?size=40px + :target: https://github.com/{{ maintainer }} + :alt: {{ maintainer}} +{%- endfor %} + +Current maintainer{% if manifest.maintainers|length > 1 %}s{% endif %}: + +{% for maintainer in manifest.maintainers %}|maintainer-{{ maintainer }}| {% endfor -%} +{% endif %} + +This module is part of the `{{ org_name }}/{{ repo_name }} `_ project on GitHub. + +You are welcome to contribute. +