summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 13997a632..d18181722 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -915,6 +915,13 @@ class OperationSource(Source):
return u"{}-{:04d}".format(self.operation.code_patriarche or '',
self.index)
+ @classmethod
+ def get_query_owns(cls, user):
+ return (Q(operation__in_charge=user.ishtaruser.person) |
+ Q(operation__scientist=user.ishtaruser.person) |
+ Q(operation__collaborators__pk=user.ishtaruser.person.pk)) \
+ & Q(operation__end_date__isnull=True)
+
class ActType(GeneralType):
TYPE = (('F', _(u'Archaeological file')),