summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/forms.py
diff options
context:
space:
mode:
authorCefin <kevon@tuta.io>2021-10-28 18:30:32 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-16 17:04:41 +0100
commitee5acf1f4a5317a85136fbd4d08042be4dfa50d2 (patch)
tree738f5d0c46af8d1b16329407ba8be614a7d94709 /archaeological_warehouse/forms.py
parentd2539c0d1814e6d8bdf116b64e77680bbbf32268 (diff)
downloadIshtar-ee5acf1f4a5317a85136fbd4d08042be4dfa50d2.tar.bz2
Ishtar-ee5acf1f4a5317a85136fbd4d08042be4dfa50d2.zip
modify location type on warehouse lot #5183 part one
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r--archaeological_warehouse/forms.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index 6638140d6..010b6a292 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -696,16 +696,17 @@ class QAContainerFormMulti(QAForm):
PREFIX = "qa"
form_admin_name = _("Container - Quick action - Modify")
form_slug = "container-quickaction-modify"
- base_models = ["qaparent", "qacontainer_type", "qalocation", "qaresponsibility"]
+ base_models = ["qaparent", "qacontainer_type", "qalocation", "qalocation_type", "qaresponsibility"]
associated_models = {
"qaparent": models.Container,
"qacontainer_type": models.ContainerType,
"qalocation": models.Warehouse,
+ "qalocation_type": models.WarehouseType,
"qaresponsibility": models.Warehouse,
}
MULTI = True
- REPLACE_FIELDS = ["qaparent", "qacontainer_type", "qalocation", "qaresponsibility"]
+ REPLACE_FIELDS = ["qaparent", "qacontainer_type", "qalocation", "qalocation_type", "qaresponsibility"]
HEADERS = {
"qalocation": FormHeader(_("Warehouse")),
@@ -723,6 +724,9 @@ class QAContainerFormMulti(QAForm):
validators=[valid_id(models.Warehouse)],
required=False,
)
+ qalocation_type = forms.ChoiceField(
+ label=_("Location type"), required=False, choices=[]
+ )
qaresponsibility = forms.IntegerField(
label=_("Responsibility"),
widget=widgets.JQueryAutoComplete(
@@ -744,6 +748,7 @@ class QAContainerFormMulti(QAForm):
TYPES = [
FieldType("qacontainer_type", models.ContainerType),
+ FieldType("qalocation_type", models.WarehouseType),
]
def __init__(self, *args, **kwargs):