OpenSPP / openspp-modules

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

Add validation when deleting a value from group tab of Individuals page #583

Open anthonymarkQA opened 1 week ago

anthonymarkQA commented 1 week ago

Describe the bug In Groups tab of Individual page, when deleting the link of individual to a group while the individual is the head of that group, the individual will remain as head of the farmer group from Groups page despite being removed already from individuals page.

To Reproduce

  1. In QA Farmer registry, go to >registry> individuals
  2. Select an Individual which is currently a HEAD of a farmer group then click
  3. In Groups tab, click on Delete icon beside the group
  4. Go to Registry> Groups and select the group the individual previously belongs to
  5. Notice in farmer details tab, the individual's details is still present
  6. Notice in Members tab, the head of farmer group is already removed.

Expected behavior In Groups tab of Individual page, a validation error message should appear when attempting to delete a group if the individual is currently the HEAD of that Farmer group. Screenshots Image

Additional context

🔔 Note: This ticket should address common considerations without including country-specific content. Please ensure all references are generic and applicable across various contexts.

reichie020212 commented 1 week ago

Estimate Dev Time

Optimistic: 4 hours Pessimistic: 8 hours