[ADD] survey, hr_evaluation : taken from trunk-extra-addons branch
bzr revid: hmo@tinyerp.com-20100120142828-zc25st2aqfrn4mop
This commit is contained in:
parent
f84a2add39
commit
76a8a995a1
|
@ -0,0 +1,26 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import hr_evaluation
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "Human Resources Evaluation",
|
||||
"version" : "0.1",
|
||||
"author" : "Tiny",
|
||||
"category" : "Generic Modules/Human Resources",
|
||||
"website" : "http://www.openerp.com",
|
||||
"depends" : ["hr","survey"],
|
||||
"description": "Ability to create employees evaluation.",
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["hr_evaluation_demo.xml"],
|
||||
"update_xml" : [
|
||||
# "security/ir.model.access.csv",
|
||||
"hr_evaluation_view.xml",
|
||||
"hr_evaluation_data.xml"],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from osv import fields, osv
|
||||
|
||||
class hr_evaluation_plan(osv.osv):
|
||||
_name = "hr_evaluation.plan"
|
||||
_description = "Evaluation Plan"
|
||||
_columns = {
|
||||
'name': fields.char("Evaluation Plan", size=64, required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'phase_ids' : fields.one2many('hr_evaluation.plan.phase', 'plan_id', 'Evaluation Phases'),
|
||||
'month_first': fields.integer('First Evaluation After'),
|
||||
'month_next': fields.integer('Next Evaluation After'),
|
||||
'active': fields.boolean('Active')
|
||||
}
|
||||
_defaults = {
|
||||
'active' : lambda *a: True,
|
||||
}
|
||||
hr_evaluation_plan()
|
||||
|
||||
class hr_evaluation_plan_phase(osv.osv):
|
||||
_name = "hr_evaluation.plan.phase"
|
||||
_description = "Evaluation Plan Phase"
|
||||
_order = "sequence"
|
||||
_columns = {
|
||||
'name': fields.char("Phase", size=64, required=True),
|
||||
'sequence': fields.integer("Sequence"),
|
||||
'company_id': fields.related('plan_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
|
||||
'plan_id': fields.many2one('hr_evaluation.plan','Evaluation Plan', required=True, ondelete='cascade'),
|
||||
'action': fields.selection([
|
||||
('top-down','Top-Down Appraisal Requests'),
|
||||
('bottom-up','Bottom-Up Appraisal Requests'),
|
||||
('self','Self Appraisal Requests'),
|
||||
('final','Final Interview')], 'Action', required=True),
|
||||
'survey_id': fields.many2one('survey','Appraisal Form'),
|
||||
'send_answer_manager': fields.boolean('All Answers',
|
||||
help="Send all answers to the manager"),
|
||||
'send_answer_employee': fields.boolean('All Answers',
|
||||
help="Send all answers to the employee"),
|
||||
'send_anonymous_manager': fields.boolean('Anonymous Summary',
|
||||
help="Send an anonymous summary to the manager"),
|
||||
'send_anonymous_employee': fields.boolean('Anonymous Summary',
|
||||
help="Send an anonymous summary to the employee"),
|
||||
'wait': fields.boolean('Wait Previous Phases',
|
||||
help="Check this box if you want to wait that all preceeding phases " +
|
||||
"are finished before launching this phase.")
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'sequence' : lambda *a: 1,
|
||||
}
|
||||
hr_evaluation_plan_phase()
|
||||
|
||||
class hr_employee(osv.osv):
|
||||
_inherit="hr.employee"
|
||||
_columns = {
|
||||
'evaluation_plan_id': fields.many2one('hr_evaluation.plan', 'Evaluation Plan'),
|
||||
'evaluation_date': fields.date('Next Evaluation', help="Date of the next evaluation"),
|
||||
}
|
||||
def onchange_evaluation_plan_id(self, *args):
|
||||
# return the right evaluation date
|
||||
pass
|
||||
hr_employee()
|
||||
|
||||
class hr_evaluation(osv.osv):
|
||||
_name = "hr_evaluation.evaluation"
|
||||
_description = "Employee Evaluation"
|
||||
_rec_name = 'employee_id'
|
||||
_columns = {
|
||||
'date': fields.date("Evaluation Deadline", required=True),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
|
||||
'manager_id': fields.many2one('res.users', "Manager", required=True),
|
||||
'note_summary': fields.text('Evaluation Summary'),
|
||||
'note_action': fields.text('Action Plan',
|
||||
help="If the evaluation does not meet the expectations, you can propose"+
|
||||
"an action plan"),
|
||||
'rating': fields.selection([
|
||||
('0','Significantly bellow expectations'),
|
||||
('1','Did not meet expectations'),
|
||||
('2','Meet expectations'),
|
||||
('3','Exceeds expectations'),
|
||||
('4','Significantly exceeds expectations'),
|
||||
], "Overall Rating", help="This is the overall rating on that summarize the evaluation"),
|
||||
'survey_request_ids': fields.many2many('survey.request',
|
||||
'hr_evaluation_evaluation_requests',
|
||||
'evaluation_id',
|
||||
'survey_id',
|
||||
'Appraisal Forms'),
|
||||
'plan_id': fields.many2one('hr_evaluation.plan', 'Plan'),
|
||||
'phase_id': fields.many2one('hr_evaluation.plan.phase', 'Phase'),
|
||||
'state': fields.selection([
|
||||
('draft','Draft'),
|
||||
('wait','Plan In Progress'),
|
||||
('progress','Final Validation'),
|
||||
('done','Done'),
|
||||
('cancel','Cancelled'),
|
||||
], 'State', required=True,readonly=True)
|
||||
}
|
||||
_defaults = {
|
||||
'date' : lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'state' : lambda *a: 'draft',
|
||||
}
|
||||
|
||||
def button_plan_in_progress(self,cr, uid, ids, context):
|
||||
self.write(cr,uid,ids,{'state':'wait'})
|
||||
return True
|
||||
|
||||
def button_final_validation(self,cr, uid, ids, context):
|
||||
self.write(cr,uid,ids,{'state':'progress'})
|
||||
return True
|
||||
|
||||
def button_done(self,cr, uid, ids, context):
|
||||
self.write(cr,uid,ids,{'state':'done'})
|
||||
return True
|
||||
|
||||
def button_cancel(self,cr, uid, ids, context):
|
||||
self.write(cr,uid,ids,{'state':'cancel'})
|
||||
return True
|
||||
|
||||
hr_evaluation()
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,185 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_plan_form">
|
||||
<field name="name">hr_evaluation.plan.form</field>
|
||||
<field name="model">hr_evaluation.plan</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Evaluation Plan">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection"/>
|
||||
<field name="active"/>
|
||||
<field name="month_first"/>
|
||||
<field name="month_next"/>
|
||||
<label string="(months)" align="0.0"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Evaluation Phases">
|
||||
<field name="phase_ids" nolabel="1" colspan="4"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_plan_tree">
|
||||
<field name="name">hr_evaluation.plan.form</field>
|
||||
<field name="model">hr_evaluation.plan</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Evaluation Plan">
|
||||
<field name="name"/>
|
||||
<field name="month_first"/>
|
||||
<field name="month_next"/>
|
||||
<field name="company_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="open_view_hr_evaluation_plan_tree">
|
||||
<field name="res_model">hr_evaluation.plan</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem name="Evaluations" parent="hr.menu_hr_root" id="menu_eval_hr" sequence="3"/>
|
||||
<!--menuitem name="HR Responsible" parent="menu_eval_hr" id="menu_resp_hr"/-->
|
||||
<menuitem
|
||||
name="Evaluation Plan" parent="menu_eval_hr"
|
||||
id="menu_open_view_hr_evaluation_plan_tree"
|
||||
action="open_view_hr_evaluation_plan_tree"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_plan_phase_form">
|
||||
<field name="name">hr_evaluation.plan.phase.form</field>
|
||||
<field name="model">hr_evaluation.plan.phase</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Evaluation Plan Phase">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name"/>
|
||||
<field name="wait"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
<group col="4" colspan="4">
|
||||
<separator string="Action to Perform" colspan="4"/>
|
||||
<field name="action"/>
|
||||
<field name="survey_id" widget="selection"/>
|
||||
</group>
|
||||
<group col="4" colspan="4">
|
||||
<group col="4" colspan="2">
|
||||
<separator string="Send to Managers" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="send_answer_manager"/>
|
||||
<newline/>
|
||||
<field name="send_anonymous_manager"/>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<separator string="Send to Employees" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="send_answer_employee"/>
|
||||
<newline/>
|
||||
<field name="send_anonymous_employee"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_plan_phase_tree">
|
||||
<field name="name">hr_evaluation.plan.phase.form</field>
|
||||
<field name="model">hr_evaluation.plan.phase</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Evaluation Plan Phase" editable="bottom" >
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="action"/>
|
||||
<field name="survey_id" widget="selection"/>
|
||||
<field name="wait"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_hr_employee_view_form" model="ir.ui.view">
|
||||
<field name="name">hr.hr.employee.view.form</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Evaluation">
|
||||
<field name="evaluation_plan_id"/>
|
||||
<field name="evaluation_date"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_form">
|
||||
<field name="name">hr_evaluation.evaluation.form</field>
|
||||
<field name="model">hr_evaluation.evaluation</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Evaluation">
|
||||
<group col="4" colspan="4">
|
||||
<field name="date" select="1"/>
|
||||
<field name="rating"/>
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="manager_id" select="1"/>
|
||||
<field name="plan_id"/>
|
||||
<field name="phase_id"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Appraisal">
|
||||
<field name="survey_request_ids" nolabel="1" colspan="4"/>
|
||||
</page>
|
||||
<page string="Action Plan">
|
||||
<field name="note_action" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Summary">
|
||||
<field name="note_summary" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<newline/>
|
||||
<group col="6" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="button_plan_in_progress"
|
||||
string="Plan In Progress"
|
||||
states="draft"
|
||||
type="object"/>
|
||||
<button name="button_final_validation"
|
||||
string="Final Validation"
|
||||
states="wait"
|
||||
type="object"/>
|
||||
<button name="button_done"
|
||||
string="Done"
|
||||
states="progress"
|
||||
type="object"/>
|
||||
<button name="button_cancel"
|
||||
string="Cancel"
|
||||
states="draft,wait,progress"
|
||||
type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_tree">
|
||||
<field name="name">hr_evaluation.evaluation.form</field>
|
||||
<field name="model">hr_evaluation.evaluation</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Evaluation">
|
||||
<field name="date"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="manager_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="open_view_hr_evaluation_tree">
|
||||
<field name="res_model">hr_evaluation.evaluation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Evaluation" parent="menu_eval_hr"
|
||||
id="menu_open_view_hr_evaluation_tree"
|
||||
action="open_view_hr_evaluation_tree"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,275 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * hr_evaluation
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.6\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-25 12:18:06+0000\n"
|
||||
"PO-Revision-Date: 2009-11-25 12:18:06+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
#: field:hr_evaluation.type,info:0
|
||||
msgid "Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: constraint:ir.model:0
|
||||
msgid "The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Schedule next evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_bad:0
|
||||
msgid "Bad Points"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.actions.act_window,name:hr_evaluation.open_view_employee_evaluation_next_my_list
|
||||
msgid "My Next Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type,value_ids:0
|
||||
msgid "Values"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_good:0
|
||||
msgid "Good Points"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,state:0
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,score:0
|
||||
#: field:hr_evaluation.quote,score:0
|
||||
#: field:hr_evaluation.type,score:0
|
||||
#: field:hr_evaluation.type.value,score:0
|
||||
msgid "Score"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: selection:hr_evaluation.evaluation,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Informal Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,employee_id:0
|
||||
msgid "Employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_improve:0
|
||||
msgid "To Improve"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,evaluation_id:0
|
||||
msgid "Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type.value,type_id:0
|
||||
msgid "Evaluation Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
msgid "Apply to categories"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.module.module,description:hr_evaluation.module_meta_information
|
||||
msgid "Ability to create employees evaluation."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,name:0
|
||||
msgid "Quote"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type,category_ids:0
|
||||
msgid "Appliable Role"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,user_id:0
|
||||
msgid "Evaluation User"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
msgid "Choices Results"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,date:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_eval_hr
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_form
|
||||
msgid "Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_eval_config
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_next_list
|
||||
msgid "Next Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_evaluation_type_form
|
||||
msgid "Evaluation Criterions"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_my_old_evaluation_list
|
||||
msgid "My Preceeding Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_resp_hr
|
||||
msgid "HR Responsible"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,value_id:0
|
||||
#: field:hr_evaluation.type.value,name:0
|
||||
msgid "Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,name:0
|
||||
msgid "Summary"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type,active:0
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_evaluation
|
||||
msgid "Employee Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_type
|
||||
msgid "Employee Evaluation Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Quotations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.actions.act_window,name:hr_evaluation.open_view_employee_evaluation_next_list
|
||||
msgid "Next Employee Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,type_id:0
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
#: field:hr_evaluation.type,name:0
|
||||
msgid "Evaluation Criterion"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_next_my_list
|
||||
msgid "My Next Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.quote:0
|
||||
msgid "Evalution Quote"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.module.module,shortdesc:hr_evaluation.module_meta_information
|
||||
msgid "Human Resources Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,quote_ids:0
|
||||
msgid "Quotes"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: selection:hr_evaluation.evaluation,state:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_quote
|
||||
msgid "Employee Evaluation Quote"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_employee:0
|
||||
msgid "Employee Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_type_value
|
||||
msgid "Evaluation Type Value"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,275 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * hr_evaluation
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.6\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-25 12:18:06+0000\n"
|
||||
"PO-Revision-Date: 2009-11-25 12:18:06+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
#: field:hr_evaluation.type,info:0
|
||||
msgid "Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: constraint:ir.model:0
|
||||
msgid "The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Schedule next evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_bad:0
|
||||
msgid "Bad Points"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.actions.act_window,name:hr_evaluation.open_view_employee_evaluation_next_my_list
|
||||
msgid "My Next Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type,value_ids:0
|
||||
msgid "Values"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_good:0
|
||||
msgid "Good Points"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,state:0
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,score:0
|
||||
#: field:hr_evaluation.quote,score:0
|
||||
#: field:hr_evaluation.type,score:0
|
||||
#: field:hr_evaluation.type.value,score:0
|
||||
msgid "Score"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: selection:hr_evaluation.evaluation,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Informal Data"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,employee_id:0
|
||||
msgid "Employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_improve:0
|
||||
msgid "To Improve"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,evaluation_id:0
|
||||
msgid "Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type.value,type_id:0
|
||||
msgid "Evaluation Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
msgid "Apply to categories"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.module.module,description:hr_evaluation.module_meta_information
|
||||
msgid "Ability to create employees evaluation."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,name:0
|
||||
msgid "Quote"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type,category_ids:0
|
||||
msgid "Appliable Role"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,user_id:0
|
||||
msgid "Evaluation User"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
msgid "Choices Results"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,date:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_eval_hr
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_form
|
||||
msgid "Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_eval_config
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_next_list
|
||||
msgid "Next Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_evaluation_type_form
|
||||
msgid "Evaluation Criterions"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_my_old_evaluation_list
|
||||
msgid "My Preceeding Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_resp_hr
|
||||
msgid "HR Responsible"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,value_id:0
|
||||
#: field:hr_evaluation.type.value,name:0
|
||||
msgid "Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,name:0
|
||||
msgid "Summary"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.type,active:0
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_evaluation
|
||||
msgid "Employee Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_type
|
||||
msgid "Employee Evaluation Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
msgid "Quotations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.actions.act_window,name:hr_evaluation.open_view_employee_evaluation_next_list
|
||||
msgid "Next Employee Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.quote,type_id:0
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.type:0
|
||||
#: field:hr_evaluation.type,name:0
|
||||
msgid "Evaluation Criterion"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.ui.menu,name:hr_evaluation.menu_open_view_employee_evaluation_next_my_list
|
||||
msgid "My Next Evaluations"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.quote:0
|
||||
msgid "Evalution Quote"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.module.module,shortdesc:hr_evaluation.module_meta_information
|
||||
msgid "Human Resources Evaluation"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,quote_ids:0
|
||||
msgid "Quotes"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: selection:hr_evaluation.evaluation,state:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_quote
|
||||
msgid "Employee Evaluation Quote"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: view:hr_evaluation.evaluation:0
|
||||
#: field:hr_evaluation.evaluation,info_employee:0
|
||||
msgid "Employee Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: model:ir.model,name:hr_evaluation.model_hr_evaluation_type_value
|
||||
msgid "Evaluation Type Value"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_type","hr_evaluation.type","model_hr_evaluation_type",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_type_value","hr_evaluation.type.value","model_hr_evaluation_type_value",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_quote","hr_evaluation.quote","model_hr_evaluation_quote",hr.group_hr_user,1,0,0,0
|
||||
"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation","model_hr_evaluation_evaluation",hr.group_hr_manager,1,1,1,1
|
||||
"access_hr_evaluation_type_manager","hr_evaluation.type","model_hr_evaluation_type",hr.group_hr_manager,1,1,1,1
|
||||
"access_hr_evaluation_type_value_manager","hr_evaluation.type.value","model_hr_evaluation_type_value",hr.group_hr_manager,1,1,1,1
|
||||
"access_hr_evaluation_quote_manager","hr_evaluation.quote","model_hr_evaluation_quote",hr.group_hr_manager,1,1,1,1
|
|
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
|
@ -0,0 +1,27 @@
|
|||
# -*- 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 survey
|
||||
import wizard
|
||||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,40 @@
|
|||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
'name': 'Survey Module',
|
||||
'version': '1.0',
|
||||
'category': 'Tools',
|
||||
'description': """
|
||||
This module is used for surveing. It depends on the answers or reviews of some questions by different users.
|
||||
A survey may have multiple pages. Each page may contain multiple questions and each question may have multiple answers.
|
||||
Different users may give different answers of question and according to that survey is done.
|
||||
Partners are also sent mails with user name and password for the invitation of the survey
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'depends': ['base'],
|
||||
'update_xml': ['survey_report.xml','survey_data.xml','survey_que_wizard.xml','survey_wizard.xml','survey_view.xml','security/ir.model.access.csv'],
|
||||
'demo_xml': ['survey_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,688 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * survey
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.6\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-26 06:01:25+0000\n"
|
||||
"PO-Revision-Date: 2009-11-26 06:01:25+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_form
|
||||
msgid "Surveys"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.report.xml,name:survey.survey
|
||||
msgid "Survey Analysis Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_page_question
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_question_form1
|
||||
msgid "Survey Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.response:0
|
||||
msgid "Set to draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.history,date:0
|
||||
msgid "Date started"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,history:0
|
||||
msgid "History Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,mail:0
|
||||
msgid "Body"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_view_survey_name
|
||||
#: model:ir.ui.menu,name:survey.menu_run_survey_form
|
||||
msgid "Give Survey Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_question
|
||||
msgid "All Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,date_open:0
|
||||
msgid "Survey Open Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_name_wiz
|
||||
msgid "survey.name.wiz"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "Users Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_view_survey_question_message
|
||||
#: model:ir.model,name:survey.model_survey_question
|
||||
#: view:survey:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
msgid "Survey Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: help:survey,response_user:0
|
||||
msgid "Set to one if you require only one response per user"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.page,title:0
|
||||
msgid "Page Title"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_history
|
||||
msgid "Survey History"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,comment:0
|
||||
#: field:survey.response.answer,comment:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question,tot_resp:0
|
||||
msgid "Total Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.question.wiz:0
|
||||
msgid "Your Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question,allow_comment:0
|
||||
msgid "Allow Comment Field"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "Warning !"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
#: wizard_field:wizard.send.invitation,init,send_mail_existing:0
|
||||
msgid "Send reminder for existing user"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_new_survey_question_form
|
||||
#: model:ir.ui.menu,name:survey.menu_new_survey_question_form1
|
||||
msgid "New Survey Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.response:0
|
||||
msgid "Skip"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,partner_ids:0
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,mail_subject:0
|
||||
#: wizard_field:wizard.send.invitation,init,mail_subject_existing:0
|
||||
msgid "Subject"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,max_response_limit:0
|
||||
msgid "Maximum Response Limit"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,mail_from:0
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,response_type:0
|
||||
msgid "Response Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,transfer:0
|
||||
msgid "Page Transfer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,question_id:0
|
||||
#: field:survey.page,question_ids:0
|
||||
#: field:survey.question,question:0
|
||||
#: field:survey.response,question_id:0
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_button:wizard.send.invitation,init,send:0
|
||||
msgid "Send"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,response:0
|
||||
msgid "#Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,response_answer_ids:0
|
||||
msgid "Response Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Response Summary"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
#: wizard_field:wizard.send.invitation,init,send_mail:0
|
||||
msgid "Send mail for new user"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Skipped Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_button:wizard.send.invitation,send,end:0
|
||||
msgid "_Ok"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,response_type:0
|
||||
msgid "Link"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_config
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_question_wiz
|
||||
msgid "survey.question.wiz"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_response_answer
|
||||
#: view:survey.response.answer:0
|
||||
msgid "Survey Response Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Page :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,response_user:0
|
||||
msgid "Maximum Response per User"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Total Started Survey :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.response:0
|
||||
msgid "Comment"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,date_modify:0
|
||||
msgid "Modify Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Answered Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "You can not give response for this survey more than %s times"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,response_type:0
|
||||
msgid "Manually"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_survey_form1
|
||||
msgid "All Surveys"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: field:survey,users:0
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,page_no:0
|
||||
msgid "Page Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,send,note:0
|
||||
msgid "Log"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_survey_question_form
|
||||
msgid "All Survey Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,date_close:0
|
||||
msgid "Survey Close Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.name.wiz:0
|
||||
msgid "Start"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey,state:0
|
||||
#: selection:survey.response,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey,state:0
|
||||
msgid "Closed"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: field:survey.answer,answer:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
#: field:survey.question,answer_choice_ids:0
|
||||
#: field:survey.response.answer,answer_id:0
|
||||
msgid "Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_survey_page_form
|
||||
msgid "All Survey Pages"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,store_ans:0
|
||||
msgid "Store Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,state:0
|
||||
#: field:survey.response,state:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.module.module,shortdesc:survey.module_meta_information
|
||||
msgid "Survey Module"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.module.module,description:survey.module_meta_information
|
||||
msgid "\n"
|
||||
" This module is used for surveing. It depends on the answers or reviews of some questions by different users.\n"
|
||||
" A survey may have multiple pages. Each page may contain multiple questions and each question may have multiple answers.\n"
|
||||
" Different users may give different answers of question and according to that survey is done. \n"
|
||||
" Partners are also sent mails with user name and password for the invitation of the survey\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.name.wiz:0
|
||||
msgid "Survey Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question,is_require_answer:0
|
||||
msgid "Required Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.history,user_id:0
|
||||
#: field:survey.response,response_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:res.users,survey_id:0
|
||||
msgid "Groups"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
#: field:survey.question,response_ids:0
|
||||
#: view:survey.response:0
|
||||
#: field:survey.response.answer,response_id:0
|
||||
msgid "Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_new_survey_form1
|
||||
#: model:ir.ui.menu,name:survey.menu_new_survey_form
|
||||
msgid "New Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.ui.menu,name:survey.main_menu_survey
|
||||
msgid "Survey Management"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,state:0
|
||||
msgid "Skiped"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_answer
|
||||
#: view:survey.answer:0
|
||||
msgid "Survey Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/wizard/wizard_survey.py:0
|
||||
#, python-format
|
||||
msgid "Attention!"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey
|
||||
#: view:res.users:0
|
||||
#: view:survey:0
|
||||
#: field:survey.history,survey_id:0
|
||||
#: view:survey.name.wiz:0
|
||||
#: field:survey.name.wiz,survey_id:0
|
||||
#: field:survey.page,survey_id:0
|
||||
#: field:survey.question,survey:0
|
||||
msgid "Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Total Completed Survey :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "History"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.answer:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
msgid "Seq"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,tot_comp_survey:0
|
||||
msgid "Total Completed Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Response Percentage"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question.wiz,name:0
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Survey Title :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.response:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "'\" + que_rec[0]['question'] + \"' This question requires an answer."
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.name.wiz:0
|
||||
#: wizard_button:wizard.send.invitation,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: selection:survey,state:0
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,tot_start_survey:0
|
||||
msgid "Total Started Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: constraint:ir.model:0
|
||||
msgid "The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_response
|
||||
#: view:survey.response:0
|
||||
msgid "Survey Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,average:0
|
||||
msgid "#Avg"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,responsible_id:0
|
||||
msgid "Responsible"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,state:0
|
||||
msgid "Answered"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.wizard,name:survey.wizard_send_invitation
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
msgid "Send Invitation"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,title:0
|
||||
msgid "Survey Title"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "%"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: field:survey,note:0
|
||||
#: field:survey.name.wiz,note:0
|
||||
#: view:survey.page:0
|
||||
#: field:survey.page,note:0
|
||||
#: view:survey.response:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.name.wiz:0
|
||||
msgid "Select Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_new_survey_page_form
|
||||
#: model:ir.ui.menu,name:survey.menu_new_survey_page_form1
|
||||
msgid "New Survey Page"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.page:0
|
||||
#: field:survey.question,page_id:0
|
||||
msgid "Survey Page"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_answer
|
||||
msgid "Survey Answers"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.page:0
|
||||
msgid "#Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Que:"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,page_ids:0
|
||||
msgid "Page"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,send:0
|
||||
msgid "User creation"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,sequence:0
|
||||
#: field:survey.page,sequence:0
|
||||
#: field:survey.question,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,send:0
|
||||
msgid "Results :"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/wizard/wizard_survey.py:0
|
||||
#, python-format
|
||||
msgid "%sSurvey is not in open state"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
msgid "Select Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,date_create:0
|
||||
msgid "Create Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_pages
|
||||
#: model:ir.model,name:survey.model_survey_page
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_page_form1
|
||||
msgid "Survey Pages"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Response Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,page:0
|
||||
msgid "Page Position"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,688 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * survey
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.6\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-26 06:01:25+0000\n"
|
||||
"PO-Revision-Date: 2009-11-26 06:01:25+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_form
|
||||
msgid "Surveys"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.report.xml,name:survey.survey
|
||||
msgid "Survey Analysis Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_page_question
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_question_form1
|
||||
msgid "Survey Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.response:0
|
||||
msgid "Set to draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.history,date:0
|
||||
msgid "Date started"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,history:0
|
||||
msgid "History Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,mail:0
|
||||
msgid "Body"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_view_survey_name
|
||||
#: model:ir.ui.menu,name:survey.menu_run_survey_form
|
||||
msgid "Give Survey Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_question
|
||||
msgid "All Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,date_open:0
|
||||
msgid "Survey Open Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_name_wiz
|
||||
msgid "survey.name.wiz"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "Users Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_view_survey_question_message
|
||||
#: model:ir.model,name:survey.model_survey_question
|
||||
#: view:survey:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
msgid "Survey Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: help:survey,response_user:0
|
||||
msgid "Set to one if you require only one response per user"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.page,title:0
|
||||
msgid "Page Title"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_history
|
||||
msgid "Survey History"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,comment:0
|
||||
#: field:survey.response.answer,comment:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question,tot_resp:0
|
||||
msgid "Total Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.question.wiz:0
|
||||
msgid "Your Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question,allow_comment:0
|
||||
msgid "Allow Comment Field"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "Warning !"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
#: wizard_field:wizard.send.invitation,init,send_mail_existing:0
|
||||
msgid "Send reminder for existing user"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_new_survey_question_form
|
||||
#: model:ir.ui.menu,name:survey.menu_new_survey_question_form1
|
||||
msgid "New Survey Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.response:0
|
||||
msgid "Skip"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,partner_ids:0
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,mail_subject:0
|
||||
#: wizard_field:wizard.send.invitation,init,mail_subject_existing:0
|
||||
msgid "Subject"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,max_response_limit:0
|
||||
msgid "Maximum Response Limit"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,init,mail_from:0
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,response_type:0
|
||||
msgid "Response Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,transfer:0
|
||||
msgid "Page Transfer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,question_id:0
|
||||
#: field:survey.page,question_ids:0
|
||||
#: field:survey.question,question:0
|
||||
#: field:survey.response,question_id:0
|
||||
msgid "Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_button:wizard.send.invitation,init,send:0
|
||||
msgid "Send"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,response:0
|
||||
msgid "#Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,response_answer_ids:0
|
||||
msgid "Response Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Response Summary"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
#: wizard_field:wizard.send.invitation,init,send_mail:0
|
||||
msgid "Send mail for new user"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Skipped Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_button:wizard.send.invitation,send,end:0
|
||||
msgid "_Ok"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,response_type:0
|
||||
msgid "Link"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_config
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_question_wiz
|
||||
msgid "survey.question.wiz"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_response_answer
|
||||
#: view:survey.response.answer:0
|
||||
msgid "Survey Response Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Page :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,response_user:0
|
||||
msgid "Maximum Response per User"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Total Started Survey :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.response:0
|
||||
msgid "Comment"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,date_modify:0
|
||||
msgid "Modify Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Answered Question"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "You can not give response for this survey more than %s times"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,response_type:0
|
||||
msgid "Manually"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_survey_form1
|
||||
msgid "All Surveys"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: field:survey,users:0
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,page_no:0
|
||||
msgid "Page Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_field:wizard.send.invitation,send,note:0
|
||||
msgid "Log"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_survey_question_form
|
||||
msgid "All Survey Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,date_close:0
|
||||
msgid "Survey Close Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.name.wiz:0
|
||||
msgid "Start"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey,state:0
|
||||
#: selection:survey.response,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey,state:0
|
||||
msgid "Closed"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: field:survey.answer,answer:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
#: field:survey.question,answer_choice_ids:0
|
||||
#: field:survey.response.answer,answer_id:0
|
||||
msgid "Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_survey_page_form
|
||||
msgid "All Survey Pages"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,store_ans:0
|
||||
msgid "Store Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,state:0
|
||||
#: field:survey.response,state:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.module.module,shortdesc:survey.module_meta_information
|
||||
msgid "Survey Module"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.module.module,description:survey.module_meta_information
|
||||
msgid "\n"
|
||||
" This module is used for surveing. It depends on the answers or reviews of some questions by different users.\n"
|
||||
" A survey may have multiple pages. Each page may contain multiple questions and each question may have multiple answers.\n"
|
||||
" Different users may give different answers of question and according to that survey is done. \n"
|
||||
" Partners are also sent mails with user name and password for the invitation of the survey\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.name.wiz:0
|
||||
msgid "Survey Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question,is_require_answer:0
|
||||
msgid "Required Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.history,user_id:0
|
||||
#: field:survey.response,response_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:res.users,survey_id:0
|
||||
msgid "Groups"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
#: field:survey.question,response_ids:0
|
||||
#: view:survey.response:0
|
||||
#: field:survey.response.answer,response_id:0
|
||||
msgid "Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_new_survey_form1
|
||||
#: model:ir.ui.menu,name:survey.menu_new_survey_form
|
||||
msgid "New Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.ui.menu,name:survey.main_menu_survey
|
||||
msgid "Survey Management"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,state:0
|
||||
msgid "Skiped"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_answer
|
||||
#: view:survey.answer:0
|
||||
msgid "Survey Answer"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/wizard/wizard_survey.py:0
|
||||
#, python-format
|
||||
msgid "Attention!"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey
|
||||
#: view:res.users:0
|
||||
#: view:survey:0
|
||||
#: field:survey.history,survey_id:0
|
||||
#: view:survey.name.wiz:0
|
||||
#: field:survey.name.wiz,survey_id:0
|
||||
#: field:survey.page,survey_id:0
|
||||
#: field:survey.question,survey:0
|
||||
msgid "Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Total Completed Survey :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "History"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.answer:0
|
||||
#: view:survey.page:0
|
||||
#: view:survey.question:0
|
||||
msgid "Seq"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,tot_comp_survey:0
|
||||
msgid "Total Completed Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Response Percentage"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.question.wiz,name:0
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Survey Title :-"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.response:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/survey.py:0
|
||||
#, python-format
|
||||
msgid "'\" + que_rec[0]['question'] + \"' This question requires an answer."
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.name.wiz:0
|
||||
#: wizard_button:wizard.send.invitation,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: selection:survey,state:0
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,tot_start_survey:0
|
||||
msgid "Total Started Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: constraint:ir.model:0
|
||||
msgid "The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.model,name:survey.model_survey_response
|
||||
#: view:survey.response:0
|
||||
msgid "Survey Response"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,average:0
|
||||
msgid "#Avg"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,responsible_id:0
|
||||
msgid "Responsible"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: selection:survey.response,state:0
|
||||
msgid "Answered"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.wizard,name:survey.wizard_send_invitation
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
msgid "Send Invitation"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,title:0
|
||||
msgid "Survey Title"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "%"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: field:survey,note:0
|
||||
#: field:survey.name.wiz,note:0
|
||||
#: view:survey.page:0
|
||||
#: field:survey.page,note:0
|
||||
#: view:survey.response:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.name.wiz:0
|
||||
msgid "Select Survey"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.action_new_survey_page_form
|
||||
#: model:ir.ui.menu,name:survey.menu_new_survey_page_form1
|
||||
msgid "New Survey Page"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey:0
|
||||
#: view:survey.page:0
|
||||
#: field:survey.question,page_id:0
|
||||
msgid "Survey Page"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_answer
|
||||
msgid "Survey Answers"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: view:survey.page:0
|
||||
msgid "#Questions"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Que:"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey,page_ids:0
|
||||
msgid "Page"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,send:0
|
||||
msgid "User creation"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.answer,sequence:0
|
||||
#: field:survey.page,sequence:0
|
||||
#: field:survey.question,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,send:0
|
||||
msgid "Results :"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: code:addons/survey/wizard/wizard_survey.py:0
|
||||
#, python-format
|
||||
msgid "%sSurvey is not in open state"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: wizard_view:wizard.send.invitation,init:0
|
||||
msgid "Select Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.response,date_create:0
|
||||
msgid "Create Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:ir.actions.act_window,name:survey.act_survey_pages
|
||||
#: model:ir.model,name:survey.model_survey_page
|
||||
#: model:ir.ui.menu,name:survey.menu_survey_page_form1
|
||||
msgid "Survey Pages"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: rml:survey_analysis_report:0
|
||||
msgid "Response Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: field:survey.name.wiz,page:0
|
||||
msgid "Page Position"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# -*- 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 survey_analysis_report
|
||||
import survey_form
|
||||
import survey_browse_response
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,336 @@
|
|||
# -*- 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
|
||||
|
||||
class survey_analysis(report_rml):
|
||||
def create(self, cr, uid, ids, datas, context):
|
||||
rml ="""<document filename="Survey Analysis Report.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6"/>
|
||||
</blockTableStyle>
|
||||
<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>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<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="Title" fontName="helvetica" fontSize="20.0" leading="15" spaceBefore="6.0" spaceAfter="6.0" alignment="CENTER"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="Title"><u>Response Summary</u></para>
|
||||
<para style="Standard"><font></font></para>"""
|
||||
surv_obj = pooler.get_pool(cr.dbname).get('survey')
|
||||
for survey in surv_obj.browse(cr, uid, ids):
|
||||
if survey.question_prefix:
|
||||
prefix = survey.question_prefix + " : "
|
||||
else:
|
||||
prefix = ''
|
||||
rml += """<blockTable colWidths="95,215,150,40" style="Table2">
|
||||
<tr>
|
||||
<td><para style="Standard">Survey Title :-</para></td>
|
||||
<td><para style="header1">""" + to_xml(survey.title) + """</para></td>
|
||||
<td><para style="Standard">Total Started Survey :- </para></td>
|
||||
<td><para style="header1">""" + tools.ustr(survey.tot_start_survey) + """</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="header1"></para></td>
|
||||
<td><para style="Standard">Total Completed Survey :-</para></td>
|
||||
<td><para style="header1">""" + tools.ustr(survey.tot_comp_survey) + """</para></td>
|
||||
</tr>
|
||||
</blockTable> """
|
||||
for page in survey.page_ids:
|
||||
rml += """ <blockTable colWidths="500" style="Table4">
|
||||
# <tr>
|
||||
# <td><para style="page">Page :- """ + to_xml(page.title) + """</para></td>
|
||||
# </tr>
|
||||
# </blockTable>"""
|
||||
for que in page.question_ids:
|
||||
rml +="""<blockTable colWidths="500" style="Table5">
|
||||
<tr>
|
||||
<td><para style="question">""" + tools.ustr(prefix) + to_xml(que.question) + """</para></td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
cols_widhts = []
|
||||
if que.type in ['matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans']:
|
||||
cols_widhts.append(200)
|
||||
for col in range(0, len(que.column_heading_ids) + 1):
|
||||
cols_widhts.append(float(300 / (len(que.column_heading_ids) + 1)))
|
||||
colWidths = ",".join(map(tools.ustr, cols_widhts))
|
||||
matrix_ans = ['',]
|
||||
for col in que.column_heading_ids:
|
||||
if col.title not in matrix_ans:
|
||||
matrix_ans.append(col.title)
|
||||
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
|
||||
for mat_col in matrix_ans:
|
||||
rml+="""<td><para style="response">""" + to_xml(mat_col) + """</para></td>"""
|
||||
rml+="""<td><para style="response">Response Count</para></td>
|
||||
</tr>"""
|
||||
last_col = cols_widhts[-1]
|
||||
for ans in que.answer_choice_ids:
|
||||
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>"""
|
||||
cr.execute("select count(id) from survey_response_answer sra where sra.answer_id = %d"%(ans.id))
|
||||
tot_res = cr.fetchone()[0]
|
||||
cr.execute("select count(id) ,sra.answer from survey_response_answer sra where sra.answer_id = %d group by sra.answer" % ans.id)
|
||||
calc_res = cr.dictfetchall()
|
||||
for mat_col in range(1, len(matrix_ans)):
|
||||
percantage = 0
|
||||
cal_count = 0
|
||||
for cal in calc_res:
|
||||
if cal['answer'] == matrix_ans[mat_col]:
|
||||
cal_count = cal['count']
|
||||
if tot_res:
|
||||
percantage = float(cal_count)*100 / tot_res
|
||||
if percantage:
|
||||
rml += """<td color="#FFF435"><para style="answer_bold">""" + tools.ustr(percantage) +"% (" + tools.ustr(cal_count) + """)</para></td>"""
|
||||
else:
|
||||
rml += """<td color="#FFF435"><para style="answer">""" + tools.ustr(percantage) +"% (" + tools.ustr(cal_count) + """)</para></td>"""
|
||||
rml+="""<td><para style="response">""" + tools.ustr(tot_res) + """</para></td>
|
||||
</tr>"""
|
||||
rml+="""</blockTable>"""
|
||||
if que.comment_field_type:
|
||||
cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
|
||||
tot_res = cr.fetchone()[0]
|
||||
rml+="""<blockTable colWidths=" """+ str(500 - last_col) +"," + str(last_col) + """ " style="Table1"><tr><td><para style="answer_right">""" + to_xml(que.comment_label) + """</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(tot_res) + """</para></td></tr></blockTable>"""
|
||||
|
||||
elif que.type in['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'multiple_textboxes','date_and_time','date']:
|
||||
rml +="""<blockTable colWidths="280.0,120,100.0" style="Table1">"""
|
||||
rml += """ <tr>
|
||||
<td> <para style="Standard"> </para></td>
|
||||
<td> <para style="response">Response Percentage </para></td>
|
||||
<td> <para style="response">Response Count</para></td>
|
||||
</tr>"""
|
||||
for ans in que.answer_choice_ids:
|
||||
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(ans.average) + """%</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(ans.response) + """</para></td></tr>"""
|
||||
rml+="""</blockTable>"""
|
||||
if que.comment_field_type:
|
||||
if que.make_comment_field:
|
||||
cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
|
||||
tot_res = cr.fetchone()[0]
|
||||
tot_avg = 0.00
|
||||
if que.tot_resp:
|
||||
tot_avg = round(float(tot_res * 100)/ que.tot_resp,2)
|
||||
rml+="""<blockTable colWidths="280.0,120,100.0" style="Table1"><tr><td><para style="answer">""" + to_xml(que.comment_label) + """</para></td>
|
||||
<td><para style="answer">""" + str(tot_avg) + """%</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(tot_res) + """</para></td></tr></blockTable>"""
|
||||
else:
|
||||
cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
|
||||
tot_res = cr.fetchone()[0]
|
||||
rml+="""<blockTable colWidths="400.0,100.0" style="Table1"><tr><td><para style="answer_right">""" + to_xml(que.comment_label) + """</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(tot_res) + """</para></td></tr></blockTable>"""
|
||||
|
||||
elif que.type in['single_textbox']:
|
||||
cr.execute("select count(id) from survey_response_line where question_id = %d and single_text!=''" % que.id)
|
||||
rml +="""<blockTable colWidths="400.0,100.0" style="Table1">
|
||||
<tr>
|
||||
<td> <para style="Standard"> </para></td>
|
||||
<td> <para style="response">Response Count</para></td>
|
||||
</tr>
|
||||
<tr><td><para style="answer"></para></td>
|
||||
<td><para style="answer">""" + tools.ustr(cr.fetchone()[0]) + """ </para></td></tr>
|
||||
</blockTable>"""
|
||||
elif que.type in['comment']:
|
||||
cr.execute("select count(id) from survey_response_line where question_id = %d and comment !=''" % que.id)
|
||||
rml +="""<blockTable colWidths="400.0,100.0" style="Table1">
|
||||
<tr>
|
||||
<td> <para style="Standard"> </para></td>
|
||||
<td> <para style="response">Response Count</para></td>
|
||||
</tr>
|
||||
<tr><td><para style="answer"></para></td>
|
||||
<td><para style="answer">""" + tools.ustr(cr.fetchone()[0]) + """ </para></td></tr>
|
||||
</blockTable>"""
|
||||
elif que.type in['rating_scale']:
|
||||
cols_widhts.append(200)
|
||||
for col in range(0,len(que.column_heading_ids) + 2):
|
||||
cols_widhts.append(float(300 / (len(que.column_heading_ids) + 2)))
|
||||
colWidths = ",".join(map(tools.ustr, cols_widhts))
|
||||
matrix_ans = ['',]
|
||||
for col in que.column_heading_ids:
|
||||
if col.title not in matrix_ans:
|
||||
matrix_ans.append(col.title)
|
||||
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
|
||||
for mat_col in matrix_ans:
|
||||
rml+="""<td><para style="response">""" + to_xml(mat_col) + """</para></td>"""
|
||||
rml+="""<td><para style="response">Rating Average</para></td>
|
||||
<td><para style="response">Response Count</para></td>
|
||||
</tr>"""
|
||||
for ans in que.answer_choice_ids:
|
||||
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>"""
|
||||
res_count = 0
|
||||
rating_weight_sum = 0
|
||||
for mat_col in range(1, len(matrix_ans)):
|
||||
cr.execute("select count(sra.answer_id) from survey_response_line sr, survey_response_answer sra\
|
||||
where sr.id = sra.response_id and sra.answer_id = %d and sra.answer ='%s'" % (ans.id,matrix_ans[mat_col]))
|
||||
tot_res = cr.fetchone()[0]
|
||||
cr.execute("select count(sra.answer_id),sqc.rating_weight from survey_response_line sr, survey_response_answer sra ,\
|
||||
survey_question_column_heading sqc where sr.id = sra.response_id and \
|
||||
sqc.question_id = sr.question_id and sra.answer_id = %d and sqc.title ='%s'\
|
||||
group by sra.answer_id,sqc.rating_weight" % (ans.id,matrix_ans[mat_col]))
|
||||
col_weight = cr.fetchone()
|
||||
res_count = col_weight[0]
|
||||
if tot_res:
|
||||
rating_weight_sum += col_weight[1] * tot_res
|
||||
tot_per = round((float(tot_res) * 100) / int(res_count), 2)
|
||||
else:
|
||||
tot_res = 0
|
||||
tot_per = 0.0
|
||||
if tot_res:
|
||||
rml += """<td><para style="answer_bold">""" + tools.ustr(tot_per) + "%(" + tools.ustr(tot_res) + """)</para></td>"""
|
||||
else:
|
||||
rml += """<td><para style="answer">""" + tools.ustr(tot_per)+"%(" + tools.ustr(tot_res) + """)</para></td>"""
|
||||
percantage = 0.00
|
||||
if res_count:
|
||||
percantage = round((float(rating_weight_sum)/res_count), 2)
|
||||
rml+="""<td><para style="answer">""" + tools.ustr(percantage) + """</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(res_count) + """</para></td></tr>"""
|
||||
rml+="""</blockTable>"""
|
||||
elif que.type in['matrix_of_drop_down_menus']:
|
||||
for column in que.column_heading_ids:
|
||||
rml += """<blockTable colWidths="500" style="Table1"><tr>
|
||||
<td><para style="answer">""" + to_xml(column.title) + """</para></td></tr></blockTable>"""
|
||||
menu_choices = column.menu_choice.split('\n')
|
||||
cols_widhts = []
|
||||
cols_widhts.append(200)
|
||||
for col in range(0, len(menu_choices) + 1):
|
||||
cols_widhts.append(float(300 / (len(menu_choices) + 1)))
|
||||
colWidths = ",".join(map(tools.ustr, cols_widhts))
|
||||
rml +="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>
|
||||
<td><para style="response"></para></td>"""
|
||||
for menu in menu_choices:
|
||||
rml += """<td><para style="response">""" + to_xml(menu) + """</para></td>"""
|
||||
rml += """<td><para style="response">Response Count</para></td></tr>"""
|
||||
cr.execute("select count(id), sra.answer_id from survey_response_answer sra \
|
||||
where sra.answer='%s' group by sra.answer_id " % (column.title))
|
||||
res_count = cr.dictfetchall()
|
||||
cr.execute("select count(sra.id),sra.value_choice, sra.answer_id, sra.answer from survey_response_answer sra \
|
||||
where sra.answer='%s' group by sra.value_choice ,sra.answer_id, sra.answer" % (column.title))
|
||||
calc_percantage = cr.dictfetchall()
|
||||
for ans in que.answer_choice_ids:
|
||||
rml+="""<tr><td><para style="answer_right">""" + to_xml(ans.answer) + """</para></td>"""
|
||||
for mat_col in range(0, len(menu_choices)):
|
||||
calc = 0
|
||||
response = 0
|
||||
for res in res_count:
|
||||
if res['answer_id'] == ans.id: response = res['count']
|
||||
for per in calc_percantage:
|
||||
if ans.id == per['answer_id'] and menu_choices[mat_col] == per['value_choice']:
|
||||
calc = per['count']
|
||||
percantage = 0.00
|
||||
if calc and response:
|
||||
percantage = (float(calc)* 100) / response
|
||||
if calc:
|
||||
rml+="""<td><para style="answer_bold">""" +tools.ustr(percantage)+"% (" + tools.ustr(calc) + """)</para></td>"""
|
||||
else:
|
||||
rml+="""<td><para style="answer">""" +tools.ustr(percantage)+"% (" + tools.ustr(calc) + """)</para></td>"""
|
||||
response = 0
|
||||
for res in res_count:
|
||||
if res['answer_id'] == ans.id: response = res['count']
|
||||
rml += """<td><para style="response">""" + tools.ustr(response) + """</para></td></tr>"""
|
||||
rml += """</blockTable>"""
|
||||
elif que.type in['numerical_textboxes']:
|
||||
rml +="""<blockTable colWidths="240.0,20,100.0,70,70.0" style="Table1">
|
||||
<tr>
|
||||
<td> <para style="Standard"> </para></td>
|
||||
<td> <para style="Standard"> </para></td>
|
||||
<td> <para style="response">Response Average</para></td>
|
||||
<td> <para style="response">Response Total</para></td>
|
||||
<td> <para style="response">Response Count</para></td>
|
||||
</tr>"""
|
||||
for ans in que.answer_choice_ids:
|
||||
cr.execute("select answer from survey_response_answer where answer_id=%d group by answer" % ans.id)
|
||||
tot_res = cr.dictfetchall()
|
||||
total = 0
|
||||
for tot in tot_res:
|
||||
total += int(tot['answer'])
|
||||
per = 0.00
|
||||
if len(tot_res):
|
||||
per = round((float(total) / len(tot_res)),2)
|
||||
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>
|
||||
<td> <para style="Standard"> </para></td>
|
||||
<td> <para style="answer">""" + tools.ustr(per) +"""</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(total) + """</para></td>
|
||||
<td><para style="answer">""" + tools.ustr(len(tot_res)) + """</para></td></tr>"""
|
||||
rml+="""</blockTable>"""
|
||||
|
||||
rml +="""<blockTable colWidths="300,100,100.0" style="Table3">
|
||||
<tr>
|
||||
<td><para style="Standard1"></para></td>
|
||||
<td><para style="Standard1">Answered Question</para></td>
|
||||
<td><para style="Standard1">""" + tools.ustr(que.tot_resp) + """</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="Standard1"></para></td>
|
||||
<td><para style="Standard1">Skipped Question</para></td>
|
||||
<td><para style="Standard1">""" + tools.ustr(survey.tot_start_survey - que.tot_resp) + """</para></td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
rml += """<pageBreak/>"""
|
||||
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_analysis('report.survey.analysis', 'survey','','')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,314 @@
|
|||
# -*- 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
|
||||
|
||||
class survey_browse_response(report_rml):
|
||||
def create(self, cr, uid, ids, datas, context):
|
||||
rml ="""<document filename="Survey Analysis Report.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<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>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6"/>
|
||||
</blockTableStyle>
|
||||
<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>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="Title"><u>Browse Responses </u></para>
|
||||
<para style="Standard"><font></font></para>"""
|
||||
surv_resp_obj = pooler.get_pool(cr.dbname).get('survey.response')
|
||||
surv_resp_line_obj = pooler.get_pool(cr.dbname).get('survey.response.line')
|
||||
surv_obj = pooler.get_pool(cr.dbname).get('survey')
|
||||
for response in surv_resp_obj.browse(cr,uid, surv_resp_obj.search(cr,uid, [('survey_id','=',ids[0])])):
|
||||
for survey in surv_obj.browse(cr, uid, ids):
|
||||
if survey.question_prefix:
|
||||
prefix = survey.question_prefix + " : "
|
||||
else:
|
||||
prefix = ''
|
||||
rml += """<blockTable colWidths="150,350" style="Table2">
|
||||
<tr>
|
||||
<td><para style="Standard">Survey Title :-</para></td>
|
||||
<td><para style="header1">""" + to_xml(survey.title) + """</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="Standard">Response Create Date :-</para></td>
|
||||
<td><para style="header1">""" + to_xml(response.date_create) + """</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="Standard">User Name :-</para></td>
|
||||
<td><para style="header1">""" + to_xml(response.user_id.name) + """</para></td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
for page in survey.page_ids:
|
||||
rml += """<para style="P2"></para>
|
||||
<blockTable colWidths="500" style="Table4">
|
||||
<tr>
|
||||
<td><para style="page">Page :- """ + to_xml(page.title) + """</para></td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
for que in page.question_ids:
|
||||
rml += """<para style="P2"></para>
|
||||
<blockTable colWidths="500" style="Table5">
|
||||
<tr>
|
||||
<td><para style="question">""" + tools.ustr(prefix) + to_xml(que.question) + """</para></td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
answer = surv_resp_line_obj.browse(cr,uid, surv_resp_line_obj.search(cr, uid, [('question_id','=',que.id),('response_id','=',response.id)]))
|
||||
if 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 = []
|
||||
for col in range(0, len(que.column_heading_ids)):
|
||||
cols_widhts.append(float(500 / (len(que.column_heading_ids))))
|
||||
colWidths = ",".join(map(tools.ustr, cols_widhts))
|
||||
matrix_ans = []
|
||||
rml +="""<para style="P2"></para><blockTable colWidths=" """ + str(colWidths) + """ " style="Table41"><tr>"""
|
||||
for col in que.column_heading_ids:
|
||||
if col.title not in matrix_ans:
|
||||
matrix_ans.append(col.title)
|
||||
rml +="""<td> <para style="terp_tblheader_Details">""" + col.title +"""</para></td>"""
|
||||
rml += """</tr></blockTable>"""
|
||||
for row in range(0, que.no_of_rows):
|
||||
rml +="""<blockTable colWidths=" """ + str(colWidths) + """ " style="Table51"><tr>"""
|
||||
table_data = col_heading.browse(cr, uid, col_heading.search(cr, uid, [('response_table_id', '=', answer[0].id),('name','=',row)]))
|
||||
for column in matrix_ans:
|
||||
value = """<font color="white"> </font>"""
|
||||
for col in table_data:
|
||||
if column == col.column_id.title:
|
||||
value = col.value
|
||||
rml += """<td> <para style="terp_default_9">""" + value +"""</para></td>"""
|
||||
rml += """</tr></blockTable>"""
|
||||
else:
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">No Response</para></td> </tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['multiple_choice_only_one_ans','multiple_choice_multiple_ans']:
|
||||
if len(answer) and answer[0].state == "done":
|
||||
for ans in answer[0].response_answer_ids:
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">""" + to_xml(ans.answer_id.answer) + """</para></td></tr>
|
||||
</blockTable>"""
|
||||
if que.comment_field_type:
|
||||
rml+="""<blockTable colWidths="500" style="Table1"><tr>
|
||||
<td><para style="answer">""" + tools.ustr(answer[0].comment) + """</para></td></tr></blockTable>"""
|
||||
else:
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">No Response</para></td> </tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['multiple_textboxes','date','date_and_time','numerical_textboxes']:
|
||||
if len(answer) and answer[0].state == "done":
|
||||
for ans in answer[0].response_answer_ids:
|
||||
rml +="""<blockTable colWidths="200,300" style="Table1">
|
||||
<tr> <td> <para style="response">""" + to_xml(ans.answer_id.answer) + """</para></td>
|
||||
<td> <para style="response">""" + to_xml(ans.answer) + """</para></td></tr>
|
||||
</blockTable>"""
|
||||
else:
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">No Response</para></td> </tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['single_textbox']:
|
||||
if len(answer) and answer[0].state == "done":
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">""" + to_xml(answer[0].single_text) + """</para></td></tr>
|
||||
</blockTable>"""
|
||||
else:
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">No Response</para></td> </tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['comment']:
|
||||
if len(answer) and answer[0].state == "done":
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">""" + to_xml(answer[0].comment) + """</para></td></tr>
|
||||
</blockTable>"""
|
||||
else:
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">No Response</para></td> </tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','rating_scale','matrix_of_drop_down_menus']:
|
||||
if len(answer) and answer[0].state == "done":
|
||||
if que.comment_column:
|
||||
pass
|
||||
cols_widhts = []
|
||||
cols_widhts.append(200)
|
||||
len_col_heading = len(que.column_heading_ids)
|
||||
for col in range(0, len_col_heading):
|
||||
cols_widhts.append(float(300 / len_col_heading))
|
||||
tmp=0.0
|
||||
sum = 0.0
|
||||
i = 0
|
||||
if que.comment_column:
|
||||
for col in cols_widhts:
|
||||
if i==0:
|
||||
cols_widhts[i] = cols_widhts[i]/2.0
|
||||
tmp = cols_widhts[i]
|
||||
sum += col
|
||||
i+=1
|
||||
cols_widhts.append(round(tmp,2))
|
||||
colWidths = ",".join(map(tools.ustr, cols_widhts))
|
||||
matrix_ans = ['',]
|
||||
for col in que.column_heading_ids:
|
||||
if col.title not in matrix_ans:
|
||||
matrix_ans.append(col.title)
|
||||
len_matrix = len(matrix_ans)
|
||||
if que.comment_column:
|
||||
matrix_ans.append(que.column_name)
|
||||
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
|
||||
for mat_col in matrix_ans:
|
||||
rml+="""<td><para style="response">""" + to_xml(mat_col) + """</para></td>"""
|
||||
rml +="""</tr>"""
|
||||
rml+="""</blockTable>"""
|
||||
i=0
|
||||
for ans in que.answer_choice_ids:
|
||||
if i%2!=0:
|
||||
style='ans_tbl_white'
|
||||
else:
|
||||
style='ans_tbl_gainsboro'
|
||||
i+=1
|
||||
rml+="""<blockTable colWidths=" """ + colWidths + """ " style='"""+style+"""'>
|
||||
<tr><td><para style="response">""" + to_xml(ans.answer) + """</para></td>"""
|
||||
comment_value = ""
|
||||
for mat_col in range(1, len_matrix):
|
||||
value = """"""
|
||||
for res_ans in answer[0].response_answer_ids:
|
||||
if res_ans.answer_id.id == ans.id and res_ans.answer == matrix_ans[mat_col]:
|
||||
comment_value = """<para style="response">""" + to_xml(tools.ustr(res_ans.comment_field)) + """</para>"""
|
||||
if que.type in ['matrix_of_drop_down_menus']:
|
||||
value = """<para style="response">""" + to_xml(tools.ustr(res_ans.value_choice)) + """</para>"""
|
||||
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']:
|
||||
value = """<illustration><fill color="white"/>
|
||||
<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>"""
|
||||
elif que.type in ['matrix_of_choices_only_multi_ans']:
|
||||
value = """<illustration>
|
||||
<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>"""
|
||||
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"/>
|
||||
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes" round="0.1cm"/>
|
||||
</illustration>"""
|
||||
elif que.type in ['matrix_of_choices_only_multi_ans']:
|
||||
value = """<illustration><fill color="white"/>
|
||||
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
|
||||
</illustration>"""
|
||||
rml+= """<td>""" + value + """</td>"""
|
||||
if que.comment_column:
|
||||
rml+= """<td>""" + comment_value + """</td>"""
|
||||
rml+=""" </tr></blockTable>"""
|
||||
if que.comment_field_type:
|
||||
rml+="""<blockTable colWidths="500" style="Table1"><tr>
|
||||
<td><para style="answer">""" + tools.ustr(answer[0].comment) + """</para></td></tr></blockTable>"""
|
||||
else:
|
||||
rml +="""<blockTable colWidths="500" style="Table1">
|
||||
<tr> <td> <para style="response">No Response</para></td> </tr>
|
||||
</blockTable>"""
|
||||
rml += """<pageBreak/>"""
|
||||
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:
|
||||
|
|
@ -0,0 +1,372 @@
|
|||
# -*- 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
|
||||
|
||||
class survey_form(report_rml):
|
||||
def create(self, cr, uid, ids, datas, context):
|
||||
_divide_columns_for_matrix = 0.7
|
||||
_display_ans_in_rows = 5
|
||||
_pageSize = ('29.7cm','21.1cm')
|
||||
if datas.has_key('form') and datas['form']['orientation']=='vertical':
|
||||
if datas['form']['paper_size']=='letter':
|
||||
_pageSize = ('21.6cm','27.9cm')
|
||||
elif datas['form']['paper_size']=='legal':
|
||||
_pageSize = ('21.6cm','35.6cm')
|
||||
elif datas['form']['paper_size']=='a4':
|
||||
_pageSize = ('21.1cm','29.7cm')
|
||||
elif datas.has_key('form') and datas['form']['orientation']=='horizontal':
|
||||
if datas['form']['paper_size']=='letter':
|
||||
_pageSize = ('27.9cm','21.6cm')
|
||||
elif datas['form']['paper_size']=='legal':
|
||||
_pageSize = ('35.6cm','21.6cm')
|
||||
elif datas['form']['paper_size']=='a4':
|
||||
_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'
|
||||
rml="""<document filename="Survey Form.pdf">
|
||||
<template pageSize="("""+_pageSize[0]+""","""+_pageSize[1]+""")" title='Survey Form.pdf' author="Martin Simon" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<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>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="ans_tbl">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<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>
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="title_tbl">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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="question_tbl">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#8f8f8f" start="0,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<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="Table5">
|
||||
<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>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="response" fontName="Helvetica-oblique" fontSize="9.5"/>
|
||||
<paraStyle name="page" fontName="helvetica-bold" fontSize="15.0" leftIndent="0.0" textColor="white"/>
|
||||
<paraStyle name="title" fontName="helvetica-bold" fontSize="18.0" leftIndent="0.0" textColor="white"/>
|
||||
<paraStyle name="question" fontName="helvetica-boldoblique" fontSize="10.0" leftIndent="3.0"/>
|
||||
<paraStyle name="answer" fontName="helvetica" fontSize="09.0" leftIndent="0.0"/>
|
||||
<paraStyle name="descriptive_text" fontName="helvetica" fontSize="10.0" leftIndent="0.0"/>
|
||||
<paraStyle name="answer_left" alignment="LEFT" fontName="helvetica-bold" fontSize="8.0" leftIndent="0.0"/>
|
||||
<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"/>
|
||||
</stylesheet>
|
||||
<story>"""
|
||||
surv_obj = pooler.get_pool(cr.dbname).get('survey')
|
||||
for survey in surv_obj.browse(cr,uid,ids):
|
||||
if survey.question_prefix:
|
||||
prefix = survey.question_prefix + " : "
|
||||
else:
|
||||
prefix = ''
|
||||
if datas.has_key('form') and datas['form']['survey_title']:
|
||||
rml += """
|
||||
<blockTable colWidths='"""+_tbl_widths+"""' style="title_tbl">
|
||||
<tr><td><para style="title">""" + to_xml(survey.title) + """</para><para style="P2"><font></font></para></td></tr>
|
||||
</blockTable>"""
|
||||
seq = 0
|
||||
for page in survey.page_ids:
|
||||
seq+=1
|
||||
rml += """
|
||||
<blockTable colWidths='"""+_tbl_widths+"""' style="page_tbl">
|
||||
<tr><td><para style="page">"""+ tools.ustr(seq) + """. """ + tools.ustr(page.title) + """</para></td></tr>
|
||||
</blockTable>"""
|
||||
for que in page.question_ids:
|
||||
cols_widhts=[]
|
||||
rml +="""
|
||||
<para style="P2"><font></font></para>
|
||||
<blockTable colWidths='"""+_tbl_widths+"""' style="question_tbl">
|
||||
<tr><td><para style="question">""" + tools.ustr(prefix) + tools.ustr(que.question) + """</para></td></tr>
|
||||
</blockTable>
|
||||
<para style="P2"><font></font></para>"""
|
||||
if que.type in ['descriptive_text']:
|
||||
cols_widhts.append(float(_tbl_widths.replace('cm','')))
|
||||
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
||||
colWidths = colWidths+'cm'
|
||||
rml+="""
|
||||
<blockTable colWidths=" """ + colWidths + """ " style="ans_tbl">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="descriptive_text">""" + to_xml(tools.ustr(que.descriptive_text)) + """</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['multiple_choice_multiple_ans','multiple_choice_only_one_ans']:
|
||||
answer=[]
|
||||
for ans in que.answer_choice_ids:
|
||||
answer.append(to_xml(tools.ustr((ans.answer))))
|
||||
|
||||
def divide_list(lst, n):
|
||||
return [lst[i::n] for i in range(n)]
|
||||
|
||||
divide_list = divide_list(answer,_display_ans_in_rows)
|
||||
for lst in divide_list:
|
||||
if que.type == 'multiple_choice_multiple_ans':
|
||||
if len(lst)<>0 and len(lst)<>int(round(float(len(answer))/_display_ans_in_rows,0)):
|
||||
lst.append('')
|
||||
if not lst:
|
||||
del divide_list[divide_list.index(lst):]
|
||||
for divide in divide_list:
|
||||
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="ans_tbl">
|
||||
<tr>"""
|
||||
for div in range(0,len(divide)):
|
||||
if divide[div]!='':
|
||||
if que.type == 'multiple_choice_multiple_ans':
|
||||
rml+="""
|
||||
<td>
|
||||
<illustration>
|
||||
<rect x="0.1cm" y="-0.4cm" width="0.5 cm" height="0.5cm" fill="no" stroke="yes"/>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><para style="answer">""" + divide[div] + """</para></td>"""
|
||||
else:
|
||||
rml+="""
|
||||
<td>
|
||||
<illustration>
|
||||
<circle x="0.3cm" y="-0.18cm" radius="0.23 cm" fill="no" stroke="yes"/>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><para style="answer">""" + divide[div] + """</para></td>"""
|
||||
else:
|
||||
rml+="""
|
||||
<td></td>
|
||||
<td></td>"""
|
||||
rml+="""
|
||||
</tr></blockTable>"""
|
||||
elif que.type in ['matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus']:
|
||||
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','')))
|
||||
tmp=0.0
|
||||
sum = 0.0
|
||||
i = 0
|
||||
if que.comment_column:
|
||||
for col in cols_widhts:
|
||||
if i==0:
|
||||
cols_widhts[i] = cols_widhts[i]/2.0
|
||||
tmp = cols_widhts[i]
|
||||
sum += col
|
||||
i+=1
|
||||
cols_widhts.append(round(tmp,2))
|
||||
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
||||
colWidths = colWidths+'cm'
|
||||
matrix_ans = ['',]
|
||||
for col in que.column_heading_ids:
|
||||
if col.title not in matrix_ans:
|
||||
matrix_ans.append(col.title)
|
||||
if que.comment_column:
|
||||
matrix_ans.append(tools.ustr(que.column_name))
|
||||
|
||||
rml+="""
|
||||
<blockTable colWidths=" """ + colWidths + """ " style="ans_tbl">
|
||||
<tr>"""
|
||||
for mat_col in matrix_ans:
|
||||
rml+="""
|
||||
<td><para style="response">""" + to_xml(mat_col) + """</para></td>"""
|
||||
rml+="""</tr></blockTable>"""
|
||||
i=0
|
||||
for ans in que.answer_choice_ids:
|
||||
if i%2!=0:
|
||||
style='ans_tbl_white'
|
||||
else:
|
||||
style='ans_tbl_gainsboro'
|
||||
i+=1
|
||||
rml+="""
|
||||
<blockTable colWidths=" """ + colWidths + """ " style='"""+style+"""'>
|
||||
<tr><td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
|
||||
rec_width = float((sum-tmp)*10+100)
|
||||
value = ""
|
||||
if que.type in ['matrix_of_drop_down_menus']:
|
||||
value = """ <fill color="white"/>
|
||||
<rect x="-0.1cm" y="-0.45cm" width='""" + tools.ustr(cols_widhts[-1] - 0.5) +"cm" + """' height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>"""
|
||||
elif que.type in ['matrix_of_choices_only_one_ans']:
|
||||
value = """ <fill color="white"/>
|
||||
<!--rect x="0.25cm" y="-0.5cm" width="0.8 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/-->
|
||||
<circle x="0.35cm" y="-0.18cm" radius="0.25 cm" fill="yes" stroke="yes"/>"""
|
||||
else:
|
||||
value = """ <fill color="white"/>
|
||||
<rect x="0.1cm" y="-0.4cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>"""
|
||||
for mat_col in range(1,len(matrix_ans)):
|
||||
if matrix_ans[mat_col]==que.column_name:
|
||||
if mat_col==1:
|
||||
rml+="""
|
||||
<td><para style="answer_left">""" + to_xml(tools.ustr(que.column_name)) + """</para></td>"""
|
||||
else:
|
||||
rml+="""<td></td>"""
|
||||
else:
|
||||
rml+="""<td><illustration>""" + value + """</illustration></td>"""
|
||||
rml+= """</tr></blockTable>"""
|
||||
elif que.type in ['multiple_textboxes','numerical_textboxes', 'date_and_time','date']:
|
||||
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'
|
||||
rect_len = ""
|
||||
if que.type in ['multiple_textboxes']:
|
||||
rect_len = tools.ustr(cols_widhts[0] - 0.3) + "cm"
|
||||
else:
|
||||
rect_len = "6cm"
|
||||
for ans in que.answer_choice_ids:
|
||||
rml +="""<para style="P1"></para>
|
||||
<blockTable colWidths=" """+ colWidths + """ " style="ans_tbl">
|
||||
<tr>
|
||||
<td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>
|
||||
<td>
|
||||
<illustration>
|
||||
<rect x="0.0cm" y="-0.5cm" width='""" + tools.ustr(rect_len) + """' height="0.6cm" fill="no" stroke="yes"/>
|
||||
</illustration>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['comment']:
|
||||
cols_widhts.append(float(_tbl_widths.replace('cm','')))
|
||||
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
||||
colWidths = colWidths+'cm'
|
||||
rect_len = ""
|
||||
rect_len = tools.ustr(cols_widhts[0] - 0.4) + "cm"
|
||||
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="ans_tbl">
|
||||
<tr>
|
||||
<td><para style="comment"><font color="white"> </font></para>
|
||||
<illustration>
|
||||
<rect x="0.0cm" y="0.3cm" width='""" + tools.ustr(rect_len) + """' height="1.5cm" fill="no" stroke="yes"/>
|
||||
</illustration>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['single_textbox']:
|
||||
cols_widhts.append(float(_tbl_widths.replace('cm','')))
|
||||
colWidths = "cm,".join(map(tools.ustr, cols_widhts))
|
||||
colWidths = colWidths+'cm'
|
||||
rml+="""<para style="P2"><font color="white"> </font></para>
|
||||
<blockTable colWidths=" """ + colWidths + """ " style="ans_tbl">
|
||||
<tr>
|
||||
<td>
|
||||
<illustration>
|
||||
<rect x="0.2cm" y="0.3cm" width="15.0 cm" height="0.6cm" fill="no" stroke="yes"/>
|
||||
</illustration>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>"""
|
||||
elif que.type in ['table']:
|
||||
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'
|
||||
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table4"><tr>"""
|
||||
for col in que.column_heading_ids:
|
||||
rml+="""<td><para style="terp_tblheader_Details">""" + tools.ustr(col.title) + """</para></td>"""
|
||||
rml+="""</tr></blockTable>
|
||||
<blockTable colWidths=" """ + colWidths + """ " style="Table5">"""
|
||||
for r in range(0,que.no_of_rows):
|
||||
rml+="""<tr>"""
|
||||
for c in que.column_heading_ids:
|
||||
rml+="""
|
||||
<td><para style="terp_default_9"><font color="white"> </font></para></td>"""
|
||||
rml+="""</tr>"""
|
||||
rml+="""</blockTable>"""
|
||||
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>"""
|
||||
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_form('report.survey.form', 'survey','','')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,26 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_survey_manager","survey","model_survey","group_survey_manager",1,1,1,1
|
||||
"access_survey_user","survey","model_survey","group_survey_user",1,1,0,0
|
||||
"access_survey_page_manager","survey.page","model_survey_page","group_survey_manager",1,1,1,1
|
||||
"access_survey_page_user","survey.page","model_survey_page","group_survey_user",1,0,0,0
|
||||
"access_survey_question_manager","survey.question","model_survey_question","group_survey_manager",1,1,1,1
|
||||
"access_survey_question_user","survey.question","model_survey_question","group_survey_user",1,0,0,0
|
||||
"access_survey_answer_manager","survey.answer","model_survey_answer","group_survey_manager",1,1,1,1
|
||||
"access_survey_answer_user","survey.answer","model_survey_answer","group_survey_user",1,0,0,0
|
||||
"access_survey_response_manager","survey.response","model_survey_response","group_survey_manager",1,1,1,1
|
||||
"access_survey_response_user","survey.response","model_survey_response","group_survey_user",1,1,1,1
|
||||
"access_survey_response_answer_manager","survey.response.answer","model_survey_response_answer","group_survey_manager",1,1,1,1
|
||||
"access_survey_response_answer_user","survey.response.answer","model_survey_response_answer","group_survey_user",1,1,1,1
|
||||
"access_survey_name_wiz_manager","survey.name.wiz","model_survey_name_wiz","group_survey_manager",1,1,1,1
|
||||
"access_survey_name_wiz_user","survey.name.wiz","model_survey_name_wiz","group_survey_user",1,0,0,0
|
||||
"access_survey_question_wiz_manager","survey.question.wiz","model_survey_question_wiz","group_survey_manager",1,1,1,1
|
||||
"access_survey_question_wiz_user","survey.question.wiz","model_survey_question_wiz","group_survey_user",1,0,0,0
|
||||
"access_survey_history","survey.history","model_survey_history","group_survey_user",1,1,1,0
|
||||
"access_survey_question_column_heading","survey.question.column.heading","model_survey_question_column_heading","group_survey_manager",1,1,1,1
|
||||
"access_survey_question_column_heading","survey.question.column.heading","model_survey_question_column_heading","group_survey_user",1,0,0,0
|
||||
"access_survey_request","survey.request","model_survey_request","group_survey_manager",1,1,1,1
|
||||
"access_survey_request","survey.request","model_survey_request","group_survey_user",1,0,0,0
|
||||
"access_survey_tbl_column_heading","survey.tbl.column.heading","model_survey_tbl_column_heading","group_survey_manager",1,1,1,1
|
||||
"access_survey_tbl_column_heading","survey.tbl.column.heading","model_survey_tbl_column_heading","group_survey_user",1,1,1,1
|
||||
"access_survey_response_line","survey.response.line","model_survey_response_line","group_survey_manager",1,1,1,1
|
||||
"access_survey_response_line","survey.response.line","model_survey_response_line","group_survey_user",1,1,1,1
|
|
|
@ -0,0 +1,157 @@
|
|||
Date : 8th October, 2009
|
||||
Created by : Harshad Modi(hmo) and Yogesh(ysa)
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
**** Specification of Survay module in OpenERP ****
|
||||
|
||||
|
||||
Basic Requirements :
|
||||
======================================================================================
|
||||
> Design own survey form
|
||||
> Desing own Questionaries
|
||||
> Collect Response
|
||||
> Analyze Result
|
||||
|
||||
Design own survey form:
|
||||
---------------------------------------------------------------
|
||||
Allow to make multiple own survey pages with multiple questions with different question type.
|
||||
|
||||
Note : After finish first Phase of Development, Allow to design page template to specify customize theme for bgcolor, bgimage, font style, font color
|
||||
|
||||
|
||||
Design Questinaries :
|
||||
-------------------------------------------------------
|
||||
Questinaries should has :
|
||||
* can specify question text
|
||||
* can make Answer sheet
|
||||
Question Type:
|
||||
* Survey Admin can able to design answer option like:
|
||||
- Mutiple Choice with one answer
|
||||
- Mutilpe Choice with multiple answer
|
||||
|
||||
|
||||
Collect Response :
|
||||
---------------------------------------------------------
|
||||
Survey Admin can able to :
|
||||
- Create a link
|
||||
- Send a survey invitation to others peple by mail
|
||||
- Allow to set max limit of Response
|
||||
- Survey Admin can able to close survey
|
||||
|
||||
Analyze Result :
|
||||
----------------------------------------------------------
|
||||
- Show Result with all Survey pages with total responses, responce count and calculate avarage response.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OpenERP model Design :
|
||||
====================================================================
|
||||
survey :
|
||||
-------------------------------------------
|
||||
title - char(128)
|
||||
pages_ids - one2many(survey_page)
|
||||
date_open
|
||||
date_close
|
||||
survey_link
|
||||
max_response_limit
|
||||
status (draft, open, close, cancel)
|
||||
resposible - many2one (res.user)
|
||||
|
||||
survey_page:
|
||||
-------------------------------------------------------------------
|
||||
title - char(128)
|
||||
page_template_id - many2one( survey_page_template)
|
||||
survey_id - many2one(survey)
|
||||
question_ids - one2many(survey_question)
|
||||
sequence - int
|
||||
note - char(256)
|
||||
|
||||
survey_question:
|
||||
--------------------------------------------------------------
|
||||
page_id - many2one(survey_page)
|
||||
question - char(128)
|
||||
answer_choice_ids - one2many(survey_answer)
|
||||
response_ids - one2many(survey_response)
|
||||
is_require_answer
|
||||
allow_comment
|
||||
sequence - int
|
||||
|
||||
survey_answer:
|
||||
--------------------------------------------------------------------------
|
||||
question_id - many2one(survey_question)
|
||||
answer - char(128)
|
||||
sequence - int
|
||||
|
||||
survey_response:
|
||||
--------------------------------------------------------------------
|
||||
date_create
|
||||
date_modify
|
||||
status (done, skip)
|
||||
response_by - many2one(res.users)
|
||||
question_id - many2one(survey_question)
|
||||
response_type ( from manual, link, mail)
|
||||
response_answer_ids - one2many(survey_response_answer)
|
||||
|
||||
survey_response_answer:
|
||||
--------------------------------------------------------------------
|
||||
response_id - many2one(survey_response)
|
||||
question_id - many2one(survey_answer)
|
||||
comment
|
||||
|
||||
|
||||
OpenERP View Design:
|
||||
==================================================
|
||||
|
||||
Survey View :
|
||||
|
||||
see survey.png file
|
||||
|
||||
Survey Pages View:
|
||||
|
||||
see survey_page.png file
|
||||
|
||||
Survey Question View:
|
||||
|
||||
see survey_qyestion.png file
|
||||
|
||||
Survey Response View :
|
||||
|
||||
see survey_response.png file
|
||||
|
||||
|
||||
|
||||
OpenERP Report Design :
|
||||
===================================================
|
||||
|
||||
Design postgres view to display statistical information of response per question, response per user, etc..
|
||||
More detail will be provided later.
|
||||
|
||||
|
||||
OpenERP Menu Design :
|
||||
=====================================================
|
||||
|
||||
Survey Management :
|
||||
> Surveys
|
||||
> All Surveys
|
||||
> New Survey
|
||||
> Survey Pages
|
||||
> All Survey Pages
|
||||
> New Survey Page
|
||||
> Survey Response
|
||||
> All Survey Responses
|
||||
> New Survey Response
|
||||
> Reports
|
||||
> Response per Survey
|
||||
> Response per Survey Page
|
||||
> Response per Question
|
||||
> Response per User
|
||||
|
||||
References :
|
||||
===============================================
|
||||
http://www.surveymonkey.com/
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
After Width: | Height: | Size: 113 KiB |
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="res.groups" id="group_survey_manager">
|
||||
<field name="name">Survey / Manager</field>
|
||||
</record>
|
||||
<record model="res.groups" id="group_survey_user">
|
||||
<field name="name">Survey / User</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--
|
||||
Survey Question Wizard
|
||||
-->
|
||||
|
||||
<record id="view_survey_question_message" model="ir.ui.view">
|
||||
<field name="name">Survey Question</field>
|
||||
<field name="model">survey.question.wiz</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Your Messages">
|
||||
<field name="name" nolabel="1" colspan="4" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_survey_question_message1" model="ir.ui.view">
|
||||
<field name="name">Survey Search</field>
|
||||
<field name="model">survey.question.wiz</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Your Messages">
|
||||
<field name="name" nolabel="1" colspan="4" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_survey_question_message"
|
||||
model="ir.actions.act_window">
|
||||
<field name="name">Survey Question</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">survey.question.wiz</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Display Survey List
|
||||
-->
|
||||
|
||||
<record id="view_survey_name" model="ir.ui.view">
|
||||
<field name="name">Survey</field>
|
||||
<field name="model">survey.name.wiz</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Survey">
|
||||
<separator colspan="4" string="Select Survey" />
|
||||
<newline />
|
||||
<field name="survey_id" colspan="4"
|
||||
on_change="on_change_survey(survey_id)" width="250"/>
|
||||
<group col="1" colspan="4"
|
||||
attrs="{'readonly': [('survey_id','=',False)]}">
|
||||
<separator colspan="4" string="Survey Details" />
|
||||
<field name="note" colspan="4" nolabel="1" readonly="1"/>
|
||||
<newline />
|
||||
</group>
|
||||
<separator colspan="4" />
|
||||
<label align="0.0" colspan="2" string="" />
|
||||
<button colspan="1" icon="gtk-cancel"
|
||||
special="cancel" string="Cancel"/>
|
||||
<button colspan="1" icon="gtk-go-forward"
|
||||
name="action_next" string="Start" type="object"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_survey_name"
|
||||
model="ir.actions.act_window">
|
||||
<field name="name">Give Survey Response</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">survey.name.wiz</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report auto="False"
|
||||
id="report_survey_form"
|
||||
model="survey"
|
||||
name="survey.form"
|
||||
menu="False"
|
||||
string="Survey Form"/>
|
||||
|
||||
<report auto="True" id="survey_analysis" model="survey"
|
||||
name="survey.analysis"
|
||||
rml=""
|
||||
string="Survey Analysis Report"/>
|
||||
|
||||
<report auto="True" id="survey_browse_response" model="survey"
|
||||
name="survey.browse.response"
|
||||
rml=""
|
||||
string="Browse Response"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<wizard string="Send Invitation" id="wizard_send_invitation"
|
||||
model="survey" name="wizard.send.invitation"/>
|
||||
|
||||
<wizard string="Print Survey" id="wizard_print_survey"
|
||||
model="survey" name="wizard.print.survey"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,26 @@
|
|||
# -*- 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 wizard_survey
|
||||
import wizard_print_survey
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,72 @@
|
|||
# -*- 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 wizard
|
||||
import time
|
||||
import pooler
|
||||
from random import choice
|
||||
import string
|
||||
import tools
|
||||
from tools.translate import _
|
||||
|
||||
_survey_form = '''<?xml version="1.0"?>
|
||||
<form string="Print Survey">
|
||||
<separator string="Print Option" colspan="4"/>
|
||||
<field name="orientation" colspan="4"/>
|
||||
<field name="paper_size" colspan="4"/>
|
||||
<field name="survey_title" colspan="4"/>
|
||||
<field name="page_number" colspan="4"/>
|
||||
<field name="without_pagebreak" colspan="4"/>
|
||||
</form>'''
|
||||
|
||||
_survey_fields = {
|
||||
'orientation':{
|
||||
'string':"Orientation",
|
||||
'type':'selection',
|
||||
'selection':[('vertical','Portrait(Vertical)'),
|
||||
('horizontal','Landscape(Horizontal)')],
|
||||
'default': lambda *a:'vertical'},
|
||||
'paper_size':{
|
||||
'string':"Paper Size",
|
||||
'type':'selection',
|
||||
'selection':[('letter','Letter (8.5" x 11")'),
|
||||
('legal','Legal (8.5" x 14")'),
|
||||
('a4','A4 (210mm x 297mm)')],
|
||||
'default': lambda *a:'letter'},
|
||||
'survey_title': {'string':'Include Survey Title', 'type':'boolean', 'default':lambda *a: 0},
|
||||
'page_number': {'string':'Include Page Numbers', 'type':'boolean', 'default':lambda *a: 0},
|
||||
'without_pagebreak': {'string':'Print Without Page Breaks', 'type':'boolean', 'default':lambda *a: 0},
|
||||
}
|
||||
|
||||
class print_survey_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.form', 'state':'end'}
|
||||
}
|
||||
}
|
||||
print_survey_wizard('wizard.print.survey')
|
|
@ -0,0 +1,218 @@
|
|||
# -*- 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 wizard
|
||||
import time
|
||||
import pooler
|
||||
from random import choice
|
||||
import string
|
||||
import tools
|
||||
from tools.translate import _
|
||||
import tools
|
||||
import os
|
||||
import datetime
|
||||
import netsvc
|
||||
|
||||
_survey_form = '''<?xml version="1.0"?>
|
||||
<form string="Send Invitation">
|
||||
<separator string="Select Partner" colspan="4"/>
|
||||
<field name="partner_ids" nolabel="1" colspan="4"/> />
|
||||
<separator colspan="4" string="Send mail for new user"/>
|
||||
<group cols="2" colspan="4">
|
||||
<field name="send_mail" nolabel="1"/>
|
||||
<field name="mail_subject"/>
|
||||
<newline/>
|
||||
<separator colspan="4" string="Send reminder for existing user"/>
|
||||
<field name="send_mail_existing" nolabel="1"/>
|
||||
<field name="mail_subject_existing"/>
|
||||
<newline/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group cols="2" colspan="4">
|
||||
<field name="mail_from" colspan="4"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<separator string="Message" colspan="4"/>
|
||||
<field name="mail" nolabel="1" colspan="4"/>
|
||||
</form>'''
|
||||
|
||||
|
||||
_survey_fields = {
|
||||
'partner_ids': {'string':'Partner', 'type':'many2many', 'relation':'res.partner'},
|
||||
'send_mail': {'string':'Send mail for new user', 'type':'boolean', 'default':lambda *a: 1},
|
||||
'send_mail_existing': {'string':'Send reminder for existing user', 'type':'boolean', 'default':lambda *a: 1},
|
||||
'mail_subject': {'string':'Subject', 'type':'char', 'default':lambda *a: "New user account.", "size":256},
|
||||
'mail_subject_existing': {'string':'Subject', 'type':'char', 'default':lambda *a: "User account info.", "size":256},
|
||||
'mail_from': {'string':'From', 'type':'char', "size":256, 'required':True, 'default':lambda *a: tools.config['email_from'] },
|
||||
'mail': {'string':'Body', 'type':'text'},
|
||||
}
|
||||
|
||||
second_form = '''<?xml version="1.0"?>
|
||||
<form string="User creation">
|
||||
<separator string="Results :" colspan="4"/>
|
||||
<field name="note" colspan="4" nolabel="1" width="300"/>
|
||||
</form>'''
|
||||
second_fields = {
|
||||
'note' : {'string':'Log', 'type':'text', 'readonly':1}
|
||||
}
|
||||
def genpasswd():
|
||||
chars = string.letters + string.digits
|
||||
return ''.join([choice(chars) for i in range(6)])
|
||||
|
||||
def check_survey(self, cr, uid, data, context):
|
||||
pool= pooler.get_pool(cr.dbname)
|
||||
survey_obj = pool.get('survey')
|
||||
msg = ""
|
||||
name = ""
|
||||
for sur in survey_obj.browse(cr, uid, data['ids']):
|
||||
name += "\t --> " + sur.title + "\n"
|
||||
if sur.state != 'open':
|
||||
msg += sur.title + "\n"
|
||||
if msg:
|
||||
raise wizard.except_wizard(_('Attention!'), _('%sSurvey is not in open state') % msg)
|
||||
data['form']['mail'] = '''Hello %(name)s, \n\n We are inviting you for following survey. \
|
||||
\n ''' + name + '''\n Your login ID: %(login)s, Your password: %(passwd)s
|
||||
\n link :- http://localhost:8080 \n\n Thanks,'''
|
||||
return data['form']
|
||||
|
||||
def send_mail(self, cr, uid, data, context):
|
||||
partner_ids = data['form']['partner_ids'][0][2]
|
||||
pool= pooler.get_pool(cr.dbname)
|
||||
user_ref= pool.get('res.users')
|
||||
survey_ref= pool.get('survey')
|
||||
group_id= pool.get('res.groups').search(cr, uid, [('name', '=', 'Survey / User')])
|
||||
act_id = pool.get('ir.actions.act_window')
|
||||
act_id = act_id.search(cr, uid, [('name', '=', 'Give Survey Response'), \
|
||||
('res_model', '=' , 'survey.name.wiz'), ('view_type', '=', 'form')])
|
||||
out="login,password\n"
|
||||
skipped= 0
|
||||
existing= ""
|
||||
created= ""
|
||||
error= ""
|
||||
res_user = ""
|
||||
user_exists = False
|
||||
attachments = []
|
||||
for id in survey_ref.browse(cr, uid, data['ids']):
|
||||
report = create_report(cr, uid, [id.id], 'report.survey.form', id.title)
|
||||
file = open("/tmp/" + id.title +".pdf")
|
||||
file_data = ""
|
||||
while 1:
|
||||
line = file.readline()
|
||||
file_data += line
|
||||
if not line:
|
||||
break
|
||||
attachments.append((id.title +".pdf",file_data))
|
||||
|
||||
for partner in pool.get('res.partner').browse(cr, uid, partner_ids):
|
||||
for addr in partner.address:
|
||||
if not addr.email:
|
||||
skipped+= 1
|
||||
continue
|
||||
user = user_ref.search(cr, uid, [('login', "=", addr.email)])
|
||||
if user:
|
||||
user = user_ref.browse(cr, uid, user[0])
|
||||
user_ref.write(cr, uid, user.id, {'survey_id':[[6, 0, data['ids']]]})
|
||||
mail= data['form']['mail']%{'login':addr.email, 'passwd':user.password, \
|
||||
'name' : addr.name}
|
||||
if data['form']['send_mail_existing']:
|
||||
tools.email_send(data['form']['mail_from'], [addr.email] , \
|
||||
data['form']['mail_subject_existing'] , mail)
|
||||
existing+= "- %s (Login: %s, Password: %s)\n" % (user.name, addr.email, \
|
||||
user.password)
|
||||
continue
|
||||
user_id =user_ref.search(cr, uid, [('address_id', '=', addr.id)])
|
||||
if user_id:
|
||||
for user_email in user_ref.browse(cr, uid, user_id):
|
||||
mail= data['form']['mail']%{'login':user_email.login, \
|
||||
'passwd':user_email.password, 'name' : addr.name}
|
||||
if data['form']['send_mail_existing']:
|
||||
tools.email_send(data['form']['mail_from'], [addr.email],\
|
||||
data['form']['mail_subject_existing'], mail)
|
||||
res_user+= "- %s (Login: %s, Password: %s)\n" % \
|
||||
(user_email.name, user_email.login, user_email.password)
|
||||
continue
|
||||
passwd= genpasswd()
|
||||
out+= addr.email + ',' + passwd + '\n'
|
||||
mail= data['form']['mail'] % {'login' : addr.email, 'passwd' : passwd, 'name' : addr.name}
|
||||
if data['form']['send_mail']:
|
||||
|
||||
ans = tools.email_send(data['form']['mail_from'], [addr.email], \
|
||||
data['form']['mail_subject'], mail,attach = attachments)
|
||||
|
||||
if ans:
|
||||
user = user_ref.create(cr, uid, {'name' : addr.name or 'Unknown',
|
||||
'login' : addr.email,
|
||||
'password' : passwd,
|
||||
'address_id' : addr.id,
|
||||
'groups_id' : [[6, 0, group_id]],
|
||||
'action_id' : act_id[0],
|
||||
'survey_id' :[[6, 0, data['ids']]]
|
||||
})
|
||||
created+= "- %s (Login: %s, Password: %s)\n" % (addr.name or 'Unknown',\
|
||||
addr.email, passwd)
|
||||
else:
|
||||
error+= "- %s (Login: %s, Password: %s)\n" % (addr.name or 'Unknown',\
|
||||
addr.email, passwd)
|
||||
note= ""
|
||||
if created:
|
||||
note += 'Created users:\n%s\n\n' % (created)
|
||||
if existing:
|
||||
note +='Already existing users:\n%s\n\n' % (existing)
|
||||
if skipped:
|
||||
note += "%d contacts where ignored (an email address is missing).\n\n" % (skipped)
|
||||
if error:
|
||||
note += 'E-Mail not send successfully:\n====================\n%s\n' % (error)
|
||||
if res_user:
|
||||
note += 'E-mail ID used the following user:\n====================\n%s\n' % (res_user)
|
||||
return {'note': note}
|
||||
|
||||
|
||||
def create_report(cr, uid, res_ids, report_name=False, file_name=False):
|
||||
if not report_name or not res_ids:
|
||||
return (False, Exception('Report name and Resources ids are required !!!'))
|
||||
try:
|
||||
ret_file_name = '/tmp/'+file_name+'.pdf'
|
||||
service = netsvc.LocalService(report_name);
|
||||
(result, format) = service.create(cr, uid, res_ids, {}, {})
|
||||
fp = open(ret_file_name, 'wb+');
|
||||
fp.write(result);
|
||||
fp.close();
|
||||
except Exception,e:
|
||||
print 'Exception in create report:',e
|
||||
return (False, str(e))
|
||||
return (True, ret_file_name)
|
||||
|
||||
class send_mail_wizard(wizard.interface):
|
||||
states = {
|
||||
'init' : {
|
||||
'actions' : [check_survey],
|
||||
'result' : {'type' : 'form', 'arch' :_survey_form, 'fields' :_survey_fields,\
|
||||
'state' : [('end', 'Cancel', 'gtk-cancel'), ('send', 'Send', 'gtk-go-forward')]}
|
||||
},
|
||||
'send' : {'actions' : [send_mail],
|
||||
'result' : {'type' : 'form',
|
||||
'arch' : second_form,
|
||||
'fields' : second_fields,
|
||||
'state' : [('end', '_Ok')]}
|
||||
},
|
||||
}
|
||||
send_mail_wizard('wizard.send.invitation')
|
Loading…
Reference in New Issue