summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-05 14:21:37 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-05 14:21:37 +0100
commit329d91cd38d57d686d24f999c6a57f72662f9844 (patch)
tree26c842f547666eb98f2a2e702a662c4e1bd23b57 /archaeological_operations/models.py
parentd44f0e3856295776a48f38ad3611ce3b0a899343 (diff)
downloadIshtar-329d91cd38d57d686d24f999c6a57f72662f9844.tar.bz2
Ishtar-329d91cd38d57d686d24f999c6a57f72662f9844.zip
Document generation: no more specific action -> available on the sheet
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