Auto-select Quantity tab when editing item for new custorder
also be a little smarter on error when user selects an item
This commit is contained in:
parent
43bbc2a29e
commit
ddb05afe6b
2 changed files with 25 additions and 6 deletions
|
@ -560,9 +560,13 @@ class CustomerOrderView(MasterView):
|
|||
return self.handler.uom_choices_for_product(product)
|
||||
|
||||
def info_for_product(self, batch, data, product):
|
||||
info = self.handler.get_product_info(batch, product)
|
||||
info['url'] = self.request.route_url('products.view', uuid=info['uuid'])
|
||||
return info
|
||||
try:
|
||||
info = self.handler.get_product_info(batch, product)
|
||||
except Exception as error:
|
||||
return {'error': six.text_type(error)}
|
||||
else:
|
||||
info['url'] = self.request.route_url('products.view', uuid=info['uuid'])
|
||||
return info
|
||||
|
||||
def normalize_batch(self, batch):
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue