Skip to content

Conversation

Tosinibikunle
Copy link
Contributor

resolves #300

@DjangoCRM
Copy link
Owner

Hi! In general, you have correctly identified the areas for correction.
But you need to take into account that the Create deal button appears in change_view (it is not in add_view).
As for the changes in the lines 25 and 325, I don't understand why they were made.

@DjangoCRM DjangoCRM added the requires changes Pull requests that need to be updated based on reviewers' comments and then reviewed again label Oct 1, 2025
@Tosinibikunle
Copy link
Contributor Author

Alright!, I'll make adjustments

@Tosinibikunle Tosinibikunle marked this pull request as draft October 3, 2025 13:40
@Tosinibikunle Tosinibikunle marked this pull request as ready for review October 3, 2025 14:23
@Tosinibikunle
Copy link
Contributor Author

@DjangoCRM please check again.

@DjangoCRM
Copy link
Owner

the Create deal button appears in change_view (it is not in add_view)

This means that the object already has a pk, which means that the situation when the Create a deal button is clicked and there is no pk is impossible.

@DjangoCRM DjangoCRM added the invalid This doesn't seem right label Oct 5, 2025
@Tosinibikunle
Copy link
Contributor Author

Hi, @DjangoCRM
I have removed the redundant check for obj.pk after your clarification and I have updated the logic for the two requirements when request is marked as a case:
obj.pending = True (in save_model) and form.country_must_be_specified = False ( in get_form). I think this will resolve the issue.

@DjangoCRM
Copy link
Owner

Hi. There was no need to change the Deal creation logic. We simply needed to strengthen the trigger condition with an additional check in both places:
'_create-deal' in request.POST and not obj.case that's it.
We've wasted too much time. I have to stop this. Sorry

@DjangoCRM DjangoCRM closed this Oct 6, 2025
@DjangoCRM
Copy link
Owner

Sorry, I said it incorrectly. It should be
'_create-deal' in request.POST and request.POST.get('case') == 'False'
instead
'_create-deal' in request.POST and not obj.case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right 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.

Add processing for when the Create Deal button is clicked in a Request marked as a case.

2 participants