summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-12-03 16:14:20 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:22 +0100
commit7bc043c6e96706baa8ffff66d910437aea4492ec (patch)
tree5d658292ca339f6db9f6c4537850e352b0b26d99 /archaeological_warehouse/forms.py
parenta971793ef9759c6b99c674ba676607abd743e76b (diff)
downloadIshtar-7bc043c6e96706baa8ffff66d910437aea4492ec.tar.bz2
Ishtar-7bc043c6e96706baa8ffff66d910437aea4492ec.zip
Container QA form: fix parent add - fix field layout (refs #4996 - refs #4997)
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r--archaeological_warehouse/forms.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index 9ff09bde4..5fcc105cd 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -266,10 +266,10 @@ class ContainerForm(CustomForm, ManageOldType, forms.Form):
associated_models = {'container_type': models.ContainerType,
'location': models.Warehouse,
'parent': models.Container}
- reference = forms.CharField(label=_(u"Ref."), max_length=200)
- old_reference = forms.CharField(label=_(u"Old reference"), required=False,
+ reference = forms.CharField(label=_("Ref."), max_length=200)
+ old_reference = forms.CharField(label=_("Old reference"), required=False,
max_length=200)
- container_type = forms.ChoiceField(label=_(u"Container type"), choices=[])
+ container_type = forms.ChoiceField(label=_("Container type"), choices=[])
location = forms.IntegerField(
label=_("Current location (warehouse)"),
widget=widgets.JQueryAutoComplete(
@@ -333,6 +333,7 @@ class ContainerForm(CustomForm, ManageOldType, forms.Form):
dct['container_type'] = models.ContainerType.objects.get(
pk=dct['container_type'])
dct['location'] = models.Warehouse.objects.get(pk=dct['location'])
+ dct['parent'] = models.Container.objects.get(pk=dct['parent'])
new_item = models.Container(**dct)
new_item.save()
return new_item