diff options
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 |
commit | 329d91cd38d57d686d24f999c6a57f72662f9844 (patch) | |
tree | 26c842f547666eb98f2a2e702a662c4e1bd23b57 /archaeological_operations/models.py | |
parent | d44f0e3856295776a48f38ad3611ce3b0a899343 (diff) | |
download | Ishtar-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.py | 10 |
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 |