diff options
-rw-r--r-- | archaeological_operations/forms.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 0e56aa33b..4564eb37b 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -549,6 +549,13 @@ class OperationSelect(TableSelect): def __init__(self, *args, **kwargs): super(OperationSelect, self).__init__(*args, **kwargs) + if not get_current_profile().warehouse: + self.fields.pop('documentation_deadline_before') + self.fields.pop('documentation_deadline_after') + self.fields.pop('documentation_received') + self.fields.pop('finds_deadline_before') + self.fields.pop('finds_deadline_after') + self.fields.pop('finds_received') self.fields['operation_type'].choices = \ models.OperationType.get_types() self.fields['operation_type'].help_text = \ @@ -836,6 +843,11 @@ class OperationFormGeneral(ManageOldType, forms.Form): def __init__(self, *args, **kwargs): super(OperationFormGeneral, self).__init__(*args, **kwargs) + if not get_current_profile().warehouse: + self.fields.pop('documentation_deadline') + self.fields.pop('documentation_received') + self.fields.pop('finds_deadline') + self.fields.pop('finds_received') self.fields['operation_type'].choices = \ models.OperationType.get_types( initial=self.init_data.get('operation_type')) |