diff options
-rw-r--r-- | archaeological_context_records/models.py | 4 | ||||
-rw-r--r-- | archaeological_finds/models_finds.py | 6 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 6 | ||||
-rw-r--r-- | docs/fr/source/annexe-tech-3-variables-gen.rst | 9 |
4 files changed, 17 insertions, 8 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 1576088ed..6a3d2254b 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -663,6 +663,10 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, }) return dct + DOC_VALUES = [ + ("base_finds.", _("List of associated base finds")), + ] + def get_values(self, prefix='', no_values=False, filtr=None, **kwargs): no_base_finds = True if "no_base_finds" in kwargs: diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index cf58952c9..9d14cc2ba 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1843,6 +1843,8 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem, DOC_VALUES = [ ("base_finds.", _("List of associated base finds")), + ("material_types_label", _("Material types string")), + ("material_types_code", _("Material types code string")), ] def get_material_types_code(self) -> str: @@ -1871,8 +1873,8 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem, no_base_finds = kwargs["no_base_finds"] values = super(Find, self).get_values( prefix=prefix, no_values=no_values, filtr=filtr, **kwargs) - if not filtr or prefix + 'material_types' in filtr: - values[prefix + 'material_types'] = self.get_material_types() + if not filtr or prefix + 'material_types_label' in filtr: + values[prefix + 'material_types_label'] = self.get_material_types() if not filtr or prefix + 'material_types_code' in filtr: values[prefix + 'material_types_code'] = \ self.get_material_types_code() diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 16bbaab40..7244d60ed 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1429,11 +1429,9 @@ class Container(DocumentItem, Merge, LightHistorizedItem, _("Associated context record - use it with caution, " "only return the first found context_record")), ("material_types", - _("Material types inside the container - sorted by alphabetical " - "order")), + _("Material types inside the container - string")), ("material_types_code", - _("Material types code inside the container - sorted by " - "alphabetical order")), + _("Material types code - string")), ] def get_material_types_code(self) -> str: diff --git a/docs/fr/source/annexe-tech-3-variables-gen.rst b/docs/fr/source/annexe-tech-3-variables-gen.rst index e23f091de..6b58cf705 100644 --- a/docs/fr/source/annexe-tech-3-variables-gen.rst +++ b/docs/fr/source/annexe-tech-3-variables-gen.rst @@ -301,7 +301,9 @@ Chaque opération dispose des :ref:`champs géographiques <valeurs-champs-geo>`, - **comment** : *Texte* - Commentaire - **common_name** : *Texte* - Nom générique - **complete_identifier** : *Texte* - Complete identifier +- **containers.** : List of associated containers - **Field only available for template generation** - **context_record__** : *→ Unité d'Enregistrement (opération)* +- **context_records.** : List of associated context records - **Field only available for template generation** - **cost** : *Entier* - Coût (euros) - **creation_date** : *Date* - Date de création - **custom_index** : *Entier* - Custom index @@ -458,6 +460,7 @@ Chaque unité d'enregistrement dispose des :ref:`champs géographiques <valeurs- - **activity__** : *→ Type d'activité* (**label** Dénomination, **txt_idx** Identifiant textuel) - Activité - **archaeological_site__** : *→ Entité archéologique* - Entité archéologique +- **base_finds.** : List of associated base finds - **Field only available for template generation** - **base_finds__** : *→ Mobilier d'origine (unité d'enregistrement)* - **cached_label** : *Texte* - Nom en cache - **cached_periods** : *Texte* - Nom en cache des périodes - Généré automatiquement - ne pas éditer @@ -597,6 +600,8 @@ Chaque élément mobilier dispose du champ `data__` ainsi que des champs suivant - **material_comment** : *Texte* - Commentaire relatif au matériau - **material_type_quality__** : *→ Type de qualité du type de matériaux* (**label** Dénomination, **txt_idx** Identifiant textuel) - Qualité du type de matériaux - **material_types__** : *→ Type de matériau* (**label** Dénomination, **txt_idx** Identifiant textuel) - Types de matériau +- **material_types_code** : Material types code string - **Field only available for template generation** +- **material_types_label** : Material types string - **Field only available for template generation** - **min_number_of_individuals** : *Entier* - Nombre minimum d'individus (NMI) - **museum_id** : *Texte* - Identifiant musée - **object_type_quality__** : *→ Type de qualité du type d'objet* (**label** Dénomination, **txt_idx** Identifiant textuel) - Qualité du type d'objet @@ -745,8 +750,8 @@ Chaque contenant dispose des :ref:`champs géographiques <valeurs-champs-geo>`, - **index** : *Entier* - Container ID - **location__** : *→ Lieu de conservation* - Localisation (lieu de conservation) - **main_image__** : *→ Document* - Image principale -- **material_types** : Material types inside the container - sorted by alphabetical order - **Field only available for template generation** -- **material_types_code** : Material types code inside the container - sorted by alphabetical order - **Field only available for template generation** +- **material_types** : Material types inside the container - string - **Field only available for template generation** +- **material_types_code** : Material types code - string - **Field only available for template generation** - **old_reference** : *Texte* - Ancienne référence - **operation_** : Associated operation - use it with caution, only return the first found operation - **Field only available for template generation** - **parent__** : *→ Contenant* - Parent container |