Don't allow access to Order Form for executed purchase batch
This commit is contained in:
parent
758ae7099d
commit
da8ef9ebd8
|
@ -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)\
|
||||||
|
|
Loading…
Reference in a new issue