From 4b230a7a793d7904347a78ad7ccb072834430075 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 8 Feb 2010 18:41:12 +0530 Subject: [PATCH] [IMP]:survey,hr_evaluation. -improved the table question type in survey form view. -improved demo data of hr_evaluation. bzr revid: apa@tinyerp.com-20100208131112-isiahykret8ydt0i --- addons/hr_evaluation/hr_evaluation_data.xml | 2 +- addons/survey/report/survey_form.py | 42 +++++++++++++++++---------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/addons/hr_evaluation/hr_evaluation_data.xml b/addons/hr_evaluation/hr_evaluation_data.xml index cfa0089..b7ef977 100644 --- a/addons/hr_evaluation/hr_evaluation_data.xml +++ b/addons/hr_evaluation/hr_evaluation_data.xml @@ -269,7 +269,7 @@ Other - + diff --git a/addons/survey/report/survey_form.py b/addons/survey/report/survey_form.py index c273b77..d06be9d 100644 --- a/addons/survey/report/survey_form.py +++ b/addons/survey/report/survey_form.py @@ -72,6 +72,21 @@ class survey_form(report_rml): + + + + + + + + + + + + + + + @@ -106,20 +121,13 @@ class survey_form(report_rml): - + - - - - - - - @@ -144,7 +152,6 @@ class survey_form(report_rml): """ + to_xml(tools.ustr(survey.title)) + """ """ - if survey.note: rml += """ @@ -280,7 +287,6 @@ class survey_form(report_rml): """ elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']: value = """ - """ else: value = """ @@ -343,18 +349,22 @@ class survey_form(report_rml): cols_widhts.append(tbl_width/float(len(que.column_heading_ids))) colWidths = "cm,".join(map(tools.ustr, cols_widhts)) colWidths = colWidths+'cm' - rml+="""""" + rml+="""""" for col in que.column_heading_ids: rml+="""""" + to_xml(tools.ustr(col.title)) + """""" - rml+=""" - """ + rml+="""""" + i=0 for r in range(0,que.no_of_rows): - rml+="""""" + if i%2!=0: + style='tbl_white' + else: + style='tbl_gainsboro' + i+=1 + rml+="""""" for c in que.column_heading_ids: rml+=""" """ - rml+="""""" - rml+="""""" + rml+="""""" if datas.has_key('form') and not datas['form']['without_pagebreak']: rml+="""""" elif not datas.has_key('form'): -- 1.7.10.4