Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
rm -rf /opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/g2p_registry_individual/tests
- name: Run SP-MIS tests
env:
EXCLUDE: "fastapi,g2p_auth_id_oidc,g2p_auth_oidc,g2p_bank,g2p_bank_rest_api,g2p_change_log,g2p_disable_password_login,g2p_encryption,g2p_encryption_keymanager,g2p_encryption_rest_api,g2p_entitlement_differential,g2p_entitlement_in_kind,g2p_entitlement_voucher,g2p_enumerator,g2p_formio,g2p_mis_importer,g2p_mts,g2p_notifications_base,g2p_notifications_fast2sms,g2p_notifications_voucher,g2p_notifications_wiserv,g2p_odk_importer,g2p_odk_importer_program,g2p_odk_user_mapping,g2p_openid_vci,g2p_openid_vci_programs,g2p_openid_vci_rest_api,g2p_payment_cash,g2p_payment_files,g2p_payment_g2p_connect,g2p_payment_interop_layer,g2p_payment_phee,g2p_payment_simple_mpesa,g2p_portal_auth,g2p_profile_image,g2p_program_approval,g2p_program_assessment,g2p_program_autoenrol,g2p_program_cycleless,g2p_program_documents,g2p_program_registrant_info,g2p_program_reimbursement,g2p_programs,g2p_proxy_means_test,g2p_registry_addl_info,g2p_registry_base,g2p_registry_encryption,g2p_registry_group,g2p_registry_individual,g2p_registry_membership,g2p_registry_rest_api,g2p_service_provider_beneficiary_management,g2p_service_provider_portal_base,g2p_social_registry_importer,g2p_superset_dashboard,g2p_theme,mts_connector,muk_product,muk_web_appsbar,muk_web_chatter,muk_web_colors,muk_web_dialog,muk_web_theme,spp_user_roles,spp_change_request_add_farmer,spp_farmer_registry_base,spp_farmer_registry_dashboard,spp_farmer_registry_default_ui,spp_farmer_registry_demo"
EXCLUDE: "fastapi,g2p_auth_id_oidc,g2p_auth_oidc,g2p_bank,g2p_bank_rest_api,g2p_change_log,g2p_disable_password_login,g2p_encryption,g2p_encryption_keymanager,g2p_encryption_rest_api,g2p_entitlement_differential,g2p_entitlement_in_kind,g2p_entitlement_voucher,g2p_enumerator,g2p_formio,g2p_mis_importer,g2p_mts,g2p_notifications_base,g2p_notifications_fast2sms,g2p_notifications_voucher,g2p_notifications_wiserv,g2p_odk_importer,g2p_odk_importer_program,g2p_odk_user_mapping,g2p_openid_vci,g2p_openid_vci_programs,g2p_openid_vci_rest_api,g2p_payment_cash,g2p_payment_files,g2p_payment_g2p_connect,g2p_payment_interop_layer,g2p_payment_phee,g2p_payment_simple_mpesa,g2p_portal_auth,g2p_profile_image,g2p_program_approval,g2p_program_assessment,g2p_program_autoenrol,g2p_program_cycleless,g2p_program_documents,g2p_program_registrant_info,g2p_program_reimbursement,g2p_programs,g2p_proxy_means_test,g2p_registry_addl_info,g2p_registry_base,g2p_registry_encryption,g2p_registry_group,g2p_registry_individual,g2p_registry_membership,g2p_registry_rest_api,g2p_service_provider_beneficiary_management,g2p_service_provider_portal_base,g2p_social_registry_importer,g2p_superset_dashboard,g2p_theme,mts_connector,muk_product,muk_web_appsbar,muk_web_chatter,muk_web_colors,muk_web_dialog,muk_web_theme,spp_user_roles,spp_change_request_add_farmer,spp_farmer_registry_base,spp_farmer_registry_dashboard,spp_farmer_registry_default_ui,spp_farmer_registry_demo,spp_custom_filter_farmer_registry"
run: oca_run_tests
- name: Initialize farmer_registry db
env:
Expand Down
1 change: 1 addition & 0 deletions spp_base/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"spp_hide_menus",
"spp_programs",
"spp_user_roles",
"spp_custom_filter_ui",
],
"excludes": [
"spp_farmer_registry_base",
Expand Down
2 changes: 1 addition & 1 deletion spp_base/models/registrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
class OpenSPPResPartner(models.Model):
_inherit = "res.partner"

tags_ids = fields.Many2many("g2p.registrant.tags", string="Registrant Tags")
tags_ids = fields.Many2many("g2p.registrant.tags", string="Registrant Tags", allow_filter=True)
kind_as_str = fields.Char(related="kind.name", string="String Kind")
112 changes: 112 additions & 0 deletions spp_custom_filter_farmer_registry/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
=====================================
OpenSPP Custom Filter Farmer Registry
=====================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OpenSPP%2Fopenspp--modules-lightgray.png?logo=github
:target: https://github.com/OpenSPP/openspp-modules/tree/17.0/spp_custom_filter_farmer_registry
:alt: OpenSPP/openspp-modules

|badge1| |badge2| |badge3|

OpenSPP Custom Filter Farmer Registry
=====================================

Overview
--------

The **SPP Custom Filter Farmer Registry** module customizes the user interface (UI)
for filtering in specific OpenSPP modules, enhancing usability and
simplifying data management. It builds upon the
`spp_custom_filter_farmer_registry <spp_custom_filter_farmer_registry>`__ module, which
provides the underlying functionality for controlling which fields are displayed in
filter dropdown menus.

This module is specifically designed to customize the filtering UI for the **Res Partner** model,
which is widely used within OpenSPP to represent registrants. By selectively exposing only the
most relevant fields for filtering, the module seeks to streamline user workflows and enhance
the overall experience within the OpenSPP system.

Purpose
-------

The primary purpose of the **SPP Custom Filter Farmer Registry** module is to:

- **Enhance Usability**: Simplify the filtering process for users by presenting a more focused
and relevant set of filterable fields, minimizing visual clutter and reducing cognitive overload.
- **Improve Efficiency**: Enable users to find and filter data more quickly and efficiently,
especially when working with models that contain a large number of fields.
- **Customize UI for OpenSPP**: Customize the filtering UI to align with the
specific data structures and user workflows within the OpenSPP platform.

Module Dependencies and Integration
-----------------------------------

1. `spp_custom_filter_ui <spp_custom_filter_ui>`__: This module directly
depends on the **SPP Custom Filter Farmer Registry** module, inheriting
its core functionality for managing the visibility of fields in filter
dropdown menus. The **SPP Custom Filter Farmer Registry** module leverages this capability
to configure the UI for specific models.

2. `spp_farmer_registry_base <spp_farmer_registry_base>`__: The module interacts with the
**OpenSPP Farmer Registry Base** module

Additional Functionality
------------------------

-The **OpenSPP Custom Filter Farmer Registry"** module provides the following additional
functionality:

-**UI Configuration for Res Partner**: The module specifically customizes the filter UI for
the **Res Partner** model, which is central to OpenSPP's registrant management system.
It selectively enables the "Show on Custom Filter" option for relevant fields within this model,
ensuring that only those fields appear in the filter dropdown menus.


Conclusion
----------

The **OpenSPP Custom Filter Farmer Registry"** module plays a vital role in enhancing the
usability and efficiency of the OpenSPP platform. By customizing the filtering UI for key
models like *Res Partner*, it streamlines data management tasks, especially for users working
with registrant information in the context of social protection programs. Its seamless integration
with other core OpenSPP modules ensures a cohesive and user-centric experience across the platform.


**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Credits
=======

Authors
-------

* OpenSPP.org

Maintainers
-----------

Current maintainer:

This module is part of the `OpenSPP/openspp-modules <https://github.com/OpenSPP/openspp-modules/tree/17.0/spp_custom_filter_farmer_registry>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions spp_custom_filter_farmer_registry/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
12 changes: 12 additions & 0 deletions spp_custom_filter_farmer_registry/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "OpenSPP Custom Filter Farmer Registry",
"category": "OpenSPP",
"version": "17.0.1.0.0",
"summary": "Customizes the OpenSPP UI to enhance filtering for Farmer Registry, improving usability and efficiency in managing registrants within social protection programs.",
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/openspp-modules",
"license": "LGPL-3",
"depends": ["spp_custom_filter", "spp_farmer_registry_base"],
"auto_install": False,
"application": False,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * spp_custom_filter_farmer_registry
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: spp_custom_filter_farmer_registry
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_g2p_program_membership__tags_ids
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_partner__tags_ids
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_users__tags_ids
msgid "Registrant Tags"
msgstr ""

#. module: spp_custom_filter_farmer_registry
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_g2p_program_membership__farmer_national_id
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_partner__farmer_national_id
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_users__farmer_national_id
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_spp_farmer__farmer_national_id
msgid "National ID Number"
msgstr ""

#. module: spp_custom_filter_farmer_registry
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_g2p_program_membership__farmer_postal_address
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_partner__farmer_postal_address
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_users__farmer_postal_address
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_spp_farmer__farmer_postal_address
msgid "Postal Address"
msgstr ""

#. module: spp_custom_filter_farmer_registry
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_g2p_program_membership__marital_status
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_partner__marital_status
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_users__marital_status
msgid "Marital Status"
msgstr ""

#. module: spp_custom_filter_farmer_registry
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_g2p_program_membership__highest_education_level
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_partner__highest_education_level
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_users__highest_education_level
msgid "Highest Educational Level"
msgstr ""

#. module: spp_custom_filter_farmer_registry
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_g2p_program_membership__farmer_household_size
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_partner__farmer_household_size
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_res_users__farmer_household_size
#: model:ir.model.fields,field_description:spp_custom_filter_farmer_registry.field_spp_farmer__farmer_household_size
msgid "Farmer Household Size"
msgstr ""
1 change: 1 addition & 0 deletions spp_custom_filter_farmer_registry/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_partner
11 changes: 11 additions & 0 deletions spp_custom_filter_farmer_registry/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from odoo import fields, models


class ResPartner(models.Model):
_name = "res.partner"
_inherit = ["res.partner", "custom.filter.mixin"]

farmer_national_id = fields.Char(allow_filter=True)
farmer_postal_address = fields.Char(allow_filter=True)
marital_status = fields.Selection(allow_filter=True)
highest_education_level = fields.Selection(allow_filter=True)
3 changes: 3 additions & 0 deletions spp_custom_filter_farmer_registry/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
31 changes: 31 additions & 0 deletions spp_custom_filter_farmer_registry/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# OpenSPP Custom Filter Farmer Registry

## Overview

The **OpenSPP Custom Filter Farmer Registry"** module customizes the user interface (UI) for filtering in specific OpenSPP modules, enhancing usability and simplifying data management. It builds upon the [spp_custom_filter UI](spp_custom_filter_ui) module, which provides the underlying functionality for controlling which fields are displayed in filter dropdown menus.

This module is designed to tailor the filtering interface for the Res Partner model, which is widely utilized within OpenSPP to represent registrants. By selectively exposing relevant fields for filtering, the module aims to streamline user workflows and enhance the overall user experience within the OpenSPP system.

## Purpose

The primary purpose of the **SPP Custom Filter Farmer Registry** module is to:

* **Enhance Usability**: Simplify the filtering process for users by presenting a more focused and relevant set of filterable fields, minimizing visual clutter and reducing cognitive overload.
* **Improve Efficiency**: Enable users to find and filter data more quickly and efficiently, especially when working with models that contain a large number of fields.
* **Customize UI for OpenSPP**: Customize the filtering UI to align with the specific data structures and user workflows within the OpenSPP platform.

## Module Dependencies and Integration

1. **[spp_custom_filter UI](spp_custom_filter_ui)**: This module directly depends on the **SPP Custom Filter UI** module, inheriting its core functionality for managing the visibility of fields in filter dropdown menus. The **SPP Custom Filter UI** module leverages this capability to configure the UI for specific models.

2. **[OpenSPP Farmer Registry Base](spp_farmer_registry_base)**: The module interacts with the **OpenSPP Farmer Registry Base** module

## Additional Functionality

The **OpenSPP Custom Filter Farmer Registry** module provides the following additional functionality:

* **UI Configuration for Res Partner**: The module specifically customizes the filter UI for the **Res Partner** model, which is central to OpenSPP's registrant management system. It selectively enables the "Show on Custom Filter" option for relevant fields within this model, ensuring that only those fields appear in the filter dropdown menus.

## Conclusion

The **OpenSPP Custom Filter Farmer Registry"** module plays a vital role in enhancing the usability and efficiency of the OpenSPP platform. By customizing the filtering UI for key models like *Res Partner*, it streamlines data management tasks, especially for users working with registrant information in the context of social protection programs. Its seamless integration with other core OpenSPP modules ensures a cohesive and user-centric experience across the platform.
Loading
Loading