summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-07-24 20:49:46 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-07-24 20:49:46 +0200
commita08125ea103ab4f2baa3962aea47f01817749807 (patch)
treeae1c3c70b8bf6f324e420d125603f7b710ed4098 /archaeological_operations
parent148b58dcbe01c00d0ac096ae72d70686802e758f (diff)
downloadIshtar-a08125ea103ab4f2baa3962aea47f01817749807.tar.bz2
Ishtar-a08125ea103ab4f2baa3962aea47f01817749807.zip
New sorting and displaying rules in shortcut menu (refs #1562)
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index a3f61f713..2c148366b 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -229,7 +229,7 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem):
def get_owns(cls, user):
owns = super(Operation, cls).get_owns(user)
#owns = owns.annotate(null_count=Count('operation_code'))
- return owns.order_by("-year", "operation_code")
+ return owns.order_by("common_name", "-year", "operation_code")
def __unicode__(self):
if self.cached_label:
@@ -413,6 +413,8 @@ def operation_post_save(sender, **kwargs):
operation.fnap_financing = fnap_percent
operation.save()
cached_label_changed(sender, **kwargs)
+ if operation.associated_file:
+ operation.associated_file.update_short_menu_class()
post_save.connect(operation_post_save, sender=Operation)
class OperationByDepartment(models.Model):