Fix some things for inventory batch views
This commit is contained in:
parent
62dca3d0b0
commit
57c2a7981f
2 changed files with 3 additions and 4 deletions
tailbone/views/batch
|
@ -445,7 +445,9 @@ class BatchMasterView(MasterView):
|
|||
|
||||
def toggle_complete(self):
|
||||
batch = self.get_instance()
|
||||
if not batch.executed:
|
||||
if batch.executed:
|
||||
self.request.session.flash("Request ignored, since batch has already been executed")
|
||||
else:
|
||||
form = forms.Form(schema=ToggleComplete(), request=self.request)
|
||||
if form.validate(newstyle=True):
|
||||
batch.complete = form.validated['complete']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue