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 | 9f6cd2687c6a859576b7ba19e7419c1e5847b2f3 (patch) | |
| tree | 7a1e97c5c3f01470ea28b32163d7ddc4699c5085 /archaeological_warehouse/models.py | |
| parent | 83b11ab895faadb7396c3701f6465793e7a8f825 (diff) | |
| download | Ishtar-9f6cd2687c6a859576b7ba19e7419c1e5847b2f3.tar.bz2 Ishtar-9f6cd2687c6a859576b7ba19e7419c1e5847b2f3.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', | 
