diff options
| author | Valérie-Emma Leroux <valerie-emma.leroux@iggdrasil.net> | 2017-04-07 11:40:31 +0200 | 
|---|---|---|
| committer | Valérie-Emma Leroux <valerie-emma.leroux@iggdrasil.net> | 2017-04-07 11:40:31 +0200 | 
| commit | 655236dd5d04d6527184a58ef8622e75c73f8a65 (patch) | |
| tree | f773b80964981c231c892ee5255b94285bc5620a /archaeological_operations/wizards.py | |
| parent | dc08e5f643562a6ecf3b208c1e2cd44e5350af3c (diff) | |
| parent | a4f1766d2217b1a3bc4d1d17625d9d808eed7416 (diff) | |
| download | Ishtar-655236dd5d04d6527184a58ef8622e75c73f8a65.tar.bz2 Ishtar-655236dd5d04d6527184a58ef8622e75c73f8a65.zip | |
Merge branch 'master' of git.iggdrasil.net:/srv/git/ishtar
Conflicts:
	archaeological_operations/templates/ishtar/sheet_operation.html
Diffstat (limited to 'archaeological_operations/wizards.py')
| -rw-r--r-- | archaeological_operations/wizards.py | 13 | 
1 files changed, 11 insertions, 2 deletions
| diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 94aafb87c..c132c24be 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2012-2016  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2017  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -43,7 +43,7 @@ class OperationWizard(Wizard):      object_parcel_type = 'operation'      parcel_step_key = 'parcels'      relations_step_key = 'relations' -    # step contening the current(s) town(s) +    # step including the current(s) town(s)      town_step_keys = ['towns-', 'townsgeneral-']      town_input_id = 'town'  # input id of the current(s) town(s)      multi_towns = False  # true if current town are multi valued @@ -275,6 +275,15 @@ class OperationModificationWizard(OperationWizard):      modification = True      filter_owns = {'selec-operation_modification': ['pk']} +    def get_form_kwargs(self, step, **kwargs): +        kwargs = super(OperationModificationWizard, self).get_form_kwargs( +            step, **kwargs) +        print(step) +        if step != "relations-operation_modification": +            return kwargs +        kwargs["left_record"] = self.get_current_object() +        return kwargs +  class OperationClosingWizard(ClosingWizard):      model = models.Operation | 
