Skip to content

Conversation

@emjay0921
Copy link
Contributor

@emjay0921 emjay0921 commented Nov 4, 2025

Why is this change needed?

To have a grouping of Custom Fields

How was the change implemented?

Added a new model for Field Groupings

  • Have a Target Type to be able to select on Fields Creation only the Grouping with the same Target Type
  • Have a Sequence to be able to organize the order of Groupings on Additional or Indicators Tab

Improve the Custom Fields UI

  • New Field: Field Group

New unit tests

Unit tests executed by the author

How to test manually

Related links


Note

Adds field grouping and sequencing to custom fields, renders grouped sections in registrant forms, and provides new management views/actions with tests.

  • Backend:
    • Modeling: Add spp.custom.field.group with name, target_type, sequence, active; security access, tree/form/search views, and menu (views/field_group_views.xml, security/ir.model.access.csv).
    • Fields: Extend ir.model.fields with field_group_id (domain by target_type) and sequence; clear mismatched group on target_type change.
    • Form Rendering: Update res.partner._get_view to group custom (x_cst_*) and indicator (x_ind_*) fields by field_group_id, order by sequence, display grouped columns with headers, place ungrouped fields separately; indicators readonly; order search by sequence.
  • UI:
    • Custom Fields UI: Add tree views for Group/Individual with sequence handle and field_group_id; new search view with filters/group-bys; enhance form to include sequence, field_group_id, readonly target_type.
    • Actions/Menus: New actions for Group/Individual fields; introduce "Custom Fields" parent menu and move "Field Groups" under it; add dependency on spp_custom_field.
  • Tests:
    • Add tests for field group CRUD/order, domain filtering, field sequencing, grouped view generation, and UI behaviors (spp_custom_field/tests/*, spp_custom_fields_ui/tests/test_custom_fields_ui.py).

Written by Cursor Bugbot for commit 54363c3. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.79%. Comparing base (9f54353) to head (54363c3).

Files with missing lines Patch % Lines
spp_custom_field/models/cus_partner.py 62.85% 21 Missing and 5 partials ⚠️
spp_custom_field/tests/test_view_generation.py 88.13% 2 Missing and 5 partials ⚠️
spp_custom_field/models/ir_model_fields.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             17.0     #862      +/-   ##
==========================================
- Coverage   79.83%   79.79%   -0.04%     
==========================================
  Files         805      810       +5     
  Lines       23050    23236     +186     
  Branches     2727     2760      +33     
==========================================
+ Hits        18402    18542     +140     
- Misses       3979     4015      +36     
- Partials      669      679      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

@emjay0921 emjay0921 marked this pull request as ready for review November 14, 2025 02:25
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on November 17

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@gonzalesedwin1123 gonzalesedwin1123 merged commit 9bc1eed into 17.0 Nov 14, 2025
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2025
@emjay0921 emjay0921 deleted the custom-fields-improvement branch November 17, 2025 03:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants