Add get_next_url_after_submit_new_order()
for customer orders
after new custorder batch is executed, where do we send user?
This commit is contained in:
parent
a20eb468df
commit
839c4e0c28
|
@ -924,11 +924,16 @@ class CustomerOrderView(MasterView):
|
|||
if not result:
|
||||
return {'error': "Batch failed to execute"}
|
||||
|
||||
next_url = None
|
||||
if isinstance(result, model.CustomerOrder):
|
||||
next_url = self.get_action_url('view', result)
|
||||
return {
|
||||
'ok': True,
|
||||
'next_url': self.get_next_url_after_submit_new_order(batch, result),
|
||||
}
|
||||
|
||||
return {'ok': True, 'next_url': next_url}
|
||||
def get_next_url_after_submit_new_order(self, batch, result, **kwargs):
|
||||
model = self.model
|
||||
|
||||
if isinstance(result, model.CustomerOrder):
|
||||
return self.get_action_url('view', result)
|
||||
|
||||
def execute_new_order_batch(self, batch, data):
|
||||
return self.batch_handler.do_execute(batch, self.request.user)
|
||||
|
|
Loading…
Reference in a new issue