diff --git a/spp_base_spmis/README.rst b/spp_base_spmis/README.rst index c72d1d467..2d6e95ed5 100644 --- a/spp_base_spmis/README.rst +++ b/spp_base_spmis/README.rst @@ -45,10 +45,6 @@ modules, offering: gender details, and a clear distinction of registrant type (e.g., individual, group). This enables more comprehensive data capture and analysis for beneficiaries. -- **Top-up Card Management**: Supports the integration and validation - of Top-up Cards as a specific form of identification within the - system. This is crucial for programs utilizing physical cards for - beneficiary interactions. - **Core UI and Role Configuration**: Provides fundamental user interface elements and initial security configurations, including global and local user roles. This ensures a consistent look and feel @@ -74,10 +70,6 @@ integrating their features and extending them for OpenSPP: like `OpenSPP Area `__ and `OpenSPP Service Points `__ by providing the underlying registrant framework and unique identifiers used across the system. -- It supports identity management features such as - `spp_idpass `__ and `spp_idqueue `__ by - defining the 'Top-up Card' ID type and its validation rules, crucial - for card issuance and tracking. - OpenSPP Base underpins UI customization and filtering through `OpenSPP Custom Field `__, `OpenSPP Custom Fields UI `__, `OpenSPP Hide @@ -115,15 +107,6 @@ household). This module also integrates ``Gender`` information into individual and group membership records, allowing for more detailed demographic analysis of beneficiary populations. -Top-Up Card Identification -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -OpenSPP Base manages the specific ``Top-up Card`` identification type, -including its unique identifier (``Card UID``). The system ensures data -accuracy by validating that all entered Top-up Card UIDs are exactly 10 -characters long. This standardization is essential for reliable card -issuance, tracking, and usage in program distributions. - Foundational UI and Role Configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/spp_base_spmis/__manifest__.py b/spp_base_spmis/__manifest__.py index 665267d5d..b2b138f4c 100644 --- a/spp_base_spmis/__manifest__.py +++ b/spp_base_spmis/__manifest__.py @@ -50,7 +50,6 @@ ] }, # not directly required, pinned by Snyk to avoid a vulnerability and for fastapi, compatibility issues. "data": [ - "data/top_up_card.xml", "security/ir.model.access.csv", "views/registrant_view.xml", "views/users_view.xml", @@ -61,5 +60,5 @@ "application": True, "installable": True, "auto_install": False, - "summary": "Establishes core system settings and generates unique identifiers for records, enhancing registrant profiles with attributes like tags, gender, and type. The module also integrates Top-up Cards for identification and provides fundamental user interface elements with initial security configurations for user roles.", + "summary": "Establishes core system settings and generates unique identifiers for records, enhancing registrant profiles with attributes like tags, gender, and type.", } diff --git a/spp_base_spmis/data/top_up_card.xml b/spp_base_spmis/data/top_up_card.xml deleted file mode 100644 index 2828683bb..000000000 --- a/spp_base_spmis/data/top_up_card.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Top-up Card - - diff --git a/spp_base_spmis/i18n/lo.po b/spp_base_spmis/i18n/lo.po index df4ed11d3..b36546020 100644 --- a/spp_base_spmis/i18n/lo.po +++ b/spp_base_spmis/i18n/lo.po @@ -14,11 +14,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" -#. module: spp_base_spmis -#: model:ir.model.fields,field_description:spp_base_spmis.field_g2p_reg_id__card_uid -msgid "Card UID" -msgstr "" - #. module: spp_base_spmis #: model:ir.model,name:spp_base_spmis.model_res_partner msgid "Contact" @@ -59,13 +54,6 @@ msgstr "" msgid "String Kind" msgstr "" -#. module: spp_base_spmis -#. odoo-python -#: code:addons/spp_base_spmis/models/reg_id.py:0 -#, python-format -msgid "Top-up Card UID should have 10 characters" -msgstr "" - #. module: spp_base_spmis #: model:ir.model,name:spp_base_spmis.model_spp_unique_id #: model:ir.model.fields,field_description:spp_base_spmis.field_spp_unique_id__spp_id diff --git a/spp_base_spmis/i18n/spp_base.pot b/spp_base_spmis/i18n/spp_base.pot index dcfb362a5..2523b3284 100644 --- a/spp_base_spmis/i18n/spp_base.pot +++ b/spp_base_spmis/i18n/spp_base.pot @@ -13,11 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: spp_base_spmis -#: model:ir.model.fields,field_description:spp_base_spmis.field_g2p_reg_id__card_uid -msgid "Card UID" -msgstr "" - #. module: spp_base_spmis #: model:ir.model,name:spp_base_spmis.model_res_partner msgid "Contact" @@ -58,13 +53,6 @@ msgstr "" msgid "String Kind" msgstr "" -#. module: spp_base_spmis -#. odoo-python -#: code:addons/spp_base/models/reg_id.py:0 -#, python-format -msgid "Top-up Card UID should have 10 characters" -msgstr "" - #. module: spp_base_spmis #: model:ir.model,name:spp_base_spmis.model_spp_unique_id #: model:ir.model.fields,field_description:spp_base_spmis.field_spp_unique_id__spp_id diff --git a/spp_base_spmis/i18n/spp_base_spmis.pot b/spp_base_spmis/i18n/spp_base_spmis.pot index 9e639ad2c..a8a0f5978 100644 --- a/spp_base_spmis/i18n/spp_base_spmis.pot +++ b/spp_base_spmis/i18n/spp_base_spmis.pot @@ -13,11 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: spp_base_spmis -#: model:ir.model.fields,field_description:spp_base_spmis.field_g2p_reg_id__card_uid -msgid "Card UID" -msgstr "" - #. module: spp_base_spmis #: model:ir.model,name:spp_base_spmis.model_res_partner msgid "Contact" @@ -58,13 +53,6 @@ msgstr "" msgid "String Kind" msgstr "" -#. module: spp_base_spmis -#. odoo-python -#: code:addons/spp_base_spmis/models/reg_id.py:0 -#, python-format -msgid "Top-up Card UID should have 10 characters" -msgstr "" - #. module: spp_base_spmis #: model:ir.model,name:spp_base_spmis.model_spp_unique_id #: model:ir.model.fields,field_description:spp_base_spmis.field_spp_unique_id__spp_id diff --git a/spp_base_spmis/models/__init__.py b/spp_base_spmis/models/__init__.py index 0a1be4dd6..afb95588f 100644 --- a/spp_base_spmis/models/__init__.py +++ b/spp_base_spmis/models/__init__.py @@ -1,6 +1,5 @@ # Part of OpenSPP. See LICENSE file for full copyright and licensing details. -from . import reg_id from . import spp_unique_id from . import registrant from . import group_membership diff --git a/spp_base_spmis/models/reg_id.py b/spp_base_spmis/models/reg_id.py deleted file mode 100644 index 3d5b3541a..000000000 --- a/spp_base_spmis/models/reg_id.py +++ /dev/null @@ -1,19 +0,0 @@ -# Part of OpenSPP. See LICENSE file for full copyright and licensing details. -import logging - -from odoo import _, api, fields, models -from odoo.exceptions import ValidationError - -_logger = logging.getLogger(__name__) - - -class OpenSPPRegistrantID(models.Model): - _inherit = "g2p.reg.id" - - card_uid = fields.Char("Card UID") - - @api.constrains("card_uid", "id_type") - def _check_card_uid(self): - for rec in self: - if rec.id_type.id == self.env.ref("spp_base_spmis.id_top_up_card").id and len(str(rec.card_uid)) != 10: - raise ValidationError(_("Top-up Card UID should have 10 characters")) diff --git a/spp_base_spmis/readme/DESCRIPTION.md b/spp_base_spmis/readme/DESCRIPTION.md index bceb57168..cff609a69 100644 --- a/spp_base_spmis/readme/DESCRIPTION.md +++ b/spp_base_spmis/readme/DESCRIPTION.md @@ -8,7 +8,6 @@ The OpenSPP Base module establishes the core framework and essential capabilitie * **System Foundation**: Establishes core system settings and a mechanism for generating unique identifiers for various records. This ensures consistent data tracking and integrity across all OpenSPP modules. * **Enhanced Registrant Profiles**: Extends the base registrant model to include additional, critical information such as registrant tags, gender details, and a clear distinction of registrant type (e.g., individual, group). This enables more comprehensive data capture and analysis for beneficiaries. -* **Top-up Card Management**: Supports the integration and validation of Top-up Cards as a specific form of identification within the system. This is crucial for programs utilizing physical cards for beneficiary interactions. * **Core UI and Role Configuration**: Provides fundamental user interface elements and initial security configurations, including global and local user roles. This ensures a consistent look and feel and lays the groundwork for robust access control. * **Integration Enabler**: Serves as a central integration point, allowing other OpenSPP modules to seamlessly interact with core registrant data and system settings. @@ -18,7 +17,6 @@ The OpenSPP Base module is deeply integrated into the OpenSPP ecosystem, extendi * It extends the core G2P Registry models, including `res.partner` (registrants), `g2p.reg.id` (registrant IDs), and `g2p.group.membership` (group memberships) from [G2P Registry Base](g2p_registry_base), [G2P Registry Individual](g2p_registry_individual), and [G2P Registry Group](g2p_registry_group). This provides foundational data structures for all registrants. * This module integrates with geographical and service delivery modules like [OpenSPP Area](spp_area) and [OpenSPP Service Points](spp_service_points) by providing the underlying registrant framework and unique identifiers used across the system. -* It supports identity management features such as [spp_idpass](spp_idpass) and [spp_idqueue](spp_idqueue) by defining the 'Top-up Card' ID type and its validation rules, crucial for card issuance and tracking. * OpenSPP Base underpins UI customization and filtering through [OpenSPP Custom Field](spp_custom_field), [OpenSPP Custom Fields UI](spp_custom_fields_ui), [OpenSPP Hide Menus](spp_hide_menus), and [OpenSPP Custom Filter UI](spp_custom_filter_ui), establishing common interface elements and simplifying user workflows. * It defines global and local roles, which are utilized by [OpenSPP User Roles](spp_user_roles) to manage permissions and access control for users based on their responsibilities and assigned areas. @@ -34,10 +32,6 @@ The module provides a robust system for generating unique identifiers for variou It extends the core registrant profile by adding critical fields for more comprehensive data capture. Users can assign multiple `Registrant Tags` for flexible categorization and reporting, and easily see the `String Kind` of a registrant (e.g., individual, household). This module also integrates `Gender` information into individual and group membership records, allowing for more detailed demographic analysis of beneficiary populations. -### Top-Up Card Identification - -OpenSPP Base manages the specific `Top-up Card` identification type, including its unique identifier (`Card UID`). The system ensures data accuracy by validating that all entered Top-up Card UIDs are exactly 10 characters long. This standardization is essential for reliable card issuance, tracking, and usage in program distributions. - ### Foundational UI and Role Configuration This module establishes the fundamental user interface components and initial security settings for the OpenSPP platform. It pre-defines `Global Roles` and `Local Roles` to streamline user permission management and sets up the basic views for interacting with registrants and user accounts. This ensures a secure, consistent, and user-friendly operating environment from the outset. diff --git a/spp_base_spmis/static/description/index.html b/spp_base_spmis/static/description/index.html index 7cdcf6d34..7bb7560ee 100644 --- a/spp_base_spmis/static/description/index.html +++ b/spp_base_spmis/static/description/index.html @@ -311,8 +311,6 @@

Module Dependencies and Integration

Additional Functionality

The OpenSPP SPMIS Base module introduces the following key functionalities:

    -
  • Top-up Card ID Type: Adds a new ID type specifically for managing "Top-up Cards", including a dedicated field (card_uid) for storing the unique 10-character UID of each card.
  • -
  • Registrant View Enhancements: Modifies the registrant views (both individual and group) to include the card_uid field, making it accessible for data entry and display.
  • Menu Icon Customization: Replaces the default icon for the "Registry" menu item with a custom OpenSPP icon, enhancing visual branding.
  • Menu Item Hiding: Hides specific menu items related to "Link Tracker" and "Discuss" to streamline the OpenSPP user interface and focus on relevant functionalities.
diff --git a/spp_base_spmis/tests/__init__.py b/spp_base_spmis/tests/__init__.py index 747b628e6..0911eb5e5 100644 --- a/spp_base_spmis/tests/__init__.py +++ b/spp_base_spmis/tests/__init__.py @@ -1,3 +1 @@ # Part of OpenSPP Registry. See LICENSE file for full copyright and licensing details. - -from . import test_top_up_id diff --git a/spp_base_spmis/tests/test_top_up_id.py b/spp_base_spmis/tests/test_top_up_id.py deleted file mode 100644 index b84ac9c8c..000000000 --- a/spp_base_spmis/tests/test_top_up_id.py +++ /dev/null @@ -1,20 +0,0 @@ -from odoo.exceptions import ValidationError -from odoo.tests import TransactionCase -from odoo.tools import mute_logger - - -class TestTopUpID(TransactionCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - vals = {"name": "Test Group 1", "is_group": True, "is_registrant": True} - cls.test_group = cls.env["res.partner"].create(vals) - - @mute_logger("py.warnings") - def test_01_create_and_check_error(self): - vals = { - "id_type": self.env.ref("spp_base_spmis.id_top_up_card").id, - "card_uid": 123456789, - } - with self.assertRaisesRegex(ValidationError, "Top-up Card UID should have 10 characters"): - self.test_group.write({"reg_ids": [(0, 0, vals)]}) diff --git a/spp_base_spmis/views/registrant_view.xml b/spp_base_spmis/views/registrant_view.xml index d02fc554a..f8ff70ecd 100644 --- a/spp_base_spmis/views/registrant_view.xml +++ b/spp_base_spmis/views/registrant_view.xml @@ -1,15 +1,11 @@ - view_group_spp_base_spmis_form res.partner 1000 - - - @@ -52,9 +48,6 @@ 1000 - - - @@ -90,7 +83,6 @@ - view_individuals_list_spmis_tree res.partner