From 1720a9a24b4d53cd4d5981f1b847bd3642fa6fae Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 29 Aug 2024 17:22:48 +0200 Subject: ✨ manage find localization history MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_warehouse/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'archaeological_warehouse/models.py') 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 -- cgit v1.2.3