diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-08-29 17:22:48 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-05 16:09:19 +0200 |
commit | 1720a9a24b4d53cd4d5981f1b847bd3642fa6fae (patch) | |
tree | f3fa122ebc9f98091a9511abff79088de71c299d /archaeological_warehouse | |
parent | f38be838170e93c60c7f7cd1f1d0f7c0fd0cf2fa (diff) | |
download | Ishtar-1720a9a24b4d53cd4d5981f1b847bd3642fa6fae.tar.bz2 Ishtar-1720a9a24b4d53cd4d5981f1b847bd3642fa6fae.zip |
✨ manage find localization history
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r-- | archaeological_warehouse/migrations/0102_auto_20200408_1823.py | 1 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/archaeological_warehouse/migrations/0102_auto_20200408_1823.py b/archaeological_warehouse/migrations/0102_auto_20200408_1823.py index f2f969ce0..d2bbf95e3 100644 --- a/archaeological_warehouse/migrations/0102_auto_20200408_1823.py +++ b/archaeological_warehouse/migrations/0102_auto_20200408_1823.py @@ -16,6 +16,7 @@ class Migration(migrations.Migration): ('ishtar_common', '0203_auto_20200407_1142'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('archaeological_warehouse', '0101_squashed'), + ('archaeological_finds', '0105_auto_20200407_1414'), ] operations = [ diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index dd6714a41..364926173 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1265,7 +1265,7 @@ class Container( @property def name(self): - return "{} - {}".format(self.container_type.name, self.reference) + return "{} - {}".format(self.container_type.label, self.reference) @property def short_label(self): @@ -1316,6 +1316,11 @@ class Container( cached_label = " - ".join(items) return cached_label + def generate_full_location(self): + full_location = [location.short_label for location in self.get_localisations()] + full_location.append(self.short_label) + return " / ".join(full_location) + def _generate_cached_weight(self): return self.weight if self.weight else self.calculated_weight |