From fda77743c85ccfeeec7c53bf16af4c432326605a Mon Sep 17 00:00:00 2001 From: Cefin Date: Mon, 29 Nov 2021 12:07:47 +0000 Subject: rapid action add document with parent source #5172 --- ishtar_common/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index e87e6c5a2..197ac5dcc 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -4210,6 +4210,18 @@ class Document( True, ) ) + can_create_document = self.can_do(request, "add_document") + if can_create_document: + actions += [ + ( + reverse("create-document-source", args=[self.pk]), + _("Add document with source parent"), + "fa fa-plus", + _("Doc./src"), + "", + False, + ) + ] return actions @property -- cgit v1.2.3