Redirect when cancelling instead of submitting a form

This commit is contained in:
2024-12-20 20:21:36 +01:00
parent 5f0b4d2050
commit ffe6fc8c2a
3 changed files with 4 additions and 9 deletions

View File

@ -260,6 +260,7 @@ class CounterClick(CounterTabsMixin, CanViewMixin, SingleObjectMixin, FormView):
product
)
kwargs["customer"] = self.customer
kwargs["cancel_url"] = self.get_success_url()
# To get all forms errors to the javascript, we create a list of error list
kwargs["form_errors"] = []