diff options
| -rw-r--r-- | archaeological_operations/forms.py | 22 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 10 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 6 | ||||
| -rw-r--r-- | changelog/en/changelog_2022-06-15.md | 6 | ||||
| -rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 6 | 
5 files changed, 46 insertions, 4 deletions
| diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 488f7d74e..b37bed988 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -570,6 +570,8 @@ class OperationSelect(GeoItemSelect):          validators=[valid_id(Person)])      documentation_received = forms.NullBooleanField(          label=_("Documentation provided")) +    documentation_deposit_date = DateField( +        label=_("Documentation deposit date"))      documentation_deadline_before = DateField(          label=_("Documentation deadline before"))      documentation_deadline_after = DateField( @@ -577,6 +579,8 @@ class OperationSelect(GeoItemSelect):      has_finds = forms.NullBooleanField(label=_("Has finds"))      finds_received = forms.NullBooleanField(          label=_("Finds provided")) +    finds_deposit_date = DateField( +        label=_("Finds deposit date"))      finds_deadline_before = DateField(          label=_("Finds deadline before"))      finds_deadline_after = DateField( @@ -601,9 +605,11 @@ class OperationSelect(GeoItemSelect):                  'documentation_deadline_before',                  'documentation_deadline_after',                  'documentation_received', +                'documentation_deposit_date',                  'finds_deadline_before',                  'finds_deadline_after',                  'finds_received', +                'finds_deposit_date',              ))          if not profile.underwater:              self._remove_fields(("drassm_code",)) @@ -810,11 +816,17 @@ class OperationFormGeneral(CustomForm, ManageOldType):          required=False)      documentation_received = forms.NullBooleanField(          required=False, label=_("Documentation provided")) +    documentation_deposit_date = DateField( +        label=_("Documentation deposit date"), +        required=False)      finds_deadline = DateField(          label=_("Deadline for submission of the finds"), required=False,      )      finds_received = forms.NullBooleanField(          required=False, label=_("Finds provided")) +    finds_deposit_date = DateField( +        label=_("Finds deposit date"), +        required=False)      HEADERS['scientific_documentation_comment'] = FormHeader(_("Scientific"))      scientific_documentation_comment = forms.CharField( @@ -842,8 +854,10 @@ class OperationFormGeneral(CustomForm, ManageOldType):      WAREHOUSE_FIELDS = [          'documentation_deadline',          'documentation_received', +        'documentation_deposit_date',          'finds_deadline',          'finds_received', +        'finds_deposit_date',      ]      TYPES = [          FieldType('operation_type', models.OperationType), @@ -1680,6 +1694,8 @@ class QAOperationFormMulti(QAForm):          'qa_operator',          'qa_documentation_received',          'qa_finds_received', +        "qa_finds_deposit_date", +        "qa_documentation_deposit_date",      ]      qa_operation_type = forms.ChoiceField(          label=_("Operation type"), required=False @@ -1697,10 +1713,16 @@ class QAOperationFormMulti(QAForm):          label=_("Documentation provided"), required=False,          choices=QAForm.NULL_BOOL_CHOICES      ) +    qa_documentation_deposit_date = DateField( +        label=_("Documentation deposit date"), required=False, +    )      qa_finds_received = forms.ChoiceField(          label=_("Finds provided"), required=False,          choices=QAForm.NULL_BOOL_CHOICES      ) +    qa_finds_deposit_date = DateField( +        label=_("Finds deposit date"), +        required=False)      qa_collaborators = forms.IntegerField(          label=_("Collaborators"), required=False,          widget=widgets.JQueryAutoComplete( diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 5e8bcbc9f..ea4b6c244 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1014,10 +1014,12 @@ class Operation(          "start_date__gte",          "excavation_end_date__lte",          "excavation_end_date__gte", +        "documentation_deposit_date",          "documentation_deadline__lte",          "documentation_deadline__gte",          "finds_deadline__lte",          "finds_deadline__gte", +        "finds_deposit_date",      ]      EXTRA_REQUEST_KEYS = {          "operation_type__label": "operation_type__label", @@ -1221,6 +1223,10 @@ class Operation(              pgettext_lazy("key for text search", "site"),              "archaeological_sites__cached_label__icontains",          ), +        "documentation_deposit_date": SearchAltName( +            pgettext_lazy("key for text search", "documentation-deposit-date"), +            "documentation_deposit_date", +        ),          "documentation_received": SearchAltName(              pgettext_lazy("key for text search", "documentation-provided"),              "documentation_received", @@ -1233,6 +1239,10 @@ class Operation(              pgettext_lazy("key for text search", "documentation-deadline-after"),              "documentation_deadline__gte",          ), +        "finds_deposit_date": SearchAltName( +            pgettext_lazy("key for text search", "finds-deposit-date"), +            "finds_deposit_date", +        ),          "finds_received": SearchAltName(              pgettext_lazy("key for text search", "finds-provided"), "finds_received"          ), diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 8d88f79cc..5528ff170 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -250,11 +250,17 @@              {% field_flex "Deadline for submission of the documentation" documentation_deadline %}              {% endwith %}              {% field_flex "Documentation provided" item.documentation_received %} +            {% with documentation_deposit_date=item.documentation_deposit_date|date:"DATE_FORMAT"|default:"" %} +            {% field_flex _("Documentation deposit date") documentation_deposit_date %} +            {% endwith %}              {% with finds_deadline=item.finds_deadline|date:"DATE_FORMAT"|default:"" %}              {% field_flex "Deadline for submission of the finds" finds_deadline %}              {% endwith %}              {% field_flex "Finds provided" item.finds_received %} +            {% with finds_deposit_date=item.finds_deposit_date|date:"DATE_FORMAT"|default:"" %} +            {% field_flex _("Finds deposit date") finds_deposit_date %} +            {% endwith %}              {% field_flex_detail "Associated file" item.associated_file %}              {% field_flex "Résultat considéré comme négatif" item.negative_result %} diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index 48c0786f2..655958a5e 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -15,8 +15,10 @@ v4.0.XX - 2099-12-31  - Context record:    - identification type changes to hierarchical (#5739)    - cultural attribution field (#5740) -- Operation: improve sheet (#5753) -- Operation: rename "operation code" to "yearly index" +- Operation: +  - improve sheet (#5753) +  - rename "operation code" to "yearly index" +  - finds and documentation deposit dates   - Find:    - conservation state becomes multi-valued (#5904)    - batch update: "previous id" can be changed for many find diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 581bcc6eb..57de99d24 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -13,8 +13,10 @@ v4.0.XX - 2099-12-31  - Unité d'enregistrement :    - type d'identification passe en hiérarchique (#5739)    - ajout de l'attribution culturelle (#5740) -- Opération : amélioration de la fiche (#5753) -- Opération : renommage de "code opération" en "index annuel" +- Opération : +  - amélioration de la fiche (#5753) +  - renommage de "code opération" en "index annuel" +  - ajout des dates de versement du mobilier et de la documentation  - Mobilier :    - État de conserveration devient multi valué (#5904)    - modifications par lot : "Identifiant précédent" peut être changé pour plusieurs mobiliers à la fois | 
