From 0f2782138918933284dc982d3185f6e40fefe539 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 22 Aug 2013 08:32:44 +0200 Subject: Add columns to find list (refs #1325) --- .../templates/ishtar/sheet_contextrecord.html | 4 ++++ archaeological_finds/models.py | 1 + archaeological_finds/views.py | 2 +- archaeological_operations/templates/ishtar/sheet_operation.html | 4 ++++ archaeological_warehouse/models.py | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 41e8ebe2a..38c8d2160 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -108,6 +108,8 @@ {% trans "Weight" %} {% trans "Numbers" %} {% trans "Parcel" %} + {% trans "Container ref." %} + {% trans "Warehouse" %}   {% for find in item.base_finds.all %} @@ -123,6 +125,8 @@ {{ find.get_last_find.weight|default:"" }} {{ find.get_last_find.item_number }} {{ item.context_record.parcel.short_label }} + {{ find.get_last_find.container.reference|default:""}} + {{ find.get_last_find.container.location|default:""}} {% trans "Details" %} {#{%trans "Details"%}#} diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index e4ccaf212..e0c72c79a 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -137,6 +137,7 @@ class Find(BaseHistorizedItem, OwnPerms): 'base_finds.context_record.parcel.town', 'base_finds.context_record.parcel.operation.year', 'base_finds.context_record.parcel.operation.operation_code', + 'container.reference', 'container.location', 'base_finds.is_isolated'] if settings.COUNTRY == 'fr': TABLE_COLS.insert(6, diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index c0ee19c9f..1cf93e080 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2012 Étienne Loks +# Copyright (C) 2010-2013 Étienne Loks # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index e1ea28882..7d78af3c5 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -153,6 +153,8 @@ {% trans "Weight" %} {% trans "Numbers" %} {% trans "Parcel" %} + {% trans "Container ref." %} + {% trans "Warehouse" %}   {% for context_record in item.context_record.all %} @@ -169,6 +171,8 @@ {{ find.get_last_find.weight|default:"" }} {{ find.get_last_find.item_number }} {{ context_record.parcel.short_label }} + {{ find.get_last_find.container.reference|default:""}} + {{ find.get_last_find.container.location|default:""}} {% trans "Details" %} {#{%trans "Details"%}#} diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index d67a5768c..14e3a248c 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -68,7 +68,7 @@ class Container(LightHistorizedItem): location = models.ForeignKey(Warehouse, verbose_name=_(u"Warehouse")) container_type = models.ForeignKey(ContainerType, verbose_name=_("Container type")) - reference = models.CharField(_(u"Reference"), max_length=40) + reference = models.CharField(_(u"Container ref."), max_length=40) comment = models.TextField(_(u"Comment")) class Meta: -- cgit v1.2.3