2010-01-20 14:28:28 +00:00
|
|
|
# -*- encoding: utf-8 -*-
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# OpenERP, Open Source Management Solution
|
|
|
|
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). 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 <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
import pooler
|
|
|
|
from report.interface import report_rml
|
|
|
|
from tools import to_xml
|
|
|
|
import tools
|
2010-01-25 07:19:49 +00:00
|
|
|
import time
|
2010-01-20 14:28:28 +00:00
|
|
|
|
|
|
|
class survey_browse_response(report_rml):
|
|
|
|
def create(self, cr, uid, ids, datas, context):
|
2010-02-09 07:29:37 +00:00
|
|
|
_divide_columns_for_matrix = 0.7
|
|
|
|
_display_ans_in_rows = 5
|
|
|
|
_pageSize = ('29.7cm','21.1cm')
|
2010-03-15 11:19:53 +00:00
|
|
|
|
|
|
|
if datas.has_key('form') and datas['form'].get('orientation','') == 'vertical':
|
|
|
|
if datas['form'].get('paper_size','') == 'letter':
|
2010-02-09 07:29:37 +00:00
|
|
|
_pageSize = ('21.6cm','27.9cm')
|
2010-03-15 11:19:53 +00:00
|
|
|
elif datas['form'].get('paper_size','') == 'legal':
|
2010-02-09 07:29:37 +00:00
|
|
|
_pageSize = ('21.6cm','35.6cm')
|
2010-03-15 11:19:53 +00:00
|
|
|
elif datas['form'].get('paper_size','') == 'a4':
|
2010-02-09 07:29:37 +00:00
|
|
|
_pageSize = ('21.1cm','29.7cm')
|
2010-03-15 11:19:53 +00:00
|
|
|
|
|
|
|
elif datas.has_key('form') and datas['form'].get('orientation',False) == 'horizontal':
|
|
|
|
if datas['form'].get('paper_size','') == 'letter':
|
2010-02-09 07:29:37 +00:00
|
|
|
_pageSize = ('27.9cm','21.6cm')
|
2010-03-15 11:19:53 +00:00
|
|
|
elif datas['form'].get('paper_size','') == 'legal':
|
2010-02-09 07:29:37 +00:00
|
|
|
_pageSize = ('35.6cm','21.6cm')
|
2010-03-15 11:19:53 +00:00
|
|
|
elif datas['form'].get('paper_size') == 'a4':
|
2010-02-09 07:29:37 +00:00
|
|
|
_pageSize = ('29.7cm','21.1cm')
|
|
|
|
|
|
|
|
_frame_width = tools.ustr(_pageSize[0])
|
|
|
|
_frame_height = tools.ustr(float(_pageSize[1].replace('cm','')) - float(1.90))+'cm'
|
|
|
|
_tbl_widths = tools.ustr(float(_pageSize[0].replace('cm','')) - float(2.10))+'cm'
|
2010-04-05 11:59:01 +00:00
|
|
|
rml ="""<document filename="Survey Answer Report.pdf">
|
|
|
|
<template pageSize="("""+_pageSize[0]+""","""+_pageSize[1]+""")" title='Survey Answer.pdf' author="Martin Simon" allowSplitting="20" >
|
2010-01-20 14:28:28 +00:00
|
|
|
<pageTemplate id="first">
|
2010-02-09 07:29:37 +00:00
|
|
|
<frame id="first" x1="0.0cm" y1="1.0cm" width='"""+_frame_width+"""' height='"""+_frame_height+"""'/>
|
|
|
|
<pageGraphics>
|
|
|
|
<lineMode width="1.0"/>
|
|
|
|
<lines>1.0cm """+tools.ustr(float(_pageSize[1].replace('cm','')) - float(1.00))+'cm'+""" """+tools.ustr(float(_pageSize[0].replace('cm','')) - float(1.00))+'cm'+""" """+tools.ustr(float(_pageSize[1].replace('cm','')) - float(1.00))+'cm'+"""</lines>
|
|
|
|
<lines>1.0cm """+tools.ustr(float(_pageSize[1].replace('cm','')) - float(1.00))+'cm'+""" 1.0cm 1.00cm</lines>
|
|
|
|
<lines>"""+tools.ustr(float(_pageSize[0].replace('cm','')) - float(1.00))+'cm'+""" """+tools.ustr(float(_pageSize[1].replace('cm','')) - float(1.00))+'cm'+""" """+tools.ustr(float(_pageSize[0].replace('cm','')) - float(1.00))+'cm'+""" 1.00cm</lines>
|
|
|
|
<lines>1.0cm 1.00cm """+tools.ustr(float(_pageSize[0].replace('cm','')) - float(1.00))+'cm'+""" 1.00cm</lines>"""
|
|
|
|
if datas.has_key('form') and datas['form']['page_number']:
|
|
|
|
rml +="""
|
|
|
|
<fill color="gray"/>
|
|
|
|
<setFont name="Helvetica" size="10"/>
|
|
|
|
<drawRightString x='"""+tools.ustr(float(_pageSize[0].replace('cm','')) - float(1.00))+'cm'+"""' y="0.6cm">Page : <pageNumber/> </drawRightString>"""
|
|
|
|
rml +="""</pageGraphics>
|
|
|
|
</pageTemplate>
|
|
|
|
</template>
|
2010-01-20 14:28:28 +00:00
|
|
|
<stylesheet>
|
2010-02-09 07:29:37 +00:00
|
|
|
<blockTableStyle id="tbl_white">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="tbl_gainsboro">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
<blockBackground colorName="gainsboro" start="0,0" stop="-1,-1"/>
|
|
|
|
</blockTableStyle>
|
2010-01-20 14:28:28 +00:00
|
|
|
<blockTableStyle id="ans_tbl_white">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="ans_tbl_gainsboro">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
|
|
|
<blockBackground colorName="gainsboro" start="0,0" stop="-1,-1"/>
|
|
|
|
</blockTableStyle>
|
2010-02-09 07:29:37 +00:00
|
|
|
<blockTableStyle id="simple_table">
|
2010-01-20 14:28:28 +00:00
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#e6e6e6"/>
|
|
|
|
</blockTableStyle>
|
2010-02-03 08:35:53 +00:00
|
|
|
<blockTableStyle id="note_table">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
</blockTableStyle>
|
2010-01-20 14:28:28 +00:00
|
|
|
<blockTableStyle id="Table2">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="Table3">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,0" stop="2,-1"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="Table4">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="1,-1"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="Table5">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#8f8f8f" start="0,-1" stop="1,-1"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="Table41">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="Table51">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
<lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
|
|
|
|
</blockTableStyle>
|
2010-01-21 13:11:07 +00:00
|
|
|
<blockTableStyle id="Table_heading">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
</blockTableStyle>
|
2010-02-09 07:29:37 +00:00
|
|
|
<blockTableStyle id="title_tbl">
|
2010-01-21 13:11:07 +00:00
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
2010-02-09 07:29:37 +00:00
|
|
|
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="1,-1"/>
|
|
|
|
<blockBackground colorName="black" start="0,0" stop="-1,-1"/>
|
|
|
|
<blockTextColor colorName="white" start="0,0" stop="0,0"/>
|
|
|
|
</blockTableStyle>
|
|
|
|
<blockTableStyle id="page_tbl">
|
|
|
|
<blockAlignment value="LEFT"/>
|
|
|
|
<blockValign value="TOP"/>
|
|
|
|
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="1,-1"/>
|
|
|
|
<blockBackground colorName="gray" start="0,0" stop="-1,-1"/>
|
|
|
|
<blockTextColor colorName="white" start="0,0" stop="0,0"/>
|
2010-01-21 13:11:07 +00:00
|
|
|
</blockTableStyle>
|
2010-01-20 14:28:28 +00:00
|
|
|
<initialize>
|
|
|
|
<paraStyle name="all" alignment="justify"/>
|
|
|
|
</initialize>
|
2010-02-09 07:29:37 +00:00
|
|
|
<paraStyle name="title" fontName="helvetica-bold" fontSize="18.0" leftIndent="0.0" textColor="white"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<paraStyle name="answer_right" alignment="RIGHT" fontName="helvetica" fontSize="09.0" leftIndent="2.0"/>
|
|
|
|
<paraStyle name="Standard1" fontName="helvetica-bold" alignment="RIGHT" fontSize="09.0"/>
|
|
|
|
<paraStyle name="Standard" alignment="LEFT" fontName="Helvetica-Bold" fontSize="11.0"/>
|
|
|
|
<paraStyle name="header1" fontName="Helvetica" fontSize="11.0"/>
|
|
|
|
<paraStyle name="response" fontName="Helvetica-oblique" fontSize="9.5"/>
|
|
|
|
<paraStyle name="page" fontName="helvetica" fontSize="11.0" leftIndent="0.0"/>
|
|
|
|
<paraStyle name="question" fontName="helvetica-boldoblique" fontSize="10.0" leftIndent="3.0"/>
|
|
|
|
<paraStyle name="answer_bold" fontName="Helvetica-Bold" fontSize="09.0" leftIndent="2.0"/>
|
|
|
|
<paraStyle name="answer" fontName="helvetica" fontSize="09.0" leftIndent="2.0"/>
|
|
|
|
<paraStyle name="answer1" fontName="helvetica" fontSize="09.0" leftIndent="2.0"/>
|
|
|
|
<paraStyle name="Title" fontName="helvetica" fontSize="20.0" leading="15" spaceBefore="6.0" spaceAfter="6.0" alignment="CENTER"/>
|
|
|
|
<paraStyle name="P2" fontName="Helvetica" fontSize="14.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
|
|
<paraStyle name="comment" fontName="Helvetica" fontSize="14.0" leading="50" spaceBefore="0.0" spaceAfter="0.0"/>
|
|
|
|
<paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="12" spaceBefore="0.0" spaceAfter="1.0"/>
|
|
|
|
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
|
|
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
2010-02-09 07:29:37 +00:00
|
|
|
<paraStyle name="terp_tblheader_General_Centre_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
|
|
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
|
|
<paraStyle name="terp_tblheader_General_right_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
|
|
<paraStyle name="terp_tblheader_General_right" fontName="Helvetica-Bold" fontSize="10.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
|
|
<paraStyle name="descriptive_text" fontName="helvetica-bold" fontSize="18.0" leftIndent="0.0" textColor="white"/>
|
|
|
|
<paraStyle name="descriptive_text_heading" fontName="helvetica-bold" fontSize="18.0" alignment="RIGHT" leftIndent="0.0" textColor="white"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
</stylesheet>
|
|
|
|
<images/>
|
2010-02-09 07:29:37 +00:00
|
|
|
<story>"""
|
2010-01-20 14:28:28 +00:00
|
|
|
surv_resp_obj = pooler.get_pool(cr.dbname).get('survey.response')
|
2010-01-27 13:55:23 +00:00
|
|
|
if datas.has_key('form') and datas['form'].has_key('response_ids'):
|
2010-03-22 07:40:07 +00:00
|
|
|
response_id = datas['form']['response_ids']
|
2010-03-02 13:24:06 +00:00
|
|
|
elif context.has_key('response_id') and context['response_id']:
|
2010-03-04 10:30:15 +00:00
|
|
|
response_id = [int(context['response_id'][0])]
|
2010-01-27 13:55:23 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
response_id = surv_resp_obj.search(cr, uid, [('survey_id', 'in', ids)])
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
surv_resp_line_obj = pooler.get_pool(cr.dbname).get('survey.response.line')
|
|
|
|
surv_obj = pooler.get_pool(cr.dbname).get('survey')
|
2010-02-05 09:48:02 +00:00
|
|
|
surv_ans_obj = pooler.get_pool(cr.dbname).get('survey.answer')
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-09 07:29:37 +00:00
|
|
|
for response in surv_resp_obj.browse(cr, uid, response_id):
|
2010-01-27 13:55:23 +00:00
|
|
|
for survey in surv_obj.browse(cr, uid, [response.survey_id.id]):
|
2010-02-09 07:29:37 +00:00
|
|
|
tbl_width = float(_tbl_widths.replace('cm', ''))
|
|
|
|
colwidth = "4.6cm,5cm," + str(tbl_width - 16.4) +"cm,4cm,3cm"
|
|
|
|
rml += """<blockTable colWidths='""" + colwidth + """' style="Table_heading">
|
2010-01-27 13:55:23 +00:00
|
|
|
<tr>
|
2010-04-05 11:59:01 +00:00
|
|
|
<td><para style="terp_tblheader_General_Centre">Answer Create Date:- </para></td>
|
2010-10-17 17:30:00 +00:00
|
|
|
# *-* formatting hard coded, breaks with utf8
|
2010-02-09 07:29:37 +00:00
|
|
|
<td><para style="terp_tblheader_General_Centre_simple">""" + to_xml(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) + """</para></td>
|
|
|
|
<td><para style="terp_tblheader_General_Centre"></para></td>
|
2010-04-05 11:59:01 +00:00
|
|
|
<td><para style="terp_tblheader_General_right">Answer By:- </para></td>
|
2010-05-11 10:16:07 +00:00
|
|
|
<td><para style="terp_tblheader_General_right_simple">""" + to_xml(response.user_id.login or '') + """</para></td>
|
2010-01-27 13:55:23 +00:00
|
|
|
</tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable><para style="P2"></para>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-09 07:29:37 +00:00
|
|
|
status = "Not Finished"
|
|
|
|
if response.state == "done": status = "Finished"
|
|
|
|
colwidth = str(tbl_width - 7) + "cm,"
|
|
|
|
colwidth += "7cm"
|
|
|
|
rml += """<blockTable colWidths='""" + str(colwidth) + """' style="title_tbl">
|
|
|
|
<tr>
|
|
|
|
<td><para style="title">""" + to_xml(tools.ustr(survey.title)) + """</para><para style="P2"><font></font></para></td>
|
|
|
|
<td><para style="descriptive_text_heading">Status :- """ + to_xml(tools.ustr(status)) + """</para><para style="P2"><font></font></para></td>
|
|
|
|
</tr>
|
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-09 07:29:37 +00:00
|
|
|
if survey.note:
|
|
|
|
rml += """<blockTable colWidths='""" + _tbl_widths + """' style="note_table">
|
2010-02-10 05:25:42 +00:00
|
|
|
<tr><td><para style="response">""" + to_xml(tools.ustr(survey.note or '')) + """</para><para style="P2"><font></font></para></td></tr>
|
2010-01-27 13:55:23 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
for page in survey.page_ids:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="page_tbl">
|
2010-02-10 05:25:42 +00:00
|
|
|
<tr><td><para style="page">Page :- """ + to_xml(tools.ustr(page.title or '')) + """</para></td></tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-02-03 08:35:53 +00:00
|
|
|
if page.note:
|
|
|
|
rml += """<para style="P2"></para>
|
2010-02-09 07:29:37 +00:00
|
|
|
<blockTable colWidths='""" + str(_tbl_widths) + """' style="note_table">
|
2010-02-10 05:25:42 +00:00
|
|
|
<tr><td><para style="response">""" + to_xml(tools.ustr(page.note or '')) + """</para></td></tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
for que in page.question_ids:
|
2010-01-22 12:13:46 +00:00
|
|
|
rml += """<para style="P2"></para>
|
2010-02-09 07:29:37 +00:00
|
|
|
<blockTable colWidths='""" + str(_tbl_widths) + """' style="Table5">
|
[IMP]:survey,crm_hr,hr_evaluation.(Ref-YSA,APA)
-Rename Defination into Definition.
-When you click on test, answer or edit survey, remove the first screen with the selection box to select the survey.
-Add survey Types in demo data: Human Resources, Customer Feeback, Supplier Selection.
-In search view of surveys, remove the vertical separator between draft and open buttons, for type field set widget=selection.
-The button for responsible=my in the search view must be default="1".
-change demo data so that some surveys belongs to admin and some to demo user.
-The browse Response report must be renamed into "Print Answers".
-Browse the answer in the screen instead of printing a PDF.
-In the history one2many, first put the date and then the user.
-I started a survey but did not finished it. so that's normal but I was not able to restart the survey (it says I already answered).
-Removed the "Que: " prefix in each report.
bzr revid: apa@tinyerp.com-20100223093223-vwhgkn8kmdo8e6mo
2010-02-23 09:32:23 +00:00
|
|
|
<tr><td><para style="question">""" + to_xml(to_xml(que.question)) + """</para></td></tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-09 07:29:37 +00:00
|
|
|
answer = surv_resp_line_obj.browse(cr ,uid, surv_resp_line_obj.search(cr, uid, [('question_id', '=', que.id),('response_id', '=', response.id)]))
|
2010-01-27 13:55:23 +00:00
|
|
|
if que.type in ['descriptive_text']:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml +="""<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
|
|
|
<tr><td> <para style="response">""" + to_xml(tools.ustr(que.descriptive_text)) + """</para></td> </tr>
|
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
elif que.type in ['table']:
|
|
|
|
if len(answer) and answer[0].state == "done":
|
|
|
|
col_heading = pooler.get_pool(cr.dbname).get('survey.tbl.column.heading')
|
|
|
|
cols_widhts = []
|
2010-02-09 07:29:37 +00:00
|
|
|
tbl_width = float(_tbl_widths.replace('cm', ''))
|
|
|
|
for i in range(0, len(que.column_heading_ids)):
|
|
|
|
cols_widhts.append(tbl_width / float(len(que.column_heading_ids)))
|
|
|
|
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
|
|
|
colWidths = colWidths + 'cm'
|
2010-01-27 13:55:23 +00:00
|
|
|
matrix_ans = []
|
|
|
|
rml +="""<para style="P2"></para><blockTable colWidths=" """ + str(colWidths) + """ " style="Table41"><tr>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
for col in que.column_heading_ids:
|
|
|
|
if col.title not in matrix_ans:
|
|
|
|
matrix_ans.append(col.title)
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<td> <para style="terp_tblheader_Details">""" + to_xml(tools.ustr(col.title)) +"""</para></td>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
rml += """</tr></blockTable>"""
|
2010-02-09 07:29:37 +00:00
|
|
|
i = 0
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
for row in range(0, que.no_of_rows):
|
2010-03-15 11:19:53 +00:00
|
|
|
if i%2 != 0:
|
|
|
|
style = 'tbl_white'
|
2010-02-09 07:29:37 +00:00
|
|
|
else:
|
2010-03-15 11:19:53 +00:00
|
|
|
style = 'tbl_gainsboro'
|
2010-10-06 12:30:01 +00:00
|
|
|
i +=1
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths=" """ + str(colWidths) + """ " style='"""+style+"""'><tr>"""
|
|
|
|
table_data = col_heading.browse(cr, uid, col_heading.search(cr, uid, [('response_table_id', '=', answer[0].id), ('name', '=', row)]))
|
2010-01-27 13:55:23 +00:00
|
|
|
for column in matrix_ans:
|
2010-02-03 08:35:53 +00:00
|
|
|
value = False
|
2010-01-27 13:55:23 +00:00
|
|
|
for col in table_data:
|
|
|
|
if column == col.column_id.title:
|
|
|
|
value = col.value
|
2010-02-03 08:35:53 +00:00
|
|
|
if value:
|
|
|
|
rml += """<td> <para style="terp_default_9">""" + to_xml(tools.ustr(value)) +"""</para></td>"""
|
|
|
|
else:
|
|
|
|
rml += """<td><para style="terp_default_9"><font color ="white"> </font></para></td>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
rml += """</tr></blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml +="""<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
2010-04-05 11:59:01 +00:00
|
|
|
<tr><td> <para style="response">No Answer</para></td> </tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
elif que.type in ['multiple_choice_only_one_ans','multiple_choice_multiple_ans']:
|
|
|
|
if len(answer) and answer[0].state == "done":
|
2010-02-05 09:48:02 +00:00
|
|
|
ans_list = []
|
2010-01-27 13:55:23 +00:00
|
|
|
for ans in answer[0].response_answer_ids:
|
2010-02-05 09:48:02 +00:00
|
|
|
ans_list.append(to_xml(tools.ustr(ans.answer_id.answer)))
|
|
|
|
answer_choice=[]
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-05 09:48:02 +00:00
|
|
|
for ans in que['answer_choice_ids']:
|
|
|
|
answer_choice.append(to_xml(tools.ustr((ans.answer))))
|
2010-02-08 10:04:34 +00:00
|
|
|
|
2010-02-05 09:48:02 +00:00
|
|
|
def divide_list(lst, n):
|
|
|
|
return [lst[i::n] for i in range(n)]
|
2010-02-08 10:04:34 +00:00
|
|
|
|
2010-02-05 09:48:02 +00:00
|
|
|
divide_list = divide_list(answer_choice,_display_ans_in_rows)
|
|
|
|
for lst in divide_list:
|
|
|
|
if que.type == 'multiple_choice_multiple_ans':
|
2010-02-09 07:29:37 +00:00
|
|
|
if len(lst) <> 0 and len(lst) <> int(round(float(len(answer_choice)) / _display_ans_in_rows, 0)):
|
2010-02-05 09:48:02 +00:00
|
|
|
lst.append('')
|
|
|
|
if not lst:
|
|
|
|
del divide_list[divide_list.index(lst):]
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-05 09:48:02 +00:00
|
|
|
for divide in divide_list:
|
2010-02-09 07:29:37 +00:00
|
|
|
a = _divide_columns_for_matrix * len(divide)
|
|
|
|
b = float(_tbl_widths.replace('cm', '')) - float(a)
|
|
|
|
cols_widhts = []
|
|
|
|
for div in range(0, len(divide)):
|
|
|
|
cols_widhts.append(float(a / len(divide)))
|
|
|
|
cols_widhts.append(float(b / len(divide)))
|
|
|
|
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
|
|
|
colWidths = colWidths +'cm'
|
|
|
|
rml += """<blockTable colWidths=" """ + colWidths + """ " style="simple_table"><tr>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-09 07:29:37 +00:00
|
|
|
for div in range(0, len(divide)):
|
|
|
|
if divide[div] != '':
|
2010-02-05 09:48:02 +00:00
|
|
|
if que.type == 'multiple_choice_multiple_ans':
|
|
|
|
if divide[div] in ans_list:
|
|
|
|
rml += """<td><illustration><fill color="white"/>
|
2010-02-09 07:29:37 +00:00
|
|
|
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
|
|
|
|
<fill color="gray"/>
|
|
|
|
<rect x="0.2cm" y="-0.35cm" width="0.3 cm" height="0.3cm" fill="yes" stroke="no" round="0.1cm"/>
|
|
|
|
</illustration></td>
|
|
|
|
<td><para style="answer">""" + divide[div] + """</para></td>"""
|
2010-02-05 09:48:02 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml+="""<td><illustration>
|
2010-02-05 09:48:02 +00:00
|
|
|
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="no" stroke="yes" round="0.1cm"/>
|
2010-02-09 07:29:37 +00:00
|
|
|
</illustration></td>
|
|
|
|
<td><para style="answer">""" + divide[div] + """</para></td>"""
|
2010-02-05 09:48:02 +00:00
|
|
|
else:
|
|
|
|
if divide[div] in ans_list:
|
|
|
|
rml += """<td><illustration><fill color="white"/>
|
|
|
|
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes" round="0.1cm"/>
|
|
|
|
<fill color="gray"/>
|
|
|
|
<circle x="0.3cm" y="-0.18cm" radius="0.10 cm" fill="yes" stroke="no" round="0.1cm"/>
|
|
|
|
</illustration></td>
|
|
|
|
<td><para style="answer">""" + divide[div] + """</para></td>"""
|
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<td>
|
|
|
|
<illustration>
|
|
|
|
<circle x="0.3cm" y="-0.18cm" radius="0.23 cm" fill="no" stroke="yes" round="0.1cm"/>
|
|
|
|
</illustration>
|
|
|
|
</td>
|
|
|
|
<td><para style="answer">""" + divide[div] + """</para></td>"""
|
2010-02-05 09:48:02 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<td></td><td></td>"""
|
|
|
|
rml += """</tr></blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-05 09:48:02 +00:00
|
|
|
if que.is_comment_require and answer[0].comment:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table"><tr>
|
2010-01-27 13:55:23 +00:00
|
|
|
<td><para style="answer">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr></blockTable>"""
|
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
2010-04-05 11:59:01 +00:00
|
|
|
<tr><td> <para style="response">No Answer</para></td> </tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-04 10:20:01 +00:00
|
|
|
elif que.type in ['multiple_textboxes_diff_type','multiple_textboxes','date','date_and_time','numerical_textboxes','multiple_textboxes_diff_type']:
|
2010-01-27 13:55:23 +00:00
|
|
|
if len(answer) and answer[0].state == "done":
|
2010-02-09 07:29:37 +00:00
|
|
|
cols_widhts = []
|
|
|
|
cols_widhts.append(float(_tbl_widths.replace('cm',''))/2)
|
|
|
|
cols_widhts.append(float(_tbl_widths.replace('cm',''))/2)
|
|
|
|
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
|
|
|
colWidths = tools.ustr(colWidths) + 'cm'
|
2010-02-05 09:48:02 +00:00
|
|
|
answer_list = {}
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
for ans in answer[0].response_answer_ids:
|
2010-02-05 09:48:02 +00:00
|
|
|
answer_list[ans.answer_id.answer] = ans.answer
|
|
|
|
for que_ans in que['answer_choice_ids']:
|
|
|
|
if que_ans.answer in answer_list:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(colWidths) + """' style="simple_table">
|
|
|
|
<tr> <td> <para style="response">""" + to_xml(tools.ustr(que_ans.answer)) + """</para></td>
|
|
|
|
<td> <para style="response">""" + to_xml(tools.ustr(answer_list[que_ans.answer])) + """</para></td></tr>
|
|
|
|
</blockTable>"""
|
2010-02-05 09:48:02 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(colWidths) + """' style="simple_table">
|
|
|
|
<tr> <td> <para style="response">""" + to_xml(tools.ustr(que_ans.answer)) + """</para></td>
|
|
|
|
<td> <para style="response"></para></td></tr>
|
|
|
|
</blockTable>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
2010-04-05 11:59:01 +00:00
|
|
|
<tr> <td> <para style="response">No Answer</para></td> </tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
elif que.type in ['single_textbox']:
|
|
|
|
if len(answer) and answer[0].state == "done":
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
|
|
|
<tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].single_text)) + """</para></td></tr>
|
|
|
|
</blockTable>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
2010-04-05 11:59:01 +00:00
|
|
|
<tr> <td> <para style="response">No Answer</para></td> </tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
elif que.type in ['comment']:
|
|
|
|
if len(answer) and answer[0].state == "done":
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
|
|
|
<tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr>
|
|
|
|
</blockTable>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
2010-04-05 11:59:01 +00:00
|
|
|
<tr> <td> <para style="response">No Answer</para></td> </tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-09 07:29:37 +00:00
|
|
|
elif que.type in ['matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans', 'rating_scale', 'matrix_of_drop_down_menus']:
|
2010-01-27 13:55:23 +00:00
|
|
|
if len(answer) and answer[0].state == "done":
|
2010-02-09 07:29:37 +00:00
|
|
|
if que.type in ['matrix_of_choices_only_one_ans', 'rating_scale'] and que.comment_column:
|
2010-01-27 13:55:23 +00:00
|
|
|
pass
|
|
|
|
cols_widhts = []
|
2010-02-09 07:29:37 +00:00
|
|
|
if len(que.column_heading_ids):
|
|
|
|
cols_widhts.append(float(_tbl_widths.replace('cm','')) / float(2.0))
|
|
|
|
for col in que.column_heading_ids:
|
|
|
|
cols_widhts.append(float((float(_tbl_widths.replace('cm','')) / float(2.0)) / len(que.column_heading_ids)))
|
|
|
|
else:
|
|
|
|
cols_widhts.append(float(_tbl_widths.replace('cm','')))
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-09 07:29:37 +00:00
|
|
|
tmp = 0.0
|
|
|
|
sum = 0.0
|
2010-01-27 13:55:23 +00:00
|
|
|
i = 0
|
2010-02-01 13:31:10 +00:00
|
|
|
if que.type in ['matrix_of_choices_only_one_ans','rating_scale'] and que.comment_column:
|
2010-01-27 13:55:23 +00:00
|
|
|
for col in cols_widhts:
|
2010-02-09 07:29:37 +00:00
|
|
|
if i == 0:
|
|
|
|
cols_widhts[i] = cols_widhts[i] / 2.0
|
2010-01-27 13:55:23 +00:00
|
|
|
tmp = cols_widhts[i]
|
|
|
|
sum += col
|
2010-02-09 07:29:37 +00:00
|
|
|
i += 1
|
|
|
|
cols_widhts.append(round(tmp, 2))
|
|
|
|
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
|
|
|
colWidths = colWidths + 'cm'
|
|
|
|
matrix_ans = [(0, ''),]
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
for col in que.column_heading_ids:
|
|
|
|
if col.title not in matrix_ans:
|
2010-02-09 07:29:37 +00:00
|
|
|
matrix_ans.append((col.id, col.title))
|
2010-01-27 13:55:23 +00:00
|
|
|
len_matrix = len(matrix_ans)
|
2010-02-09 07:29:37 +00:00
|
|
|
if que.type in ['matrix_of_choices_only_one_ans', 'rating_scale'] and que.comment_column:
|
2010-03-23 06:44:59 +00:00
|
|
|
matrix_ans.append((0,que.column_name))
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths=" """ + colWidths + """ " style="simple_table"><tr>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-04 10:20:01 +00:00
|
|
|
for mat_col in range(0, len(matrix_ans)):
|
2010-03-15 11:19:53 +00:00
|
|
|
rml += """<td><para style="response">""" + to_xml(tools.ustr(matrix_ans[mat_col][1])) + """</para></td>"""
|
|
|
|
rml += """</tr>"""
|
|
|
|
rml += """</blockTable>"""
|
|
|
|
i = 0
|
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
for ans in que.answer_choice_ids:
|
2010-02-09 07:29:37 +00:00
|
|
|
if i%2 != 0:
|
|
|
|
style = 'ans_tbl_white'
|
2010-01-27 13:55:23 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
style = 'ans_tbl_gainsboro'
|
|
|
|
i += 1
|
|
|
|
rml += """<blockTable colWidths=" """ + colWidths + """ " style='"""+style+"""'>
|
|
|
|
<tr><td><para style="response">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
comment_value = ""
|
|
|
|
for mat_col in range(1, len_matrix):
|
|
|
|
value = """"""
|
|
|
|
for res_ans in answer[0].response_answer_ids:
|
2010-02-04 10:20:01 +00:00
|
|
|
if res_ans.answer_id.id == ans.id and res_ans.column_id.id == matrix_ans[mat_col][0]:
|
2010-02-09 07:29:37 +00:00
|
|
|
comment_value = to_xml(tools.ustr(res_ans.comment_field))
|
2010-01-27 13:55:23 +00:00
|
|
|
if que.type in ['matrix_of_drop_down_menus']:
|
|
|
|
value = """<para style="response">""" + to_xml(tools.ustr(res_ans.value_choice)) + """</para>"""
|
2010-02-09 07:29:37 +00:00
|
|
|
elif que.type in ['matrix_of_choices_only_one_ans', 'rating_scale']:
|
2010-01-27 13:55:23 +00:00
|
|
|
value = """<illustration><fill color="white"/>
|
2010-02-09 07:29:37 +00:00
|
|
|
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes"/>
|
|
|
|
<fill color="gray"/>
|
|
|
|
<circle x="0.3cm" y="-0.18cm" radius="0.10 cm" fill="yes" stroke="no"/>
|
|
|
|
</illustration>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
elif que.type in ['matrix_of_choices_only_multi_ans']:
|
|
|
|
value = """<illustration>
|
2010-02-09 07:29:37 +00:00
|
|
|
<fill color="white"/>
|
|
|
|
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
|
|
|
|
<fill color="gray"/>
|
|
|
|
<rect x="0.2cm" y="-0.35cm" width="0.3 cm" height="0.3cm" fill="yes" stroke="no" round="0.1cm"/>
|
|
|
|
</illustration>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
break
|
|
|
|
else:
|
|
|
|
if que.type in ['matrix_of_drop_down_menus']:
|
|
|
|
value = """"""
|
|
|
|
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']:
|
|
|
|
value = """<illustration><fill color="white"/>
|
2010-02-09 07:29:37 +00:00
|
|
|
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes" round="0.1cm"/>
|
|
|
|
</illustration>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
elif que.type in ['matrix_of_choices_only_multi_ans']:
|
|
|
|
value = """<illustration><fill color="white"/>
|
2010-02-09 07:29:37 +00:00
|
|
|
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
|
|
|
|
</illustration>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
rml+= """<td>""" + value + """</td>"""
|
2010-02-01 13:31:10 +00:00
|
|
|
if que.type in ['matrix_of_choices_only_one_ans','rating_scale'] and que.comment_column:
|
2010-02-09 07:29:37 +00:00
|
|
|
if comment_value == 'False':
|
2010-01-27 13:55:23 +00:00
|
|
|
comment_value = ''
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<td><para style="response">""" + to_xml(tools.ustr(comment_value)) + """</para></td>"""
|
|
|
|
rml += """</tr></blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-02-01 13:31:10 +00:00
|
|
|
if que.is_comment_require:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table"><tr>
|
2010-02-01 13:31:10 +00:00
|
|
|
<td><para style="answer">""" + to_xml(tools.ustr(answer[0].comment or '')) + """</para></td></tr></blockTable>"""
|
2010-01-27 13:55:23 +00:00
|
|
|
else:
|
2010-02-09 07:29:37 +00:00
|
|
|
rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
|
2010-04-05 11:59:01 +00:00
|
|
|
<tr><td> <para style="response">No Answer</para></td> </tr>
|
2010-02-09 07:29:37 +00:00
|
|
|
</blockTable>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-03-04 09:16:44 +00:00
|
|
|
if datas.has_key('form') and not datas['form']['without_pagebreak']:
|
|
|
|
rml += """<pageBreak/>"""
|
|
|
|
elif not datas.has_key('form'):
|
|
|
|
rml += """<pageBreak/>"""
|
|
|
|
else:
|
|
|
|
rml += """<para style="P2"><font></font></para>"""
|
2010-03-15 11:19:53 +00:00
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
rml += """</story></document>"""
|
|
|
|
report_type = datas.get('report_type', 'pdf')
|
|
|
|
create_doc = self.generators[report_type]
|
|
|
|
pdf = create_doc(rml, title=self.title)
|
|
|
|
return (pdf, report_type)
|
|
|
|
|
|
|
|
survey_browse_response('report.survey.browse.response', 'survey','','')
|
|
|
|
|
|
|
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|