diff options
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 |