Don't allow access to Order Form for executed purchase batch

This commit is contained in:
Lance Edgar 2016-11-07 20:49:33 -06:00
parent 758ae7099d
commit da8ef9ebd8

View file

@ -253,6 +253,8 @@ class PurchaseBatchView(BatchMasterView):
View for editing a purchase batch as an order form. View for editing a purchase batch as an order form.
""" """
batch = self.get_instance() batch = self.get_instance()
if batch.executed:
return self.redirect(self.get_action_url('view', batch))
vendor = batch.vendor vendor = batch.vendor
costs = Session.query(model.ProductCost)\ costs = Session.query(model.ProductCost)\
.join(model.Product)\ .join(model.Product)\