diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-07 12:22:27 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-07 12:22:27 +0200 |
| commit | 93364489ab4e6daf16f924b2d8212f7fcdc5e477 (patch) | |
| tree | e0686c289c399330f414b50ff8ef58f642833db2 /archaeological_warehouse/wizards.py | |
| parent | c788bef47de6bca5dda5dd1fa67dd6a2ac02e9b9 (diff) | |
| parent | a8271676a0598594762cc53e4f577337eb275313 (diff) | |
| download | Ishtar-93364489ab4e6daf16f924b2d8212f7fcdc5e477.tar.bz2 Ishtar-93364489ab4e6daf16f924b2d8212f7fcdc5e477.zip | |
Merge branch 'v0.9' into wheezy
Diffstat (limited to 'archaeological_warehouse/wizards.py')
| -rw-r--r-- | archaeological_warehouse/wizards.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/archaeological_warehouse/wizards.py b/archaeological_warehouse/wizards.py index 9ecc16b3f..571e56b1b 100644 --- a/archaeological_warehouse/wizards.py +++ b/archaeological_warehouse/wizards.py @@ -64,6 +64,20 @@ class WarehouseModificationWizard(Wizard): model = models.Warehouse modification = True wizard_done_window = reverse_lazy('show-warehouse') + wizard_templates = { + 'divisions-warehouse_modification': + 'ishtar/wizard/wizard_warehouse_divisions.html', + } + + def get_form_kwargs(self, step=None): + kwargs = super(WarehouseModificationWizard, self).get_form_kwargs(step) + if step == "divisions-warehouse_modification": + current_warehouse = self.get_current_object() + q = models.ContainerLocalisation.objects.filter( + division__warehouse=current_warehouse) + if q.count(): + kwargs['readonly'] = True + return kwargs class WarehouseDeletionWizard(DeletionWizard): |
