summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index e62c41887..5bffe9851 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -1741,6 +1741,16 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, QRCodeItem,
def limited_non_modif_treatments(self):
return self.non_modif_treatments(15)
+ def associated_treatment_files(self):
+ from archaeological_finds.models_treatments import \
+ TreatmentFile
+ return TreatmentFile.objects.filter(
+ associated_basket__items__pk=self.pk).order_by(
+ 'reception_date', 'creation_date', 'end_date')
+
+ def associated_treatment_files_count(self):
+ return self.associated_treatment_files().count()
+
@property
def weight_string(self):
if not self.weight: