From 758ee42b4970372d38d620f80c51854abc64a69f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 17 Dec 2013 01:53:53 +0100 Subject: Choose document to generate at the end of create/modif process --- archaeological_operations/wizards.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archaeological_operations/wizards.py') diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 86af26351..a61452733 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -281,7 +281,8 @@ class OperationAdministrativeActWizard(OperationWizard): except models.ActType.DoesNotExist: pass if act_type and act_type.associated_template.count(): - context['extra_form'] = GenerateDocForm() + context['extra_form'] = GenerateDocForm( + choices=act_type.associated_template.all()) return context def get_associated_item(self, dct): @@ -323,7 +324,7 @@ class OperationAdministrativeActWizard(OperationWizard): if level == len(keys): # the whole tree as been traversed # redirect to the generated doc dct['redirect'] = reverse('generatedoc-administrativeactop', - args=[admact.pk]) + args=[admact.pk, r[0]]) res = render_to_response('ishtar/wizard/wizard_done.html', dct, context_instance=RequestContext(self.request)) -- cgit v1.2.3