diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-07-16 13:03:27 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-07-16 13:03:27 +0200 | 
| commit | 6bb7d4cbf47c61fd168998a0423a31814eaa7fe0 (patch) | |
| tree | f0b7c63834d4fe9125d043893dad8765975a78b1 /archaeological_operations/views.py | |
| parent | 3748baac6501db293424d1ae5d092e8672a68f7f (diff) | |
| parent | 242c13fdc9895abdcd1af79bce2a9b3f98f3f939 (diff) | |
| download | Ishtar-6bb7d4cbf47c61fd168998a0423a31814eaa7fe0.tar.bz2 Ishtar-6bb7d4cbf47c61fd168998a0423a31814eaa7fe0.zip | |
Merge branch 'master-WIP-treatments'
Diffstat (limited to 'archaeological_operations/views.py')
| -rw-r--r-- | archaeological_operations/views.py | 38 | 
1 files changed, 20 insertions, 18 deletions
| diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 14160266b..90f71abfe 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -253,27 +253,29 @@ def check_files_for_operation(self):          return False      return get_current_profile().files +ope_crea_condition_dict = { +    'filechoice-operation_creation': +    check_files_for_operation, +    'preventive-operation_creation': +    is_preventive('general-operation_creation', models.OperationType, +                  'operation_type', 'prev_excavation'), +    'preventivediag-operation_creation': +    is_preventive('general-operation_creation', models.OperationType, +                  'operation_type', 'arch_diagnostic'), +    'townsgeneral-operation_creation': has_associated_file( +        'filechoice-operation_creation', negate=True), +    'towns-operation_creation': has_associated_file( +        'filechoice-operation_creation'), +    'parcelsgeneral-operation_creation': has_associated_file( +        'filechoice-operation_creation', negate=True), +    'parcels-operation_creation': has_associated_file( +        'filechoice-operation_creation'), +} +  operation_creation_wizard = OperationWizard.as_view(      wizard_steps,      label=_(u"New operation"), -    condition_dict={ -        'filechoice-operation_creation': -        check_files_for_operation, -        'preventive-operation_creation': -        is_preventive('general-operation_creation', models.OperationType, -                      'operation_type', 'prev_excavation'), -        'preventivediag-operation_creation': -        is_preventive('general-operation_creation', models.OperationType, -                      'operation_type', 'arch_diagnostic'), -        'townsgeneral-operation_creation': has_associated_file( -            'filechoice-operation_creation', negate=True), -        'towns-operation_creation': has_associated_file( -            'filechoice-operation_creation'), -        'parcelsgeneral-operation_creation': has_associated_file( -            'filechoice-operation_creation', negate=True), -        'parcels-operation_creation': has_associated_file( -            'filechoice-operation_creation'), -    }, +    condition_dict=ope_crea_condition_dict,      url_name='operation_creation',)  operation_modification_wizard = OperationModificationWizard.as_view([ | 
