Redirect to custom index URL when user cancels new custorder entry
This commit is contained in:
parent
303eba6bca
commit
a20eb468df
|
@ -410,8 +410,7 @@ class CustomerOrderView(MasterView):
|
|||
self.request.session.flash("New customer order has been deleted.")
|
||||
|
||||
# send user back to customer orders page, w/ no new batch generated
|
||||
route_prefix = self.get_route_prefix()
|
||||
url = self.request.route_url(route_prefix)
|
||||
url = self.get_index_url()
|
||||
return self.redirect(url)
|
||||
|
||||
def customer_autocomplete(self):
|
||||
|
@ -1005,5 +1004,12 @@ class CustomerOrderView(MasterView):
|
|||
CustomerOrdersView = CustomerOrderView
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
CustomerOrderView = kwargs.get('CustomerOrderView', base['CustomerOrderView'])
|
||||
CustomerOrderView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
Loading…
Reference in a new issue