OpenSPP / openspp-modules

OpenSPP Odoo modules
https://openspp.org
GNU Lesser General Public License v3.0
26 stars 11 forks source link

Enhancement of Group Management: Hierarchical Structure and Type-Specific Properties #339

Closed jeremi closed 7 months ago

jeremi commented 9 months ago

Objective:

The enhancement aims to broaden the group management capabilities within OpenSPP to represent a variety of social and organizational structures accurately, from households and educational institutions to cooperatives and community groups. By allowing groups to encompass both individuals and other groups and by introducing group types with specific attributes and constraints, OpenSPP will be able to model complex entities such as a household within a village community, a cooperative of farmers with individual and group memberships, or a school encompassing students, teachers, and administrative staff. This development is key to catering to the diverse needs of social protection programs, ensuring that the software can adapt to the multifaceted ways in which people organize themselves in different cultural and economic contexts.

Requirements:

  1. Hierarchical Group Composition:

    • Enable a group to contain both individual members and sub-groups.
    • This feature will represent complex social or organizational structures, such as a family within a community group.
  2. Extension of res.partner:

    • Maintain the inheritance from the res.partner model for both individuals and groups to ensure compatibility with other modules.
  3. Group Naming and Typing:

    • Each group must have a designated name and type.
    • The type of a group determines its properties and the rules governing its composition and interaction with other entities.
  4. Group Type Properties:

    • Introduce a model defining properties and constraints specific to each group type, including:
      • Whether the group supports mixing individuals and groups.
      • If the group restricts membership to specific types of entities (e.g., a 'farm cooperative' can only include 'farm' groups and individual farmers).
      • Define the allowed relationships (g2p.relationship) between parent and child entities within the group structure.
  5. Group Hierarchy and Depth Control:

    • Implement a parameter to specify the maximum number of group levels permissible within a hierarchy to prevent overly complex or infinite nesting.
    • This control is crucial for maintaining system performance and usability.

Expected Outcome:

The implementation of these features will significantly enhance the flexibility and applicability of OpenSPP for managing diverse group structures in social protection programs. It will allow for accurate representation of real-world social and organizational relationships, improving the administration and delivery of services.

Technical Considerations:

gonzalesedwin1123 commented 8 months ago

Here are the updates:

  1. Hierarchical Group Composition:

In the group types configuration, an option was added to set if the group can contain individual members and sub-groups. All groups with a type set with "Allow group and individual members" will accept both groups and individuals in the group membership.

  1. Extension of res.partner:

Done

  1. Group Naming and Typing:

For clarification: properties of group type and rules governing its composition and interaction with other entities.

  1. Group Type Properties:

Introduce a model defining properties and constraints specific to each group type, including:

Done in the group types configuration UI

Under development

  1. Group Hierarchy and Depth Control:

Under development

anthonymarkQA commented 4 months ago

Findings: Blocked

Able to login to instance but the instance is empty. cc: @dasunhegoda

anthonymarkQA commented 3 months ago

Findings: Returned to DEV

  1. Able to create group tag under configuration and define its name - pass
  2. Able to toggle on/off "allow individuals and group members" - pass
  3. Able to add subgroups and individuals within a group when it is toggled on, and is applied to the group - pass
  4. Should not be able to add subgroups within a group anymore if tag is removed from KIND field - pass
  5. Should not be able to add subgroups if the tag applied to a group has it's setting toggled off - pass
  6. Able to delete group tag - pass
  7. Able to apply group tag into a group thru KIND field - pass
  8. Able to remove group tag from a group thru KIND field - pass
  9. Modal labels should be generic when adding members to a group "Add member" - pass

Open member and Create member modal has issue with its GUI placeholder for Child field. https://drive.google.com/file/d/1aAlNqDuwrJQ-y0XyPJrz1Q58NjcSUzMk/view?usp=sharing

anthonymarkQA commented 3 months ago

Findings; QA Passed

Able to create group tag under configuration and define its name - pass Able to toggle on/off "allow individuals and group members" - pass Able to add subgroups and individuals within a group when it is toggled on, and is applied to the group - pass Should not be able to add subgroups within a group anymore if tag is removed from KIND field - pass Should not be able to add subgroups if the tag applied to a group has it's setting toggled off - pass Able to delete group tag - pass Able to apply group tag into a group thru KIND field - pass Able to remove group tag from a group thru KIND field - pass Modal labels should be generic when adding members to a group "Add member" - pass Open member and Create member modal has issue with its GUI placeholder for Child field. - pass

NOTE: This PBI has a requirement that is still under development and will be handled on a separate ticket image