From a0c1264e8925fe2fbacfd7bbbb8ccadf5cd02462 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 23 Dec 2016 19:58:47 +0100 Subject: Sheet find: explicit localisation (refs #3387) --- archaeological_finds/templates/ishtar/sheet_find.html | 8 +++++++- archaeological_warehouse/models.py | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 438712101..444c6c5d8 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -73,9 +73,15 @@ {% if item.history_object and item.history_object.CHECK_DICT %} {% field_li "Checked" item.checked|from_dict:item.history_object.CHECK_DICT %} {% endif%} -{% field_detail "Container" item.container %} +{% if item.container %} +

{% trans "Localisation"%}

+{% field_detail "Warehouse" item.container.location %} +{% field_detail "Container" item.container %} +{% field "Localisation" item.container.divisions_lbl %} +{% endif %} + {% if item.upstream_treatment or item.downstream_treatment %}

{% trans "Treatments"%}

diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index a101bf083..156755e18 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -171,8 +171,7 @@ class Container(LightHistorizedItem): unique_together = ('index', 'location') def __unicode__(self): - lbl = u" - ".join((self.reference, unicode(self.container_type), - unicode(self.index), unicode(self.location))) + lbl = u"{} ({})".format(self.reference, self.container_type) return lbl def _generate_cached_label(self): -- cgit v1.2.3