summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index a0d0ba30b..d1a8b5875 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -1866,6 +1866,16 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter):
if self.treatment_file:
return self.treatment_file
+ def get_extra_templates(self, request):
+ templates = []
+ for template in self.act_type.associated_template.all():
+ urlname = "generatedoc-administrativeactop"
+ templates.append(
+ (template.name, reverse(
+ urlname, args=[self.pk, template.pk]))
+ )
+ return templates
+
def get_filename(self):
filename = self.related_item.associated_filename
filename = u"-".join(filename.split('-')[:-1]) # remove date