Prevent mobile receiving actions for batch which is complete or executed
This commit is contained in:
parent
af0eea76e2
commit
72b2510681
3 changed files with 88 additions and 74 deletions
|
@ -208,7 +208,17 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
fs.configure(include=[
|
||||
fs.vendor.with_renderer(fa.TextFieldRenderer),
|
||||
fs.department.with_renderer(fa.TextFieldRenderer),
|
||||
fs.complete,
|
||||
fs.executed,
|
||||
fs.executed_by,
|
||||
])
|
||||
batch = fs.model
|
||||
if not batch.executed:
|
||||
del [fs.executed, fs.executed_by]
|
||||
if not batch.complete:
|
||||
del fs.complete
|
||||
else:
|
||||
del fs.complete
|
||||
|
||||
def get_mobile_row_data(self, batch):
|
||||
return super(ReceivingBatchView, self).get_mobile_row_data(batch)\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue