summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-23 19:58:47 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-23 19:58:47 +0100
commit0accf6b851bf9e9984734ab0c9ac79ba79853059 (patch)
tree186fdeaec10e06781817280b315f35a4d48bb974
parent538348c38472391d1d30552666dd5d585e2d7c6a (diff)
downloadIshtar-0accf6b851bf9e9984734ab0c9ac79ba79853059.tar.bz2
Ishtar-0accf6b851bf9e9984734ab0c9ac79ba79853059.zip
Sheet find: explicit localisation (refs #3387)
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html8
-rw-r--r--archaeological_warehouse/models.py3
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 %}
</ul>
+{% if item.container %}
+<h3>{% trans "Localisation"%}</h3>
+{% 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 %}
<h3>{% trans "Treatments"%}</h3>
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):