diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-10 18:07:39 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-10 18:07:39 +0200 |
commit | 929a7a1512d93c4548fbe6d5aa029ab366c171be (patch) | |
tree | 37ef923de7118129720455cc0b3b5cda7a758c7a | |
parent | 434f2781e98654b56053082b178171224c87105b (diff) | |
download | Ishtar-929a7a1512d93c4548fbe6d5aa029ab366c171be.tar.bz2 Ishtar-929a7a1512d93c4548fbe6d5aa029ab366c171be.zip |
Sheet: show container id in sheets and tables (refs #3747)
-rw-r--r-- | archaeological_finds/models_finds.py | 1 | ||||
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 1 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 3 |
3 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 5f4183f0c..e58d14f7e 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -557,6 +557,7 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel, 'previous_id', 'label', 'material_types__label', 'datings__period__label', 'find_number', 'object_types__label', 'container__cached_label', + 'container__cahed_location', 'description', 'base_finds__context_record__parcel__town', 'base_finds__context_record__parcel', ] diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index c05c221e3..efd38e406 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -75,6 +75,7 @@ {% if item.container %} <h3>{% trans "Warehouse"%}</h3> {% field_detail "Container" item.container %} +{% field "Container ID" item.container.cached_location %} {% field_detail "Responsible warehouse" item.container.responsible %} {% field_detail "Location (warehouse)" item.container.location %} {% field "Precise localisation" item.container.divisions_lbl %} diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index f89343428..41891b341 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -247,6 +247,7 @@ class ContainerType(GeneralType): verbose_name_plural = _(u"Container types") ordering = ('label',) + post_save.connect(post_save_cache, sender=ContainerType) post_delete.connect(post_save_cache, sender=ContainerType) @@ -285,7 +286,7 @@ class Container(LightHistorizedItem, ImageModel): null=True, blank=True) cached_location = models.CharField(_(u"Cached location"), max_length=500, null=True, blank=True) - index = models.IntegerField(u"ID", default=0) + index = models.IntegerField(u"Container ID", default=0) external_id = models.TextField(_(u"External ID"), blank=True, null=True) auto_external_id = models.BooleanField( _(u"External ID is set automatically"), default=False) |