From a51aec0053b95dcc0fb93dcfb0ad3be95ff39839 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 8 Dec 2020 18:49:13 +0100 Subject: Sheet files: add operation shortcut --- archaeological_files/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'archaeological_files/models.py') diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 4b0501e96..bef7d53a1 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -719,6 +719,17 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem, _("Add associated administrative act"), "fa fa-plus", _("admin. act"), "", False), ] + if self.can_do(request, 'add_operation'): + actions += [ + ( + reverse('file-add-operation', args=[self.pk]), + _("Add operation"), + "fa fa-plus", + _("operation"), + "", + False + ) + ] return actions def save(self, *args, **kwargs): -- cgit v1.2.3