Skip to content

fix(spp_change_request_v2): add no_create/no_open to lookup fields in CR detail views#33

Merged
gonzalesedwin1123 merged 1 commit into19.0from
fix/cr-no-create-no-open-lookup-fields
Feb 12, 2026
Merged

fix(spp_change_request_v2): add no_create/no_open to lookup fields in CR detail views#33
gonzalesedwin1123 merged 1 commit into19.0from
fix/cr-no-create-no-open-lookup-fields

Conversation

@emjay0921
Copy link
Contributor

Why is this change needed?

Users could create or edit configuration/lookup records (gender, relationship, country, state, group type, role, ID type) and registrant records directly from change request forms. These fields should be select-only.

How was the change implemented?

Added options="{'no_create': True, 'no_open': True}" to all lookup and registrant Many2one fields across 9 CR detail views:

  • add_member: gender_id, relationship_id
  • edit_individual: gender_id
  • exit_registrant: destination_country_id
  • change_hoh: previous_head_new_role_id (added no_open)
  • create_group: group_type_id, head_gender_id, state_id, country_id (added no_open)
  • split_household: source_group_id, new_group_type_id, state_id, country_id (added no_open)
  • transfer_member: source_group_id, new_role_id (added no_open)
  • merge_registrants: primary_registrant_id
  • update_id: id_type_id (added no_open)

New unit tests

N/A — view-only change

Unit tests executed by the author

N/A

How to test manually

  • Open any change request detail form (e.g., Add Member)
  • Verify that lookup fields (gender, relationship, country, etc.) only allow selection from existing values
  • Verify no "Create and Edit" or external link icon appears on these fields

… CR detail views

Prevent users from creating or editing configuration/lookup records
(gender, relationship, country, state, group type, role, ID type) and
registrant records directly from change request forms. Users should
only select from existing values.
@gemini-code-assist
Copy link

Summary of Changes

Hello @emjay0921, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the user experience and maintains data consistency by restricting the ability to create new or open existing lookup and registrant records directly from various change request forms. This ensures that users must select from predefined options, preventing accidental data creation or modification in critical fields.

Highlights

  • Data Integrity Enhancement: Prevented users from directly creating or editing configuration/lookup records (such as gender, relationship, country, state, group type, role, and ID type) and registrant records from within change request forms.
  • UI Control Implementation: Applied options="{'no_create': True, 'no_open': True}" to relevant Many2one fields across 9 different change request detail views to enforce selection-only behavior.
Changelog
  • spp_change_request_v2/views/detail_add_member_views.xml
    • Added no_create and no_open options to the gender_id field.
    • Added no_create and no_open options to the relationship_id field.
  • spp_change_request_v2/views/detail_change_hoh_views.xml
    • Added no_open option to the previous_head_new_role_id field.
  • spp_change_request_v2/views/detail_create_group_views.xml
    • Added no_open option to the group_type_id field.
    • Added no_open option to the head_gender_id field.
    • Added no_open option to the state_id field.
    • Added no_open option to the country_id field.
  • spp_change_request_v2/views/detail_edit_individual_views.xml
    • Added no_create and no_open options to the gender_id field.
  • spp_change_request_v2/views/detail_exit_registrant_views.xml
    • Added no_create and no_open options to the destination_country_id field.
  • spp_change_request_v2/views/detail_merge_registrants_views.xml
    • Added no_create and no_open options to the primary_registrant_id field.
  • spp_change_request_v2/views/detail_split_household_views.xml
    • Added no_create and no_open options to the source_group_id field.
    • Added no_create and no_open options to the new_group_type_id field.
    • Added no_create and no_open options to the state_id field.
    • Added no_create and no_open options to the country_id field.
  • spp_change_request_v2/views/detail_transfer_member_views.xml
    • Added no_create and no_open options to the source_group_id field.
    • Added no_create and no_open options to the new_role_id field.
  • spp_change_request_v2/views/detail_update_id_views.xml
    • Added no_open option to the id_type_id field.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds no_create and no_open options to lookup fields in various change request detail views, which will prevent users from creating or editing related records directly from these forms. The changes are well-aligned with the stated goal. I've added a few comments suggesting improvements to the XML formatting for consistency across the views. Adopting a consistent multi-line format for fields with multiple attributes will enhance readability and maintainability. Otherwise, the changes look good.

<group string="Group Information">
<field name="group_name" required="1" />
<field name="group_type_id" options="{'no_create': True}" />
<field name="group_type_id" options="{'no_create': True, 'no_open': True}" />

Choose a reason for hiding this comment

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

medium

For consistency with other views in this PR (e.g., detail_add_member_views.xml), it would be better to format this field over multiple lines, with one attribute per line. This improves readability and makes future diffs cleaner.

Suggested change
<field name="group_type_id" options="{'no_create': True, 'no_open': True}" />
<field
name="group_type_id"
options="{'no_create': True, 'no_open': True}"
/>

Comment on lines +78 to +80
<field name="state_id" options="{'no_create': True, 'no_open': True}" />
<field name="postal_code" />
<field name="country_id" options="{'no_create': True}" />
<field name="country_id" options="{'no_create': True, 'no_open': True}" />

Choose a reason for hiding this comment

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

medium

For consistency with other views in this PR (e.g., detail_add_member_views.xml), it would be better to format these fields over multiple lines, with one attribute per line. This improves readability and makes future diffs cleaner.

                            <field
                                name="state_id"
                                options="{'no_create': True, 'no_open': True}"
                            />
                            <field name="postal_code" />
                            <field
                                name="country_id"
                                options="{'no_create': True, 'no_open': True}"
                            />

Comment on lines +111 to +113
<field name="state_id" options="{'no_create': True, 'no_open': True}" />
<field name="postal_code" />
<field name="country_id" options="{'no_create': True}" />
<field name="country_id" options="{'no_create': True, 'no_open': True}" />

Choose a reason for hiding this comment

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

medium

For consistency with other views in this PR (e.g., detail_add_member_views.xml), it would be better to format these fields over multiple lines, with one attribute per line. This improves readability and makes future diffs cleaner.

                            <field
                                name="state_id"
                                options="{'no_create': True, 'no_open': True}"
                            />
                            <field name="postal_code" />
                            <field
                                name="country_id"
                                options="{'no_create': True, 'no_open': True}"
                            />

required="1"
/>
<field name="new_role_id" options="{'no_create': True}" />
<field name="new_role_id" options="{'no_create': True, 'no_open': True}" />

Choose a reason for hiding this comment

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

medium

For consistency with other views in this PR (e.g., detail_add_member_views.xml), it would be better to format this field over multiple lines, with one attribute per line. This improves readability and makes future diffs cleaner.

                            <field
                                name="new_role_id"
                                options="{'no_create': True, 'no_open': True}"
                            />

<group invisible="operation == 'remove'">
<group string="ID Information">
<field name="id_type_id" options="{'no_create': True}" />
<field name="id_type_id" options="{'no_create': True, 'no_open': True}" />

Choose a reason for hiding this comment

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

medium

For consistency with other views in this PR (e.g., detail_add_member_views.xml), it would be better to format this field over multiple lines, with one attribute per line. This improves readability and makes future diffs cleaner.

                            <field
                                name="id_type_id"
                                options="{'no_create': True, 'no_open': True}"
                            />

@gonzalesedwin1123 gonzalesedwin1123 merged commit 3258a93 into 19.0 Feb 12, 2026
20 of 23 checks passed
@gonzalesedwin1123 gonzalesedwin1123 deleted the fix/cr-no-create-no-open-lookup-fields branch February 12, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants