summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-06-13 17:36:56 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-06-13 17:36:56 +0200
commit9b7239d30ec8625de9ef42a861f37775a32dca78 (patch)
tree5ca0c0012ea734fdcaa1ef7f92542dc55a358435 /archaeological_operations/models.py
parentfe0d3dab9d0123f5e92b61daf7b270a20bd25333 (diff)
downloadIshtar-9b7239d30ec8625de9ef42a861f37775a32dca78.tar.bz2
Ishtar-9b7239d30ec8625de9ef42a861f37775a32dca78.zip
🐛 archaeological sites: remove "add operation" shortcuts (refs #6329)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py35
1 files changed, 1 insertions, 34 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index af689f421..3717ba9b9 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -31,7 +31,7 @@ from django.contrib.gis.db.models.functions import Centroid
from django.contrib.postgres.indexes import GinIndex
from django.contrib.sites.models import Site
from django.db import transaction, OperationalError, IntegrityError
-from django.db.models import Q, Count, Sum, Max, Avg
+from django.db.models import Q, Max
from django.db.models.signals import post_save, m2m_changed, post_delete
from django.forms import ValidationError
from django.urls import reverse
@@ -594,14 +594,6 @@ class ArchaeologicalSite(
QA_EDIT,
QA_LOCK,
QuickAction(
- url="site-add-operation",
- icon_class="fa fa-plus",
- text=_("Create associated operation"),
- target="many",
- rights=["change_operation"],
- is_popup=False
- ),
- QuickAction(
url="site-qa-duplicate",
icon_class="fa fa-clone",
text=_("Duplicate"),
@@ -799,31 +791,6 @@ class ArchaeologicalSite(
),
]
- can_create_operation = self.can_do(request, "change_operation")
- if can_create_operation and not self.operations.count():
- actions.append(
- (
- reverse("site-add-operation", args=[self.pk]),
- _("Create an operation associated to this site"),
- "fa fa-plus",
- _("ope."),
- "",
- False
- )
- )
-
- if can_create_operation and self.operations.count():
- actions.append(
- (
- reverse("site-add-top-operation", args=[self.pk]),
- _("Create a cluster operation for site associated to many operations"),
- "fa fa-plus",
- _("top ope."),
- "",
- False
- )
- )
-
if can_edit_site:
actions += [
(