Make sure status field is readonly when creating new batch

This commit is contained in:
Lance Edgar 2018-11-07 16:47:51 -06:00
parent 37b9a81344
commit bdbb8e2a7d

View file

@ -274,9 +274,12 @@ class BatchMasterView(MasterView):
f.set_label('rowcount', "Row Count")
# status_code
f.set_readonly('status_code')
f.set_renderer('status_code', self.make_status_renderer(self.model_class.STATUS))
f.set_label('status_code', "Status")
if self.creating:
f.remove_field('status_code')
else:
f.set_readonly('status_code')
f.set_renderer('status_code', self.make_status_renderer(self.model_class.STATUS))
f.set_label('status_code', "Status")
# complete
if self.viewing: