From d7ea54486d88b4459ef7d85ab3304fc6b88e612e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 4 Mar 2021 16:13:11 +0100 Subject: QA operation: finds/doc received --- archaeological_operations/forms.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'archaeological_operations/forms.py') diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index c9d95c506..c671a0d88 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1868,6 +1868,8 @@ class QAOperationFormMulti(QAForm): REPLACE_FIELDS = [ 'qa_operation_type', 'qa_operator', + 'qa_documentation_received', + 'qa_finds_received', ] qa_operation_type = forms.ChoiceField( label=_("Operation type"), required=False @@ -1881,6 +1883,14 @@ class QAOperationFormMulti(QAForm): limit={'organization_type': organization_type_pk_lazy('operator')}, associated_model=Organization, new=True), validators=[valid_id(Organization)], required=False) + qa_documentation_received = forms.ChoiceField( + label=_("Documentation received"), required=False, + choices=QAForm.NULL_BOOL_CHOICES + ) + qa_finds_received = forms.ChoiceField( + label=_("Finds received"), required=False, + choices=QAForm.NULL_BOOL_CHOICES + ) TYPES = [ FieldType('qa_operation_type', models.OperationType), @@ -1900,6 +1910,18 @@ class QAOperationFormMulti(QAForm): return "" return value + def _get_qa_finds_received(self, value): + return self._get_null_boolean_field(value) + + def _get_qa_documentation_received(self, value): + return self._get_null_boolean_field(value) + + def _set_qa_finds_received(self, item, __): + return self._set_null_boolean_field(item, "qa_finds_received") + + def _set_qa_documentation_received(self, item, __): + return self._set_null_boolean_field(item, "qa_documentation_received") + class QAOperationDuplicateForm(IshtarForm): qa_code_patriarche = forms.CharField( -- cgit v1.2.3