Skip to content

Conversation

@emjay0921
Copy link
Contributor

Why is this change needed?

Users should not be able to create or edit gender records inline from the individual registrant form.

How was the change implemented?

Added no_create and no_open options to the gender_id field in individual_views.xml.

New unit tests

Unit tests executed by the author

How to test manually

  • Open an individual registrant form
  • Click the Gender dropdown
  • Verify there is no "Create and Edit" or "Create" option
  • Verify clicking a gender value does not open the gender form

Related links

Add no_create and no_open options to gender_id field to prevent
users from creating or editing gender records inline.
@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 enhances data integrity and user experience by restricting the ability to create or edit gender records directly within the individual registrant form. This ensures that gender data is managed through appropriate channels, preventing accidental or unauthorized modifications during individual registration.

Highlights

  • Disabled Gender Creation/Editing: Users can no longer create or modify gender records directly from the individual registrant form, preventing inline data manipulation.
Changelog
  • spp_registry/views/individual_views.xml
    • Disabled inline creation and opening of gender records for the 'gender_id' field.
Activity
  • New unit tests were mentioned in the PR description.
  • Unit tests were executed by the author.
  • Manual testing steps were provided to verify the changes.
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 aims to disable the creation and editing of gender records from the individual registrant form. The change correctly uses Odoo view options to modify the UI behavior of the gender_id field. My review includes a suggestion to add the no_create_edit option to fully align with the PR's goal and ensure consistency with other fields in the file.

</group>
<group>
<field name="gender_id" readonly="disabled" />
<field name="gender_id" readonly="disabled" 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

To fully disable creation options as intended, it's best to also include no_create_edit: True. The PR description mentions verifying that 'Create and Edit' is not available, and this option is what controls that feature in the dropdown menu. For consistency with other vocabulary-based fields in this file, such as id_type_id on line 303, which uses {'no_open':True,'no_create_edit':True,'no_create':True}, adding this option would be beneficial.

Suggested change
<field name="gender_id" readonly="disabled" options="{'no_create': True, 'no_open': True}" />
<field name="gender_id" readonly="disabled" options="{'no_create': True, 'no_create_edit': True, 'no_open': True}" />

@gonzalesedwin1123 gonzalesedwin1123 merged commit b3f1fd3 into 19.0 Feb 12, 2026
26 of 27 checks passed
@gonzalesedwin1123 gonzalesedwin1123 deleted the fix/gender-no-create branch February 12, 2026 01:38
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