OpenSPP / openspp-modules

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

Add validation in Import Group for Farmer registry #515

Open anthonymarkQA opened 1 month ago

anthonymarkQA commented 1 month ago

Describe the bug An "unnamed" member is automatically created under the group , when importing a group with no memmbers To Reproduce

  1. Go to Farmer registry QA
  2. Login as admin
  3. Click on Groups
  4. Click the gear icon then click "Import records"
  5. Click on Upload file and select the file attached from this ticket
  6. Go back to groups and check the group you have imported,
  7. go to "members" tab and notice there is "unnamed" individual created and assigned as head automatically

Expected behavior raise error message and prevent import when importing group with no head member in farmer registry Screenshots image

Additional context Contact (res.partner) - 2024-08-13T160654.164.xlsx

anthonymarkQA commented 2 weeks ago

Findings: Returned to DEV

Prerequisite: upgrade module "spp_farmer_registry_base"

The solution works, however, user has to put "is_group" header for the validation to check the imported file. so that the unnamed member will not be created .

Expected: Put the validation in the import page for GROUPS without the need for "is_group" header. image Add in the error message farmer_given_name and farmer_family_namemust be present in the excel file. Apply for FARMER REGISTRY>groups only.

anthonymarkQA commented 1 week ago

Findings: Returned to DEV

This fix should be applied for group import in farmer registry only as indicated. Currently it got unexpectedly applied for Import Individual for farmer registry as well.