summaryrefslogtreecommitdiff
path: root/ishtar/furnitures/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar/furnitures/models.py')
-rw-r--r--ishtar/furnitures/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py
index e3c434f7a..01296c109 100644
--- a/ishtar/furnitures/models.py
+++ b/ishtar/furnitures/models.py
@@ -334,6 +334,12 @@ class Operation(BaseHistorizedItem, OwnPerms):
if getattr(self, k)]
return u" - ".join(items)
+ @classmethod
+ def get_owns(cls, user, order_by=['-year', '-operation_code']):
+ if user.is_anonymous():
+ return []
+ return cls.objects.filter(history_modifier=user).order_by(*order_by
+ ).all()
class Parcel(LightHistorizedItem):
associated_file = models.ForeignKey(File, related_name='parcels',