diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-22 13:41:02 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-22 13:41:02 +0200 |
| commit | dafc5d16f3095bad00356b6198afcd5bbeab61d6 (patch) | |
| tree | 7040d1fd325ba67b890122059a8f50a3857e332a /archaeological_warehouse | |
| parent | 64bb69c03ce1688c72b3f7ebd0e1550cd941aa69 (diff) | |
| parent | 0ecd905165193897129a71a1e8203232f0b2b68c (diff) | |
| download | Ishtar-dafc5d16f3095bad00356b6198afcd5bbeab61d6.tar.bz2 Ishtar-dafc5d16f3095bad00356b6198afcd5bbeab61d6.zip | |
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_warehouse')
| -rw-r--r-- | archaeological_warehouse/locale/django.pot | 14 | ||||
| -rw-r--r-- | archaeological_warehouse/models.py | 9 | ||||
| -rw-r--r-- | archaeological_warehouse/views.py | 9 |
3 files changed, 17 insertions, 15 deletions
diff --git a/archaeological_warehouse/locale/django.pot b/archaeological_warehouse/locale/django.pot index 4300d1d19..7155bb63e 100644 --- a/archaeological_warehouse/locale/django.pot +++ b/archaeological_warehouse/locale/django.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" -#: forms.py:34 forms.py:97 models.py:47 models.py:78 +#: forms.py:34 forms.py:97 models.py:47 models.py:87 msgid "Warehouse" msgstr "" @@ -22,7 +22,7 @@ msgstr "" msgid "Person in charge" msgstr "" -#: forms.py:54 forms.py:102 models.py:44 models.py:82 +#: forms.py:54 forms.py:102 models.py:44 models.py:91 msgid "Comment" msgstr "" @@ -50,7 +50,7 @@ msgstr "" msgid "Phone" msgstr "" -#: forms.py:93 models.py:85 +#: forms.py:93 models.py:94 msgid "Container" msgstr "" @@ -58,7 +58,7 @@ msgstr "" msgid "Ref." msgstr "" -#: forms.py:95 forms.py:128 models.py:69 models.py:80 +#: forms.py:95 forms.py:128 models.py:69 models.py:89 msgid "Container type" msgstr "" @@ -74,7 +74,7 @@ msgstr "" msgid "Add a new container" msgstr "" -#: forms.py:146 ishtar_menu.py:33 views.py:94 +#: forms.py:146 ishtar_menu.py:33 views.py:87 msgid "Packaging" msgstr "" @@ -142,10 +142,10 @@ msgstr "" msgid "Container types" msgstr "" -#: models.py:81 +#: models.py:90 msgid "Container ref." msgstr "" -#: models.py:86 +#: models.py:95 msgid "Containers" msgstr "" diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 17495bf72..389cc4f5a 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -75,6 +75,15 @@ post_delete.connect(post_save_cache, sender=ContainerType) class Container(LightHistorizedItem): TABLE_COLS = ['reference', 'container_type', 'location'] + + # search parameters + EXTRA_REQUEST_KEYS = { + 'location': 'location__pk', + 'container_type': 'container_type__pk', + 'reference': 'reference__icontains', + } + + # fields location = models.ForeignKey(Warehouse, verbose_name=_(u"Warehouse")) container_type = models.ForeignKey(ContainerType, verbose_name=_("Container type")) diff --git a/archaeological_warehouse/views.py b/archaeological_warehouse/views.py index 486c2a1e0..d8027a9a6 100644 --- a/archaeological_warehouse/views.py +++ b/archaeological_warehouse/views.py @@ -29,14 +29,7 @@ from wizards import * from ishtar_common.forms import FinalForm from forms import * -get_container = get_item( - models.Container, - 'get_container', 'container', - extra_request_keys={ - 'location': 'location__pk', - 'container_type': 'container_type__pk', - 'reference': 'reference__icontains', - }) +get_container = get_item(models.Container, 'get_container', 'container') new_warehouse = new_item(models.Warehouse, WarehouseForm) new_container = new_item(models.Container, ContainerForm) |
