summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 20379e588..af4e21e31 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -739,13 +739,15 @@ class OperationFormGeneral(CustomForm, ManageOldType):
form_slug = "operation-010-general"
file_upload = True
- associated_models = {'scientist': Person,
- 'in_charge': Person,
- 'cira_rapporteur': Person,
- 'operator': Organization,
- 'operation_type': models.OperationType,
- 'report_processing': models.ReportState,
- }
+ associated_models = {
+ 'scientist': Person,
+ 'in_charge': Person,
+ 'cira_rapporteur': Person,
+ 'operator': Organization,
+ 'operation_type': models.OperationType,
+ 'record_quality_type': models.RecordQualityType,
+ 'report_processing': models.ReportState
+ }
pk = forms.IntegerField(required=False, widget=forms.HiddenInput)
if settings.COUNTRY == 'fr':
code_patriarche = forms.CharField(label=u"Code PATRIARCHE",
@@ -841,8 +843,8 @@ class OperationFormGeneral(CustomForm, ManageOldType):
scientific_documentation_comment = forms.CharField(
label=_(u"Comment about scientific documentation"),
widget=forms.Textarea, required=False)
- record_quality = forms.ChoiceField(label=_(u"Record quality"),
- required=False)
+ record_quality_type = forms.ChoiceField(label=_(u"Record quality"),
+ required=False)
virtual_operation = forms.BooleanField(required=False,
label=_(u"Virtual operation"))
@@ -861,6 +863,7 @@ class OperationFormGeneral(CustomForm, ManageOldType):
]
TYPES = [
FieldType('operation_type', models.OperationType),
+ FieldType('record_quality_type', models.RecordQualityType),
FieldType('report_processing', models.ReportState),
]
@@ -873,9 +876,6 @@ class OperationFormGeneral(CustomForm, ManageOldType):
if not profile.warehouse:
for key in self.WAREHOUSE_FIELDS:
self.remove_field(key)
- if 'record_quality' in self.fields:
- self.fields['record_quality'].choices = \
- [('', '--')] + list(models.QUALITY)
def clean(self):
cleaned_data = self.cleaned_data