update the estimate create qs to show only active customer

This commit is contained in:
ismail 2025-05-22 19:22:57 +03:00
parent 8613a796b5
commit 28de728b23

View File

@ -3742,7 +3742,7 @@ def create_estimate(request, pk=None):
# entity_slug=entity.slug, user_model=entity.admin
# )
form = forms.EstimateModelCreateForm()
form.fields["customer"].queryset = dealer.customers.all()
form.fields["customer"].queryset = dealer.customers.filter(active=True)
if pk:
opportunity = models.Opportunity.objects.get(pk=pk)