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/models.py | |
parent | f38be838170e93c60c7f7cd1f1d0f7c0fd0cf2fa (diff) | |
download | Ishtar-1720a9a24b4d53cd4d5981f1b847bd3642fa6fae.tar.bz2 Ishtar-1720a9a24b4d53cd4d5981f1b847bd3642fa6fae.zip |
✨ manage find localization history
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r-- | archaeological_warehouse/models.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 |