Skip to content

Conversation

souhil25
Copy link

Summary

This PR updates RequestAdmin to dynamically hide the 'duplicate' and 'case' checkboxes
on the admin change page if the Request already has a linked Deal.

Changes

  • Modified RequestAdmin.get_fieldsets to remove 'duplicate' and 'case' fields
    when obj.deal is present.

Notes

  • The change has been manually verified.
  • Automated tests may require a local database setup to run.

…DjangoCRM#292

Open
@DjangoCRM
Description
DjangoCRM
opened 3 hours ago
Owner
Hide duplicate and case fields (checkboxes) on a change page of Request if Deal was created (if obj.deal
@souhil25 souhil25 changed the title Hide checkboxes in a Request if a Deal has already been created for it #292 Open @DjangoCRM Description DjangoCRM opened 3 hours ago Owner Hide duplicate and case fields (checkboxes) on a change page of Request if Deal was created (if obj.dealHide checkboxes in a Request if a Deal has already been created for i… Hide checkboxes in a Request if a Deal has already been created for it #292 Sep 11, 2025
@DjangoCRM
Copy link
Owner

Unfortunately, this will not work because the result is saved in the class.
That is, if the fields are filtered once, they will never appear again.
There are working examples in this directory - take a look and do not rush.
You also need to remove the crm/admin.py file from the PR.

@DjangoCRM DjangoCRM added the requires changes Pull requests that need to be updated based on reviewers' comments and then reviewed again label Sep 11, 2025
@DjangoCRM
Copy link
Owner

@souhil25 Hi, will you fix it?

@souhil25
Copy link
Author

Yes, but this evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires changes Pull requests that need to be updated based on reviewers' comments and then reviewed again
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants