summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r--archaeological_warehouse/forms.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index d51dcf1f4..846e7cb46 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -143,6 +143,8 @@ class WarehouseForm(ManageOldType, forms.Form):
class ContainerForm(ManageOldType, forms.Form):
form_label = _(u"Container")
+ associated_models = {'container_type': models.ContainerType,
+ 'location': models.Warehouse}
reference = forms.CharField(label=_(u"Ref."))
container_type = forms.ChoiceField(label=_(u"Container type"), choices=[])
location = forms.IntegerField(
@@ -203,6 +205,12 @@ ContainerFormSelection = get_form_selection(
_(u"You should select a container."), new=True,
new_message=_(u"Add a new container"))
+MainContainerFormSelection = get_form_selection(
+ 'ContainerFormSelection', _(u"Container search"), 'pk',
+ models.Container, ContainerSelect, 'get-container',
+ _(u"You should select a container.")
+)
+
class BasePackagingForm(SelectFindBasketForm):
form_label = _(u"Packaging")