diff --git a/addons/survey/report/survey_browse_response.py b/addons/survey/report/survey_browse_response.py index 9fa338b2608..282fea1832f 100644 --- a/addons/survey/report/survey_browse_response.py +++ b/addons/survey/report/survey_browse_response.py @@ -25,6 +25,7 @@ from report.interface import report_rml from tools import to_xml import tools import time +from report import report_sxw class survey_browse_response(report_rml): def create(self, cr, uid, ids, datas, context): @@ -176,6 +177,7 @@ class survey_browse_response(report_rml): + @@ -186,6 +188,7 @@ class survey_browse_response(report_rml): """ surv_resp_obj = pooler.get_pool(cr.dbname).get('survey.response') + rml_obj=report_sxw.rml_parse(cr, uid, surv_resp_obj._name,context) if datas.has_key('form') and datas['form'].has_key('response_ids'): response_id = datas['form']['response_ids'] elif context.has_key('response_id') and context['response_id']: @@ -200,15 +203,22 @@ class survey_browse_response(report_rml): for response in surv_resp_obj.browse(cr, uid, response_id): for survey in surv_obj.browse(cr, uid, [response.survey_id.id]): tbl_width = float(_tbl_widths.replace('cm', '')) - colwidth = "4.6cm,5cm," + str(tbl_width - 16.4) +"cm,4cm,3cm" + colwidth = "2.5cm,4.8cm," + str(tbl_width - 15.0) +"cm,3.2cm,4.5cm" resp_create = tools.ustr(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) rml += """ - Answer Create Date:- - """ + to_xml(resp_create) + """ - - Answer By:- - """ + to_xml(response.user_id.login or '') + """ + Print Date : + """ + to_xml(rml_obj.formatLang(time.strftime("%Y-%m-%d %H:%M:%S"),date_time=True)) + """ + + Answered by : + """ + to_xml(response.user_id.login or '') + """ + + + + + + Answer Date : + """ + to_xml(resp_create) + """ """