diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-09 23:20:50 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-09 23:20:50 +0100 |
commit | 5e03cbd6883439616f7e35302f4089d86f2a7055 (patch) | |
tree | 7fdf88c5a49a6b8097e37a574f8d7e44ae4301a9 /archaeological_warehouse/forms.py | |
parent | 258dad10c5884c4bac01677c0a66cf0525a5018d (diff) | |
download | Ishtar-5e03cbd6883439616f7e35302f4089d86f2a7055.tar.bz2 Ishtar-5e03cbd6883439616f7e35302f4089d86f2a7055.zip |
Container: manage location and responsible
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r-- | archaeological_warehouse/forms.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index d61658b0e..e91d04d61 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -149,11 +149,18 @@ class WarehouseDeletionForm(FinalForm): class ContainerForm(ManageOldType, forms.Form): form_label = _(u"Container") associated_models = {'container_type': models.ContainerType, - 'location': models.Warehouse} + 'location': models.Warehouse, + 'responsible': models.Warehouse} reference = forms.CharField(label=_(u"Ref.")) container_type = forms.ChoiceField(label=_(u"Container type"), choices=[]) location = forms.IntegerField( - label=_(u"Warehouse"), + label=_(u"Current location (warehouse)"), + widget=widgets.JQueryAutoComplete( + reverse_lazy('autocomplete-warehouse'), + associated_model=models.Warehouse, new=True), + validators=[valid_id(models.Warehouse)]) + responsible = forms.IntegerField( + label=_(u"Responsible warehouse"), widget=widgets.JQueryAutoComplete( reverse_lazy('autocomplete-warehouse'), associated_model=models.Warehouse, new=True), |