diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-09-24 12:12:55 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:20 +0100 |
commit | eb039681c8ac7fbab9905b1a3dedc355523ee8ba (patch) | |
tree | 7a1e97c5c3f01470ea28b32163d7ddc4699c5085 /archaeological_warehouse/models.py | |
parent | e538b5e3629c40e2a04dc354209fbae86ee07cf0 (diff) | |
download | Ishtar-eb039681c8ac7fbab9905b1a3dedc355523ee8ba.tar.bz2 Ishtar-eb039681c8ac7fbab9905b1a3dedc355523ee8ba.zip |
Stats for containers
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r-- | archaeological_warehouse/models.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index d24985645..d30a90f56 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -17,6 +17,7 @@ # See the file COPYING for details. +from collections import OrderedDict import datetime import uuid @@ -538,6 +539,15 @@ class Container(DocumentItem, Merge, LightHistorizedItem, QRCodeItem, GeoItem, ] PARENT_SEARCH_VECTORS = ["parent"] + STATISTIC_MODALITIES_OPTIONS = OrderedDict([ + ("location__name", _("Location (warehouse)")), + ("responsible__name", _("Responsible (warehouse)")), + ('finds__base_finds__context_record__operation__cached_label', + _("Operation")), + ]) + STATISTIC_MODALITIES = [ + key for key, lbl in STATISTIC_MODALITIES_OPTIONS.items()] + # search parameters EXTRA_REQUEST_KEYS = { 'location': 'location__pk', |