diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-23 22:15:34 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-23 22:15:34 +0100 |
commit | 167068ad8073f52780e64d09668fe9b7557085e1 (patch) | |
tree | 5ebd08808fbbc580392c11dc70a0ed29fef99480 /archaeological_warehouse/forms.py | |
parent | 291aaf52135ace669b6fc86f43d5f6420c0c4435 (diff) | |
download | Ishtar-167068ad8073f52780e64d09668fe9b7557085e1.tar.bz2 Ishtar-167068ad8073f52780e64d09668fe9b7557085e1.zip |
Container: Localisation form become modification form
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r-- | archaeological_warehouse/forms.py | 8 |
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") |