From 9a391abe2cc7d8da1ef7f9a50961a7d3133f7991 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 27 Jan 2010 19:29:28 +0530 Subject: [PATCH] {ADD] Survey :- add wizard file. bzr revid: apa@tinyerp.com-20100127135928-3hi02x5j2skeu5bn --- addons/survey/wizard/wizard_browse_answer.py | 52 ++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 addons/survey/wizard/wizard_browse_answer.py diff --git a/addons/survey/wizard/wizard_browse_answer.py b/addons/survey/wizard/wizard_browse_answer.py new file mode 100644 index 00000000000..00b56268a1a --- /dev/null +++ b/addons/survey/wizard/wizard_browse_answer.py @@ -0,0 +1,52 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import wizard +import time +import pooler +from random import choice +import string +import tools +from tools.translate import _ + +_survey_form = ''' +
+ +''' + +_survey_fields = { + 'response_ids': {'string': 'Survey', 'type': 'many2many', 'relation': 'survey.response'}, + } + +class browse_answer_wizard(wizard.interface): + states = { + 'init' : { + 'actions' : [], + 'result' : {'type' : 'form', 'arch' :_survey_form, 'fields' :_survey_fields,\ + 'state' : [('end', 'Cancel', 'gtk-cancel'), ('print', 'Print', 'gtk-print')]} + }, + 'print': { + 'actions': [], + 'result': {'type':'print', 'report':'survey.browse.response', 'state':'end'} + } + } +browse_answer_wizard('wizard.browse.answer')