diff options
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index a7a9823b8..091e1e60c 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -619,6 +619,19 @@ class ArchaeologicalSite( if can_add_geo: actions.append(self.get_add_geo_action()) + can_create_operation = self.can_do(request, "change_operation") + if can_create_operation and self.operations.count(): + actions.append( + ( + reverse("site-qa-top-operation", args=[self.pk]), + _("Create a cluster operation for site associated to many operations"), + "fa fa-plus", + _("top ope."), + "", + False + ) + ) + can_edit_site = self.can_do(request, "change_archaeologicalsite") if can_edit_site: actions += [ @@ -797,6 +810,7 @@ class ArchaeologicalSite( right_record=value, relation_type=rel_type, ) + return top_operation def site_post_save(sender, **kwargs): |