summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-04-11 15:40:52 +0200
committerThibault Delavallée <tde@openerp.com>2014-04-11 15:40:52 +0200
commite51049e8edcf34bfbbdf060145acffc82dc18a62 (patch)
treeb58244aa2b6ce7804c28d8f0b5ad3eba49cccbb8 /addons
parentcd4afee17e77d5d5de8dc27f7dbe56be6d8fe7a2 (diff)
parentd04ee666ccb0c35bd1c13d9814fdb52f1159e7e9 (diff)
[MERGE] Sync with upstream
bzr revid: tde@openerp.com-20140411134052-x74otuwuxoz20qab
Diffstat (limited to 'addons')
-rw-r--r--addons/account/installer.py2
-rw-r--r--addons/account/report/account_entries_report.py4
-rw-r--r--addons/account/static/src/js/account_move_reconciliation.js6
-rw-r--r--addons/account_asset/account_asset.py2
-rw-r--r--addons/analytic_user_function/analytic_user_function.py1
-rw-r--r--addons/auth_oauth/controllers/main.py10
-rw-r--r--addons/auth_signup/auth_signup_data.xml2
-rw-r--r--addons/board/static/src/js/dashboard.js9
-rw-r--r--addons/calendar/__openerp__.py1
-rw-r--r--addons/calendar/calendar.py4
-rw-r--r--addons/calendar/security/calendar_security.xml9
-rw-r--r--addons/calendar/security/ir.model.access.csv1
-rw-r--r--addons/event/event_view.xml54
-rw-r--r--addons/event_sale/event_sale_view.xml22
-rw-r--r--addons/hr_evaluation/__openerp__.py25
-rw-r--r--addons/hr_evaluation/hr_evaluation.py223
-rw-r--r--addons/hr_evaluation/hr_evaluation_data.xml1152
-rw-r--r--addons/hr_evaluation/hr_evaluation_view.xml120
-rw-r--r--addons/hr_evaluation/report/hr_evaluation_report.py40
-rw-r--r--addons/hr_evaluation/security/ir.model.access.csv39
-rw-r--r--addons/hr_evaluation/survey_data_appraisal.xml676
-rw-r--r--addons/hr_evaluation/test/hr_evalution_demo.yml12
-rw-r--r--addons/hr_evaluation/test/test_hr_evaluation.yml211
-rw-r--r--addons/hr_recruitment/__openerp__.py10
-rw-r--r--addons/hr_recruitment/hr_recruitment.py72
-rw-r--r--addons/hr_recruitment/hr_recruitment_data.xml373
-rw-r--r--addons/hr_recruitment/hr_recruitment_demo.xml16
-rw-r--r--addons/hr_recruitment/hr_recruitment_view.xml28
-rw-r--r--addons/hr_recruitment/security/ir.model.access.csv2
-rw-r--r--addons/hr_recruitment/static/src/js/job_position.js3
-rw-r--r--addons/hr_recruitment/survey_data_recruitment.xml230
-rw-r--r--addons/hr_recruitment/test/recruitment_process.yml10
-rw-r--r--addons/hw_escpos/controllers/main.py73
-rw-r--r--addons/hw_proxy/controllers/main.py16
-rw-r--r--addons/idea/models/idea.py6
-rw-r--r--addons/mail/static/src/css/mail.css4
-rw-r--r--addons/mail/static/src/js/mail_followers.js14
-rw-r--r--addons/note/note.py4
-rw-r--r--addons/pad/static/src/js/pad.js5
-rw-r--r--addons/payment/__openerp__.py3
-rw-r--r--addons/product/product_view.xml1
-rw-r--r--addons/sale_order_dates/__openerp__.py6
-rw-r--r--addons/sale_order_dates/i18n/sale_order_dates.pot20
-rw-r--r--addons/sale_order_dates/sale_order_dates.py71
-rw-r--r--addons/sale_order_dates/sale_order_dates_view.xml12
-rw-r--r--addons/sale_order_dates/test/requested_date.yml32
-rw-r--r--addons/sale_stock/sale_stock.py6
-rw-r--r--addons/stock/product_view.xml1
-rw-r--r--addons/survey/__init__.py4
-rw-r--r--addons/survey/__openerp__.py53
-rw-r--r--addons/survey/controllers/__init__.py (renamed from addons/survey/report/__init__.py)15
-rw-r--r--addons/survey/controllers/main.py356
-rw-r--r--addons/survey/data/survey.user_input.csv7
-rw-r--r--addons/survey/data/survey.user_input_line.csv125
-rw-r--r--addons/survey/data/survey_cron.xml19
-rw-r--r--addons/survey/data/survey_demo_feedback.xml441
-rw-r--r--addons/survey/data/survey_demo_user.xml9
-rw-r--r--addons/survey/data/survey_stages.xml30
-rw-r--r--addons/survey/i18n/es_MX.po1914
-rw-r--r--addons/survey/i18n/es_VE.po1914
-rw-r--r--addons/survey/i18n/survey.pot1719
-rw-r--r--addons/survey/report/survey_analysis_report.py433
-rw-r--r--addons/survey/report/survey_browse_response.py542
-rw-r--r--addons/survey/report/survey_form.py397
-rw-r--r--addons/survey/security/ir.model.access.csv46
-rw-r--r--addons/survey/security/survey_security.xml87
-rw-r--r--addons/survey/specification/specification.txt157
-rw-r--r--addons/survey/specification/survey.pngbin67420 -> 0 bytes
-rw-r--r--addons/survey/specification/survey_page.pngbin50072 -> 0 bytes
-rw-r--r--addons/survey/specification/survey_question.pngbin56641 -> 0 bytes
-rw-r--r--addons/survey/specification/survey_response.pngbin56037 -> 0 bytes
-rw-r--r--addons/survey/static/src/css/survey.css13
-rw-r--r--addons/survey/static/src/css/survey_result.css53
-rw-r--r--addons/survey/static/src/js/survey.js131
-rw-r--r--addons/survey/static/src/js/survey_result.js177
-rw-r--r--addons/survey/survey.py1742
-rw-r--r--addons/survey/survey_data.xml17
-rw-r--r--addons/survey/survey_demo.xml3531
-rw-r--r--addons/survey/survey_report.xml25
-rw-r--r--addons/survey/survey_view.xml1258
-rw-r--r--addons/survey/test/__init__.py27
-rw-r--r--addons/survey/test/draft2open2close_request.yml50
-rw-r--r--addons/survey/test/draft2open2close_survey.yml111
-rw-r--r--addons/survey/test/survey_question_type.yml6
-rw-r--r--addons/survey/test/survey_report.yml26
-rw-r--r--addons/survey/test/test_survey.py40
-rw-r--r--addons/survey/views/survey_result.xml316
-rw-r--r--addons/survey/views/survey_templates.xml292
-rw-r--r--addons/survey/views/survey_views.xml532
-rw-r--r--addons/survey/wizard/__init__.py10
-rw-r--r--addons/survey/wizard/survey_answer.py1259
-rw-r--r--addons/survey/wizard/survey_answer.xml37
-rw-r--r--addons/survey/wizard/survey_browse_answer.py59
-rw-r--r--addons/survey/wizard/survey_browse_answer.xml42
-rw-r--r--addons/survey/wizard/survey_email_compose_message.py225
-rw-r--r--addons/survey/wizard/survey_email_compose_message.xml84
-rw-r--r--addons/survey/wizard/survey_print.py67
-rw-r--r--addons/survey/wizard/survey_print.xml45
-rw-r--r--addons/survey/wizard/survey_print_answer.py72
-rw-r--r--addons/survey/wizard/survey_print_answer.xml45
-rw-r--r--addons/survey/wizard/survey_print_statistics.xml37
-rw-r--r--addons/survey/wizard/survey_selection.py105
-rw-r--r--addons/survey/wizard/survey_selection.xml36
-rw-r--r--addons/survey/wizard/survey_send_invitation.py233
-rw-r--r--addons/survey/wizard/survey_send_invitation.xml74
-rw-r--r--addons/survey_crm/__init__.py22
-rw-r--r--addons/survey_crm/__openerp__.py (renamed from addons/survey/wizard/survey_print_statistics.py)48
-rw-r--r--addons/survey_crm/crm_view.xml18
-rw-r--r--addons/survey_crm/survey.py43
-rw-r--r--addons/web_linkedin/static/src/js/linkedin.js14
-rw-r--r--addons/website/static/src/css/website.css5
-rw-r--r--addons/website/static/src/css/website.sass3
-rw-r--r--addons/website/static/src/js/website.snippets.animation.js1
-rw-r--r--addons/website/static/src/js/website.snippets.editor.js8
-rw-r--r--addons/website/views/snippets.xml1
-rw-r--r--addons/website/views/website_templates.xml1
-rw-r--r--addons/website_forum/static/src/js/website_forum.js2
-rw-r--r--addons/website_quote/security/ir.model.access.csv1
-rw-r--r--addons/website_sale/controllers/main.py4
-rw-r--r--addons/website_twitter/__init__.py2
-rw-r--r--addons/website_twitter/__openerp__.py25
-rw-r--r--addons/website_twitter/controllers/__init__.py1
-rw-r--r--addons/website_twitter/controllers/main.py32
-rw-r--r--addons/website_twitter/data/twitter_data.xml16
-rw-r--r--addons/website_twitter/models/__init__.py3
-rw-r--r--addons/website_twitter/models/twitter.py115
-rw-r--r--addons/website_twitter/models/twitter_config.py42
-rw-r--r--addons/website_twitter/security/ir.model.access.csv2
-rw-r--r--addons/website_twitter/static/src/css/Makefile3
-rw-r--r--addons/website_twitter/static/src/css/website.twitter.css110
-rw-r--r--addons/website_twitter/static/src/css/website.twitter.sass94
-rw-r--r--addons/website_twitter/static/src/img/api_key.pngbin0 -> 39304 bytes
-rw-r--r--addons/website_twitter/static/src/img/loadtweet.gifbin0 -> 16060 bytes
-rw-r--r--addons/website_twitter/static/src/img/twitter_scroll.pngbin0 -> 2388 bytes
-rw-r--r--addons/website_twitter/static/src/js/website.twitter.animation.js144
-rw-r--r--addons/website_twitter/static/src/js/website.twitter.editor.js51
-rw-r--r--addons/website_twitter/static/src/xml/website.twitter.xml45
-rw-r--r--addons/website_twitter/views/twitter_snippet.xml33
-rw-r--r--addons/website_twitter/views/twitter_view.xml56
139 files changed, 6588 insertions, 17045 deletions
diff --git a/addons/account/installer.py b/addons/account/installer.py
index 961b8f9e763..343e22a7632 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -47,7 +47,7 @@ class account_installer(osv.osv_memory):
# try get the list on apps server
try:
- apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com')
+ apps_server = self.pool.get('ir.module.module').get_apps_server(cr, uid, context=context)
up = urlparse.urlparse(apps_server)
url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie)
diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
index 6060d97c182..df2d92c9f12 100644
--- a/addons/account/report/account_entries_report.py
+++ b/addons/account/report/account_entries_report.py
@@ -94,7 +94,7 @@ class account_entries_report(osv.osv):
return super(account_entries_report, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order,
context=context, count=count)
- def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
+ def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False,lazy=True):
if context is None:
context = {}
fiscalyear_obj = self.pool.get('account.fiscalyear')
@@ -108,7 +108,7 @@ class account_entries_report(osv.osv):
domain.append(['period_id','in',ids])
else:
domain = domain
- return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby)
+ return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby,lazy)
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_entries_report')
diff --git a/addons/account/static/src/js/account_move_reconciliation.js b/addons/account/static/src/js/account_move_reconciliation.js
index cbc0abc4f4d..1040e9d9b5c 100644
--- a/addons/account/static/src/js/account_move_reconciliation.js
+++ b/addons/account/static/src/js/account_move_reconciliation.js
@@ -86,10 +86,10 @@ openerp.account = function (instance) {
var self = this;
var ids = this.get_selected_ids();
if (ids.length === 0) {
- instance.web.dialog($("<div />").text(_t("You must choose at least one record.")), {
+ new instance.web.Dialog(this, {
title: _t("Warning"),
- modal: true
- });
+ size: 'medium',
+ }, $("<div />").text(_t("You must choose at least one record."))).open();
return false;
}
diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py
index f4e5d17a8e0..7041c3aafbf 100644
--- a/addons/account_asset/account_asset.py
+++ b/addons/account_asset/account_asset.py
@@ -328,7 +328,7 @@ class account_asset_asset(osv.osv):
default = {}
if context is None:
context = {}
- default.update({'depreciation_line_ids': [], 'state': 'draft'})
+ default.update({'depreciation_line_ids': [], 'account_move_line_ids': [], 'history_ids': [], 'state': 'draft'})
return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
def _compute_entries(self, cr, uid, ids, period_id, context=None):
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py
index 2671fc92581..5a17ac91e53 100644
--- a/addons/analytic_user_function/analytic_user_function.py
+++ b/addons/analytic_user_function/analytic_user_function.py
@@ -26,6 +26,7 @@ import openerp.addons.decimal_precision as dp
class analytic_user_funct_grid(osv.osv):
_name="analytic.user.funct.grid"
_description= "Price per User"
+ _rec_name="user_id"
_columns={
'user_id': fields.many2one("res.users", "User", required=True,),
'product_id': fields.many2one("product.product", "Service", required=True,),
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index b4ce20d49e3..4fca426ffc0 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -2,6 +2,7 @@ import functools
import logging
import simplejson
+import urlparse
import werkzeug.utils
from werkzeug.exceptions import BadRequest
@@ -68,7 +69,8 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home):
def get_state(self, provider):
state = dict(
d=request.session.db,
- p=provider['id']
+ p=provider['id'],
+ r=request.httprequest.full_path
)
token = request.params.get('token')
if token:
@@ -137,8 +139,12 @@ class OAuthController(http.Controller):
cr.commit()
action = state.get('a')
menu = state.get('m')
+ redirect = state.get('r')
url = '/web'
- if action:
+ if redirect and not redirect.startswith('/auth_oauth/signin') and \
+ (not redirect.startswith('/web/login') or 'redirect' in urlparse.urlsplit(redirect).query):
+ url = redirect
+ elif action:
url = '/web#action=%s' % action
elif menu:
url = '/web#menu_id=%s' % menu
diff --git a/addons/auth_signup/auth_signup_data.xml b/addons/auth_signup/auth_signup_data.xml
index f470811d39e..2789fcd8315 100644
--- a/addons/auth_signup/auth_signup_data.xml
+++ b/addons/auth_signup/auth_signup_data.xml
@@ -10,7 +10,7 @@
<field name="password"></field>
<field name="active" eval="False"/>
<!-- Avoid auto-including this user in any default group, just like a typical portal member -->
- <field name="groups_id" eval="[(4,ref('base.group_portal'))]"/>
+ <field name="groups_id" eval="[(6, 0, [ref('base.group_portal')])]"/>
<!-- allow signuped users to have a alias -->
<field name="alias_name">_usertemplate</field>
</record>
diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js
index 65737ad234e..cf756e121da 100644
--- a/addons/board/static/src/js/dashboard.js
+++ b/addons/board/static/src/js/dashboard.js
@@ -88,15 +88,12 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
var qdict = {
current_layout : this.$el.find('.oe_dashboard').attr('data-layout')
};
- var $dialog = instance.web.dialog($('<div>'), {
- modal: true,
+ var $dialog = instance.web.Dialog(this, {
title: _t("Edit Layout"),
- width: 'auto',
- height: 'auto'
- }).html(QWeb.render('DashBoard.layouts', qdict));
+ }, QWeb.render('DashBoard.layouts', qdict)).open();
$dialog.find('li').click(function() {
var layout = $(this).attr('data-layout');
- $dialog.dialog('destroy');
+ $dialog.modal('hide');
self.do_change_layout(layout);
});
},
diff --git a/addons/calendar/__openerp__.py b/addons/calendar/__openerp__.py
index 2f06a0b5cb9..f0417db1bf6 100644
--- a/addons/calendar/__openerp__.py
+++ b/addons/calendar/__openerp__.py
@@ -40,7 +40,6 @@ If you need to manage your meetings, you should install the CRM module.
'website': 'http://www.openerp.com',
'demo': ['calendar_demo.xml'],
'data': [
- 'security/calendar_security.xml',
'security/ir.model.access.csv',
'calendar_view.xml',
'contacts_view.xml',
diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py
index e928432821b..add0030d76c 100644
--- a/addons/calendar/calendar.py
+++ b/addons/calendar/calendar.py
@@ -1476,7 +1476,7 @@ class calendar_event(osv.Model):
self.create_attendees(cr, uid, [res], context=context)
return res
- def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
+ def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
if not context:
context = {}
@@ -1484,7 +1484,7 @@ class calendar_event(osv.Model):
raise osv.except_osv(_('Warning!'), _('Group by date is not supported, use the calendar view instead.'))
virtual_id = context.get('virtual_id', True)
context.update({'virtual_id': False})
- res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
+ res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby, lazy=lazy)
for result in res:
#remove the count, since the value is not consistent with the result of the search when expand the group
for groupname in groupby:
diff --git a/addons/calendar/security/calendar_security.xml b/addons/calendar/security/calendar_security.xml
deleted file mode 100644
index 7c4363d21fc..00000000000
--- a/addons/calendar/security/calendar_security.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data noupdate="0">
- <record model="res.groups" id="base.group_survey_user">
- <field name="name">Survey / User</field>
- <field name="users" eval="[(4, ref('base.user_root'))]"/>
- </record>
- </data>
-</openerp>
diff --git a/addons/calendar/security/ir.model.access.csv b/addons/calendar/security/ir.model.access.csv
index caa7f0c6970..4da2e1a1cc6 100644
--- a/addons/calendar/security/ir.model.access.csv
+++ b/addons/calendar/security/ir.model.access.csv
@@ -1,7 +1,6 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_calendar_attendee,calendar.attendee,model_calendar_attendee,,1,1,1,1
access_calendar_alarm,calendar.alarm,model_calendar_alarm,base.group_user,1,1,1,1
-access_calendar_attendee_survey_user,calendar.attendee,model_calendar_attendee,base.group_survey_user,1,0,0,0
access_calendar_event_manager,calendar.event.manager,model_calendar_event,base.group_sale_manager,1,1,1,1
access_calendar_event,calendar.event,model_calendar_event,base.group_sale_salesman,1,1,1,0
access_calendar_event_all,calendar.event_all,model_calendar_event,base.group_user,1,1,1,1
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 07a36ea3a6b..3669b5a1e6f 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -105,9 +105,9 @@
<field name="phone"/>
<field name="nb_register" />
<field name="state"/>
- <button name="registration_open" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
- <button name="button_reg_close" string="Attended the Event" states="open" type="object" icon="gtk-jump-to"/>
- <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
+ <button name="registration_open" string="Confirm Registration" states="draft" type="object"/>
+ <button name="button_reg_close" string="Attended the Event" states="open" type="object"/>
+ <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object"/>
</tree>
<form string="Registration">
<field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" on_change="onchange_partner_id(partner_id, context)" />
@@ -125,9 +125,9 @@
<separator string="" colspan="4"/>
<newline/>
<field name="state" colspan="2"/>
- <button name="registration_open" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
- <button name="button_reg_close" string="Attended the Event" states="open" type="object" icon="gtk-jump-to"/>
- <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
+ <button name="registration_open" string="Confirm Registration" states="draft" type="object"/>
+ <button name="button_reg_close" string="Attended the Event" states="open" type="object"/>
+ <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object"/>
</group>
</form>
</field>
@@ -263,21 +263,21 @@
<field name="arch" type="xml">
<search string="Events">
<field name="name" string="Events"/>
- <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
+ <filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
- <filter icon="terp-check" string="Unconfirmed" name="draft" domain="[('state','=','draft')]" help="Events in New state"/>
- <filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
+ <filter string="Unconfirmed" name="draft" domain="[('state','=','draft')]" help="Events in New state"/>
+ <filter string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
<separator/>
- <filter icon="terp-personal" string="My Events" help="My Events" domain="[('user_id','=',uid)]"/>
+ <filter string="My Events" help="My Events" domain="[('user_id','=',uid)]"/>
<separator/>
- <filter icon="terp-go-today" string="Upcoming" name="upcoming" domain="[('date_begin','&gt;=', time.strftime('%%Y-%%m-%%d 00:00:00'))]" help="Upcoming events from today" />
+ <filter string="Upcoming" name="upcoming" domain="[('date_begin','&gt;=', time.strftime('%%Y-%%m-%%d 00:00:00'))]" help="Upcoming events from today" />
<field name="type"/>
<field name="user_id"/>
<group expand="0" string="Group By...">
- <filter string="Responsible" icon="terp-personal" context="{'group_by': 'user_id'}"/>
- <filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
- <filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
- <filter string="Start Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_begin'}"/>
+ <filter string="Responsible" context="{'group_by': 'user_id'}"/>
+ <filter string="Event Type" context="{'group_by':'type'}"/>
+ <filter string="Status" context="{'group_by':'state'}"/>
+ <filter string="Start Month" domain="[]" context="{'group_by':'date_begin'}"/>
</group>
</search>
</field>
@@ -333,9 +333,9 @@
<field name="origin"/>
<field name="state"/>
<field name="message_unread" invisible="1"/>
- <button name="registration_open" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
- <button name="button_reg_close" string="Attended the Event" states="open" type="object" icon="gtk-jump-to"/>
- <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
+ <button name="registration_open" string="Confirm Registration" states="draft" type="object"/>
+ <button name="button_reg_close" string="Attended the Event" states="open" type="object"/>
+ <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object"/>
</tree>
</field>
</record>
@@ -367,7 +367,7 @@
<field name="email" class="oe_inline"/>
<button class="oe_inline oe_right" string="Send Email"
name="%(mail.action_email_compose_message_wizard)d"
- icon="terp-mail-message-new" context= '{"default_email_to":email}' type="action"/>
+ context= '{"default_email_to":email}' type="action"/>
</div>
</group>
<group>
@@ -420,20 +420,20 @@
<field name="arch" type="xml">
<search string="Event Registration">
<field name="name" string="Participant" filter_domain="['|','|',('name','ilike',self),('email','ilike',self),('origin','ilike',self)]"/>
- <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
+ <filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
- <filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Registrations in unconfirmed state"/>
- <filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','open')]" help="Confirmed registrations"/>
+ <filter string="New" name="draft" domain="[('state','=','draft')]" help="Registrations in unconfirmed state"/>
+ <filter string="Confirmed" domain="[('state','=','open')]" help="Confirmed registrations"/>
<separator/>
- <filter icon="terp-personal" string="My Registrations" help="My Registrations" domain="[('user_id','=',uid)]"/>
+ <filter string="My Registrations" help="My Registrations" domain="[('user_id','=',uid)]"/>
<field name="event_id"/>
<field name="user_id"/>
<field name="partner_id"/>
<group expand="0" string="Group By...">
- <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
- <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
- <filter string="Event" icon="terp-crm" domain="[]" context="{'group_by':'event_id'}"/>
- <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+ <filter string="Responsible" domain="[]" context="{'group_by':'user_id'}"/>
+ <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
+ <filter string="Event" name="group_event" domain="[]" context="{'group_by':'event_id'}"/>
+ <filter string="Status" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 821a4c19b83..1f42108c993 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -17,6 +17,28 @@
</field>
</record>
+ <record model="ir.ui.view" id="view_event_registration_ticket_search">
+ <field name="name">event.registration.ticket.search</field>
+ <field name="model">event.registration</field>
+ <field name="inherit_id" ref="event.view_registration_search" />
+ <field name="arch" type="xml">
+ <filter name="group_event" position="after">
+ <filter string="Ticket Type" domain="[]" context="{'group_by':'event_ticket_id'}"/>
+ </filter>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_event_registration_ticket_tree">
+ <field name="name">event.registration.ticket.tree</field>
+ <field name="model">event.registration</field>
+ <field name="inherit_id" ref="event.view_event_registration_tree" />
+ <field name="arch" type="xml">
+ <field name="event_id" position="after">
+ <field name="event_ticket_id"/>
+ </field>
+ </field>
+ </record>
+
<record model="ir.ui.view" id="event_sale_product_template_form">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view" />
diff --git a/addons/hr_evaluation/__openerp__.py b/addons/hr_evaluation/__openerp__.py
index 711571a2e89..2d62465ecb5 100644
--- a/addons/hr_evaluation/__openerp__.py
+++ b/addons/hr_evaluation/__openerp__.py
@@ -20,22 +20,24 @@
##############################################################################
{
- 'name' : 'Employee Appraisals',
+ 'name': 'Employee Appraisals',
'version': '0.1',
'author': 'OpenERP SA',
'category': 'Human Resources',
'sequence': 31,
'website': 'http://www.openerp.com',
'summary': 'Periodical Evaluations, Appraisals, Surveys',
- 'images': ['images/hr_evaluation_analysis.jpeg','images/hr_evaluation.jpeg','images/hr_interview_requests.jpeg'],
- 'depends': ['hr','calendar','survey'],
+ 'images': ['images/hr_evaluation_analysis.jpeg',
+ 'images/hr_evaluation.jpeg',
+ 'images/hr_interview_requests.jpeg'],
+ 'depends': ['hr', 'calendar', 'survey'],
'description': """
Periodical Employees evaluation and appraisals
==============================================
-By using this application you can maintain the motivational process by doing periodical evaluations of your employees' performance. The regular assessment of human resources can benefit your people as well your organization.
+By using this application you can maintain the motivational process by doing periodical evaluations of your employees' performance. The regular assessment of human resources can benefit your people as well your organization.
-An evaluation plan can be assigned to each employee. These plans define the frequency and the way you manage your periodic personal evaluations. You will be able to define steps and attach interview forms to each step.
+An evaluation plan can be assigned to each employee. These plans define the frequency and the way you manage your periodic personal evaluations. You will be able to define steps and attach interview forms to each step.
Manages several types of evaluations: bottom-up, top-down, self-evaluations and the final evaluation by the manager.
@@ -47,23 +49,22 @@ Key Features
* Every evaluation filled by employees can be viewed in a PDF form.
* Interview Requests are generated automatically by OpenERP according to employees evaluation plans. Each user receives automatic emails and requests to perform a periodical evaluation of their colleagues.
""",
- "demo": ["hr_evaluation_demo.xml"],
"data": [
'security/ir.model.access.csv',
'security/hr_evaluation_security.xml',
'hr_evaluation_view.xml',
'report/hr_evaluation_report_view.xml',
'board_hr_evaluation_view.xml',
+ 'survey_data_appraisal.xml',
'hr_evaluation_data.xml',
'hr_evaluation_installer.xml',
],
- 'test': [
- 'test/test_hr_evaluation.yml',
- 'test/hr_evalution_demo.yml',
- ],
+ "demo": ["hr_evaluation_demo.xml"],
+ # 'test': [
+ # 'test/test_hr_evaluation.yml',
+ # 'test/hr_evalution_demo.yml',
+ # ],
'auto_install': False,
'installable': True,
'application': True,
}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py
index 462154e9e4a..7d9f45f3585 100644
--- a/addons/hr_evaluation/hr_evaluation.py
+++ b/addons/hr_evaluation/hr_evaluation.py
@@ -19,15 +19,17 @@
#
##############################################################################
-from datetime import datetime
+from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
from dateutil import parser
import time
from openerp.osv import fields, osv
from openerp.tools.translate import _
+from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DF
-class hr_evaluation_plan(osv.osv):
+
+class hr_evaluation_plan(osv.Model):
_name = "hr_evaluation.plan"
_description = "Appraisal Plan"
_columns = {
@@ -42,11 +44,11 @@ class hr_evaluation_plan(osv.osv):
'active': True,
'month_first': 6,
'month_next': 12,
- 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.account', context=c),
+ 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.account', context=c),
}
-class hr_evaluation_plan_phase(osv.osv):
+class hr_evaluation_plan_phase(osv.Model):
_name = "hr_evaluation.plan.phase"
_description = "Appraisal Plan Phase"
_order = "sequence"
@@ -54,13 +56,13 @@ class hr_evaluation_plan_phase(osv.osv):
'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, readonly=True),
- 'plan_id': fields.many2one('hr_evaluation.plan','Appraisal Plan', ondelete='cascade'),
+ 'plan_id': fields.many2one('hr_evaluation.plan', 'Appraisal Plan', 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',required=True),
+ ('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.survey', 'Appraisal Form', required=True),
'send_answer_manager': fields.boolean('All Answers',
help="Send all answers to the manager"),
'send_answer_employee': fields.boolean('All Answers',
@@ -72,15 +74,14 @@ class hr_evaluation_plan_phase(osv.osv):
'wait': fields.boolean('Wait Previous Phases',
help="Check this box if you want to wait that all preceding phases " +
"are finished before launching this phase."),
- 'mail_feature': fields.boolean('Send mail for this phase', help="Check this box if you want to send mail to employees"+
- " coming under this phase"),
+ 'mail_feature': fields.boolean('Send mail for this phase', help="Check this box if you want to send mail to employees coming under this phase"),
'mail_body': fields.text('Email'),
- 'email_subject':fields.text('char')
+ 'email_subject': fields.text('Subject')
}
_defaults = {
'sequence': 1,
'email_subject': _('''Regarding '''),
- 'mail_body': lambda *a:_('''
+ 'mail_body': lambda *a: _('''
Date: %(date)s
Dear %(employee_name)s,
@@ -98,26 +99,24 @@ Thanks,
}
-class hr_employee(osv.osv):
+class hr_employee(osv.Model):
_name = "hr.employee"
- _inherit="hr.employee"
-
+ _inherit = "hr.employee"
_columns = {
'evaluation_plan_id': fields.many2one('hr_evaluation.plan', 'Appraisal Plan'),
'evaluation_date': fields.date('Next Appraisal Date', help="The date of the next appraisal is computed by the appraisal plan's dates (first appraisal + periodicity)."),
}
- def run_employee_evaluation(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
+
+ def run_employee_evaluation(self, cr, uid, automatic=False, use_new_cursor=False, context=None): # cronjob
now = parser.parse(datetime.now().strftime('%Y-%m-%d'))
obj_evaluation = self.pool.get('hr_evaluation.evaluation')
- emp_ids =self.search(cr, uid, [ ('evaluation_plan_id','<>',False), ('evaluation_date','=', False)], context=context)
+ emp_ids = self.search(cr, uid, [('evaluation_plan_id', '<>', False), ('evaluation_date', '=', False)], context=context)
for emp in self.browse(cr, uid, emp_ids, context=context):
- first_date = (now+ relativedelta(months=emp.evaluation_plan_id.month_first)).strftime('%Y-%m-%d')
+ first_date = (now + relativedelta(months=emp.evaluation_plan_id.month_first)).strftime('%Y-%m-%d')
self.write(cr, uid, [emp.id], {'evaluation_date': first_date}, context=context)
- emp_ids =self.search(cr, uid, [
- ('evaluation_plan_id','<>',False), ('evaluation_date','<=', time.strftime("%Y-%m-%d")),
- ], context=context)
+ emp_ids = self.search(cr, uid, [('evaluation_plan_id', '<>', False), ('evaluation_date', '<=', time.strftime("%Y-%m-%d"))], context=context)
for emp in self.browse(cr, uid, emp_ids, context=context):
next_date = (now + relativedelta(months=emp.evaluation_plan_id.month_next)).strftime('%Y-%m-%d')
self.write(cr, uid, [emp.id], {'evaluation_date': next_date}, context=context)
@@ -126,39 +125,35 @@ class hr_employee(osv.osv):
return True
-
-class hr_evaluation(osv.osv):
+class hr_evaluation(osv.Model):
_name = "hr_evaluation.evaluation"
_inherit = "mail.thread"
_description = "Employee Appraisal"
- _rec_name = 'employee_id'
_columns = {
'date': fields.date("Appraisal Deadline", required=True, select=True),
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
'note_summary': fields.text('Appraisal Summary'),
- 'note_action': fields.text('Action Plan',
- help="If the evaluation does not meet the expectations, you can propose"+
- "an action plan"),
+ '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'),
+ ('0', 'Significantly below expectations'),
+ ('1', 'Do not meet expectations'),
+ ('2', 'Meet expectations'),
+ ('3', 'Exceeds expectations'),
+ ('4', 'Significantly exceeds expectations'),
], "Appreciation", help="This is the appreciation on which the evaluation is summarized."),
- 'survey_request_ids': fields.one2many('hr.evaluation.interview','evaluation_id','Appraisal Forms'),
+ 'survey_request_ids': fields.one2many('hr.evaluation.interview', 'evaluation_id', 'Appraisal Forms'),
'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', required=True),
'state': fields.selection([
- ('draft','New'),
- ('cancel','Cancelled'),
- ('wait','Plan In Progress'),
- ('progress','Waiting Appreciation'),
- ('done','Done'),
+ ('draft', 'New'),
+ ('cancel', 'Cancelled'),
+ ('wait', 'Plan In Progress'),
+ ('progress', 'Waiting Appreciation'),
+ ('done', 'Done'),
], 'Status', required=True, readonly=True),
'date_close': fields.date('Ending Date', select=True),
}
_defaults = {
- 'date': lambda *a: (parser.parse(datetime.now().strftime('%Y-%m-%d')) + relativedelta(months =+ 1)).strftime('%Y-%m-%d'),
+ 'date': lambda *a: (parser.parse(datetime.now().strftime('%Y-%m-%d')) + relativedelta(months=+1)).strftime('%Y-%m-%d'),
'state': lambda *a: 'draft',
}
@@ -169,7 +164,8 @@ class hr_evaluation(osv.osv):
res = []
for record in reads:
name = record.plan_id.name
- res.append((record['id'], name))
+ employee = record.employee_id.name_related
+ res.append((record['id'], name + ' / ' + employee))
return res
def onchange_employee_id(self, cr, uid, ids, employee_id, context=None):
@@ -183,7 +179,6 @@ class hr_evaluation(osv.osv):
return {'value': vals}
def button_plan_in_progress(self, cr, uid, ids, context=None):
- mail_message = self.pool.get('mail.message')
hr_eval_inter_obj = self.pool.get('hr.evaluation.interview')
if context is None:
context = {}
@@ -202,10 +197,9 @@ class hr_evaluation(osv.osv):
int_id = hr_eval_inter_obj.create(cr, uid, {
'evaluation_id': evaluation.id,
- 'survey_id': phase.survey_id.id,
- 'date_deadline': (parser.parse(datetime.now().strftime('%Y-%m-%d')) + relativedelta(months =+ 1)).strftime('%Y-%m-%d'),
+ 'phase_id': phase.id,
+ 'deadline': (parser.parse(datetime.now().strftime('%Y-%m-%d')) + relativedelta(months=+1)).strftime('%Y-%m-%d'),
'user_id': child.user_id.id,
- 'user_to_review_id': evaluation.employee_id.id
}, context=context)
if phase.wait:
wait = True
@@ -214,7 +208,7 @@ class hr_evaluation(osv.osv):
if (not wait) and phase.mail_feature:
body = phase.mail_body % {'employee_name': child.name, 'user_signature': child.user_id.signature,
- 'eval_name': phase.survey_id.title, 'date': time.strftime('%Y-%m-%d'), 'time': time }
+ 'eval_name': phase.survey_id.title, 'date': time.strftime('%Y-%m-%d'), 'time': time}
sub = phase.email_subject
if child.work_email:
vals = {'state': 'outgoing',
@@ -224,32 +218,32 @@ class hr_evaluation(osv.osv):
'email_from': evaluation.employee_id.work_email}
self.pool.get('mail.mail').create(cr, uid, vals, context=context)
- self.write(cr, uid, ids, {'state':'wait'}, context=context)
+ self.write(cr, uid, ids, {'state': 'wait'}, context=context)
return True
def button_final_validation(self, cr, uid, ids, context=None):
request_obj = self.pool.get('hr.evaluation.interview')
- self.write(cr, uid, ids, {'state':'progress'}, context=context)
+ self.write(cr, uid, ids, {'state': 'progress'}, context=context)
for evaluation in self.browse(cr, uid, ids, context=context):
if evaluation.employee_id and evaluation.employee_id.parent_id and evaluation.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [evaluation.id], user_ids=[evaluation.employee_id.parent_id.user_id.id], context=context)
- if len(evaluation.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', evaluation.id),('state', 'in', ['done','cancel'])], context=context)):
- raise osv.except_osv(_('Warning!'),_("You cannot change state, because some appraisal(s) are in waiting answer or draft state."))
+ if len(evaluation.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', evaluation.id), ('state', 'in', ['done', 'cancel'])], context=context)):
+ raise osv.except_osv(_('Warning!'), _("You cannot change state, because some appraisal forms have not been completed."))
return True
def button_done(self, cr, uid, ids, context=None):
- self.write(cr, uid, ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
+ self.write(cr, uid, ids, {'state': 'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
return True
def button_cancel(self, cr, uid, ids, context=None):
- interview_obj=self.pool.get('hr.evaluation.interview')
+ interview_obj = self.pool.get('hr.evaluation.interview')
evaluation = self.browse(cr, uid, ids[0], context)
interview_obj.survey_req_cancel(cr, uid, [r.id for r in evaluation.survey_request_ids])
- self.write(cr, uid, ids,{'state':'cancel'}, context=context)
+ self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
return True
def button_draft(self, cr, uid, ids, context=None):
- self.write(cr, uid, ids,{'state': 'draft'}, context=context)
+ self.write(cr, uid, ids, {'state': 'draft'}, context=context)
return True
def copy(self, cr, uid, id, default=None, context=None):
@@ -260,65 +254,90 @@ class hr_evaluation(osv.osv):
default = default.copy()
default['survey_request_ids'] = []
return super(hr_evaluation, self).copy(cr, uid, id, default, context=context)
-
+
def write(self, cr, uid, ids, vals, context=None):
if vals.get('employee_id'):
employee_id = self.pool.get('hr.employee').browse(cr, uid, vals.get('employee_id'), context=context)
if employee_id.parent_id and employee_id.parent_id.user_id:
vals['message_follower_ids'] = [(4, employee_id.parent_id.user_id.partner_id.id)]
if 'date' in vals:
- new_vals = {'date_deadline': vals.get('date')}
+ new_vals = {'deadline': vals.get('date')}
obj_hr_eval_iterview = self.pool.get('hr.evaluation.interview')
- for evalutation in self.browse(cr, uid, ids, context=context):
- for survey_req in evalutation.survey_request_ids:
+ for evaluation in self.browse(cr, uid, ids, context=context):
+ for survey_req in evaluation.survey_request_ids:
obj_hr_eval_iterview.write(cr, uid, [survey_req.id], new_vals, context=context)
return super(hr_evaluation, self).write(cr, uid, ids, vals, context=context)
-class survey_request(osv.osv):
- _inherit = "survey.request"
- _columns = {
- 'is_evaluation': fields.boolean('Is Appraisal?'),
- }
-
-
-class hr_evaluation_interview(osv.osv):
+class hr_evaluation_interview(osv.Model):
_name = 'hr.evaluation.interview'
- _inherits = {'survey.request': 'request_id'}
- _inherit = 'mail.thread'
- _rec_name = 'request_id'
+ _inherit = 'mail.thread'
+ _rec_name = 'user_to_review_id'
_description = 'Appraisal Interview'
_columns = {
- 'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade', required=True),
- 'user_to_review_id': fields.many2one('hr.employee', 'Employee to Interview'),
- 'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Appraisal Form'),
+ 'request_id': fields.many2one('survey.user_input', 'Survey Request', ondelete='cascade', readonly=True),
+ 'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Appraisal Plan', required=True),
+ 'phase_id': fields.many2one('hr_evaluation.plan.phase', 'Appraisal Phase', required=True),
+ 'user_to_review_id': fields.related('evaluation_id', 'employee_id', type="many2one", relation="hr.employee", string="Employee to evaluate"),
+ 'user_id': fields.many2one('res.users', 'Interviewer'),
+ 'state': fields.selection([('draft', "Draft"),
+ ('waiting_answer', "In progress"),
+ ('done', "Done"),
+ ('cancel', "Cancelled")],
+ string="State", required=True),
+ 'survey_id': fields.related('phase_id', 'survey_id', string="Appraisal Form", type="many2one", relation="survey.survey"),
+ 'deadline': fields.related('request_id', 'deadline', type="datetime", string="Deadline"),
}
_defaults = {
- 'is_evaluation': True,
+ 'state': 'draft'
}
+ def create(self, cr, uid, vals, context=None):
+ phase_obj = self.pool.get('hr_evaluation.plan.phase')
+ survey_id = phase_obj.read(cr, uid, vals.get('phase_id'), fields=['survey_id'], context=context)['survey_id'][0]
+
+ if vals.get('user_id'):
+ user_obj = self.pool.get('res.users')
+ partner_id = user_obj.read(cr, uid, vals.get('user_id'), fields=['partner_id'], context=context)['partner_id'][0]
+ else:
+ partner_id = None
+
+ user_input_obj = self.pool.get('survey.user_input')
+
+ if not vals.get('deadline'):
+ vals['deadline'] = (datetime.now() + timedelta(days=28)).strftime(DF)
+
+ ret = user_input_obj.create(cr, uid, {'survey_id': survey_id,
+ 'deadline': vals.get('deadline'),
+ 'type': 'link',
+ 'partner_id': partner_id}, context=context)
+ vals['request_id'] = ret
+ return super(hr_evaluation_interview, self).create(cr, uid, vals, context=context)
+
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
reads = self.browse(cr, uid, ids, context=context)
res = []
for record in reads:
- name = record.request_id.survey_id.title
+ name = record.survey_id.title
res.append((record['id'], name))
return res
def survey_req_waiting_answer(self, cr, uid, ids, context=None):
- self.write(cr, uid, ids, { 'state': 'waiting_answer'}, context=context)
+ request_obj = self.pool.get('survey.user_input')
+ for interview in self.browse(cr, uid, ids, context=context):
+ request_obj.action_survey_resent(cr, uid, [interview.id], context=context)
+ self.write(cr, uid, interview.id, {'state': 'waiting_answer'}, context=context)
return True
def survey_req_done(self, cr, uid, ids, context=None):
- hr_eval_obj = self.pool.get('hr_evaluation.evaluation')
for id in self.browse(cr, uid, ids, context=context):
flag = False
wating_id = 0
if not id.evaluation_id.id:
- raise osv.except_osv(_('Warning!'),_("You cannot start evaluation without Appraisal."))
- records = hr_eval_obj.browse(cr, uid, [id.evaluation_id.id], context=context)[0].survey_request_ids
+ raise osv.except_osv(_('Warning!'), _("You cannot start evaluation without Appraisal."))
+ records = id.evaluation_id.survey_request_ids
for child in records:
if child.state == "draft":
wating_id = child.id
@@ -327,35 +346,29 @@ class hr_evaluation_interview(osv.osv):
flag = True
if not flag and wating_id:
self.survey_req_waiting_answer(cr, uid, [wating_id], context=context)
- self.write(cr, uid, ids, { 'state': 'done'}, context=context)
- return True
-
- def survey_req_draft(self, cr, uid, ids, context=None):
- self.write(cr, uid, ids, { 'state': 'draft'}, context=context)
+ self.write(cr, uid, ids, {'state': 'done'}, context=context)
return True
def survey_req_cancel(self, cr, uid, ids, context=None):
- self.write(cr, uid, ids, { 'state': 'cancel'}, context=context)
+ self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
return True
def action_print_survey(self, cr, uid, ids, context=None):
- """
- If response is available then print this response otherwise print survey form(print template of the survey).
-
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Survey IDs
- @param context: A standard dictionary for contextual values
- @return: Dictionary value for print survey form.
- """
- if context is None:
- context = {}
- record = self.browse(cr, uid, ids, context=context)
- record = record and record[0]
- context.update({'survey_id': record.survey_id.id, 'response_id': [record.response.id], 'response_no':0,})
- value = self.pool.get("survey").action_print_survey(cr, uid, ids, context=context)
- return value
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:1
+ """ If response is available then print this response otherwise print survey form (print template of the survey) """
+ context = context if context else {}
+ interview = self.browse(cr, uid, ids, context=context)[0]
+ survey_obj = self.pool.get('survey.survey')
+ response_obj = self.pool.get('survey.user_input')
+ response = response_obj.browse(cr, uid, interview.request_id.id, context=context)
+ context.update({'survey_token': response.token})
+ return survey_obj.action_print_survey(cr, uid, [interview.survey_id.id], context=context)
+
+ def action_start_survey(self, cr, uid, ids, context=None):
+ context = context if context else {}
+ interview = self.browse(cr, uid, ids, context=context)[0]
+ survey_obj = self.pool.get('survey.survey')
+ response_obj = self.pool.get('survey.user_input')
+ # grab the token of the response and start surveying
+ response = response_obj.browse(cr, uid, interview.request_id.id, context=context)
+ context.update({'survey_token': response.token})
+ return survey_obj.action_start_survey(cr, uid, [interview.survey_id.id], context=context)
diff --git a/addons/hr_evaluation/hr_evaluation_data.xml b/addons/hr_evaluation/hr_evaluation_data.xml
index 2afb5200091..38171b0f733 100644
--- a/addons/hr_evaluation/hr_evaluation_data.xml
+++ b/addons/hr_evaluation/hr_evaluation_data.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- After installation of the module, open the related menu -->
@@ -16,1146 +16,7 @@
<field name="body"><![CDATA[<p>Manage employee reviews: you can define an appraisal campaign with several steps, with specific evaluation surveys according to hierarchy levels. Evaluations filled by employees may be exported as pdf files.</p>]]></field>
</record>
- <record id="survey_2" model="survey">
- <field name="title">Self Appraisal</field>
- <field name="max_response_limit">20</field>
- <field eval="[(6,0,[])]" name="users"/>
- <field name="type" ref="survey.survey_type1"/>
- <field name="responsible_id" ref="base.user_root"/>
- <field name="response_user">5</field>
- <field name="state">open</field>
- </record>
- <record id="survey_page_1" model="survey.page">
- <field name="title">Employee Appraisal Form</field>
- <field name="survey_id" ref="survey_2"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_page_5" model="survey.page">
- <field name="title">Work Plan</field>
- <field name="survey_id" ref="survey_2"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_page_6" model="survey.page">
- <field name="title">Employee Performance In Key Areas</field>
- <field name="survey_id" ref="survey_2"/>
- <field eval="3" name="sequence"/>
- <field name="note">The appraiser should rate the employee’s major work accomplishments and performance according to the metric provided below :
- 1 - Significantly exceeds standards and expectations required of the position
- 2 - Exceeds standards and expectations
- 3 - Meet standards and expectations
- 4 - Did not meet standards and expectations
- 5 - Significantly below standards and expectations </field>
- </record>
- <record id="survey_page_16" model="survey.page">
- <field name="title">Professional Development And Performance Plan (optional)</field>
- <field name="survey_id" ref="survey_2"/>
- <field eval="4" name="sequence"/>
- <field name="note">Identify professional, performance, or project objectives you recommend for employee’s continued career development over the coming year. </field>
- </record>
- <record id="survey_page_26" model="survey.page">
- <field name="title">Employee Comments</field>
- <field name="survey_id" ref="survey_2"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_question_2" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Employee Information</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">multiple_textboxes_diff_type</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_1"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_39" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Overall Purpose Of Employee Appraisal</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">descriptive_text</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field name="descriptive_text">* To initiate a clear and open communication of performance expectations
-
-* To assist employees in their professional growth, through the identification of strengths and opportunities for development</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="hr_evaluation.survey_page_1"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_42" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="3" name="sequence"/>
- <field name="question">At the outset of the appraisal time period</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">descriptive_text</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field name="descriptive_text">* It is the joint responsibility of the employee and the supervisor (appraiser) to establish a feasible work plan for the coming year, including major employee responsibilities and corresponding benchmarks against which results will be evaluated.
-* Critical or key elements of performance and professional development needs (if any), should also be noted at this time</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="hr_evaluation.survey_page_1"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_43" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="4" name="sequence"/>
- <field name="question">At the conclusion of the appraisal time period</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">descriptive_text</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field name="descriptive_text">* The employee will be responsible for completing a draft of the Appraisal Form as a tool for self-appraisal and a starting point for the supervisor’s evaluation. The employee can add examples of achievements for each criterion.
-Once the form had been filled, the employee send it to his supervisor.
-
-* It is the primary responsibility of the supervisor to gather the necessary input from the appropriate sources of feedback (internal and/or external customers, peers). In case of collaboration with OpenERP SA Belgium, the supervisor must receive completed evaluation form from the employee's Belgian project manager.
-
-* The supervisor synthesizes and integrates all input into the completed appraisal. He motivates his evaluation in the ad hoc fields.
-
-* The employee may choose to offer comments or explanation regarding the completed review.
-
-* The supervisor send the form to the HR department in India and in Belgium. </field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="hr_evaluation.survey_page_1"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_9" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Work Plan</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">table</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_5"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- <field eval="10" name="no_of_rows"/>
- </record>
- <record id="survey_question_17" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Additional comments : </field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_5"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_4" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="1" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Subject</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="column_name">Recommendations / Appraisals</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_6"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_8" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="1" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Supervisors only : </field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="column_name">Recommendations / Appraisals</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_6"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_23" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="3" name="sequence"/>
- <field name="question">Overall Performance Summary Rating</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">descriptive_text</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field name="descriptive_text">including the project evaluation form (if any)</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="hr_evaluation.survey_page_6"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_17_1" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Professional Development Objectives </field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_16"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_17_2" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Personal Performance Objectives</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_16"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_17_3" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="4" name="sequence"/>
- <field name="question">Project Objectives</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_16"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_17_2_12" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="5" name="sequence"/>
- <field name="question">Use the following space to make any comments regarding the above performance evaluation.</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_26"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_answer_1" model="survey.answer">
- <field name="answer">Name</field>
- <field name="question_id" ref="survey_question_2"/>
- <field name="type">char</field>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_10" model="survey.answer">
- <field name="answer">Position Title</field>
- <field name="question_id" ref="survey_question_2"/>
- <field name="type">char</field>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_20" model="survey.answer">
- <field name="answer">Appraisal for Period</field>
- <field name="question_id" ref="survey_question_2"/>
- <field name="type">char</field>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_25" model="survey.answer">
- <field name="answer">Date of Review</field>
- <field name="question_id" ref="survey_question_2"/>
- <field name="type">datetime</field>
- <field eval="4" name="sequence"/>
- </record>
- <record id="survey_answer_43" model="survey.answer">
- <field name="answer">Appraiser</field>
- <field name="question_id" ref="survey_question_2"/>
- <field name="type">char</field>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_question_column_heading_4" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_4"/>
- </record>
- <record id="survey_question_column_heading_5" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_4"/>
- </record>
- <record id="survey_question_column_heading_6" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_4"/>
- </record>
- <record id="survey_question_column_heading_7" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_4"/>
- </record>
- <record id="survey_question_column_heading_8" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_4"/>
- </record>
- <record id="survey_answer_44" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Ability to cope with multidisciplinary of team</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_45" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Enthusiasm &amp; implication toward projects/assignments</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_46" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Compliance to internal rules and processes (timesheets completion, etc.)</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_47" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Team spirit : ability to work efficiently with peers, manage the conflicts with diplomacy</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_67" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Initiative and self autonomy</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_68" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Ability to follow and complete work as instructed</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_69" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Decision making</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_72" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Customer commitment</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_73" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Communication skills ( written &amp; verbally): clearness, concision, exactitude </field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_74" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Technical skills regarding to the job requirements</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_75" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Analytical and synthetic mind</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_76" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Promptness and attendance record</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_77" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Adaptability : Ability to adapt oneself to organizational changes while keeping efficiency</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_78" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Creativity and forward looking aptitude</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_26" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Time management : projects/tasks are completed on time</field>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_question_column_heading_9" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_8"/>
- </record>
- <record id="survey_question_column_heading_10" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_8"/>
- </record>
- <record id="survey_question_column_heading_11" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_8"/>
- </record>
- <record id="survey_question_column_heading_12" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_8"/>
- </record>
- <record id="survey_question_column_heading_13" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_8"/>
- </record>
- <record id="survey_answer_27" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Results of the bottom-up survey and mitigation actions to face technical, organizational, structural and/or relational issues</field>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_31" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Delegation : Ability to efficiently assign tasks to other people</field>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_48" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Leadership: create a challenging and motivating work environment aligned with the company's strategy</field>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_49" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Leadership: sustain subordinates in their professional growth</field>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_50" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Ability to manage planning resources, risks, budgets and deadlines</field>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_tbl_column_heading_objectives0" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">Objectives</field>
- <field name="question_id" ref="survey_question_9"/>
- </record>
- <record id="survey_tbl_column_heading_results0" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">Results</field>
- <field name="question_id" ref="survey_question_9"/>
- </record>
- <record id="survey_tbl_column_heading_comments0" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">Comments</field>
- <field name="question_id" ref="survey_question_9"/>
- </record>
- <record id="survey_answer_70" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">At the conclusion of the appraisal time period:</field>
- <field name="question_id" ref="survey_question_42"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_71" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">At the outset of the appraisal time period:</field>
- <field name="question_id" ref="survey_question_42"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_3" model="survey">
- <field name="title">Employee Opinion</field>
- <field name="max_response_limit">20</field>
- <field eval="[(6,0,[])]" name="users"/>
- <field name="type" ref="survey.survey_type1"/>
- <field name="responsible_id" ref="base.user_root"/>
- <field name="response_user">5</field>
- </record>
- <record id="survey_page_2" model="survey.page">
- <field name="title">Process</field>
- <field name="survey_id" ref="survey_3"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_page_10" model="survey.page">
- <field name="title">Survey</field>
- <field name="survey_id" ref="survey_3"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_question_0" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Employee Details</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">multiple_textboxes_diff_type</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_2"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_3" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Engagement</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_10"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_6" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Leadership</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_10"/>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_10" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="3" name="sequence"/>
- <field name="question">Effectiveness</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_10"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_14" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="4" name="sequence"/>
- <field name="question">Continuous Improvement</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_10"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_18" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="5" name="sequence"/>
- <field name="question">Openness</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_10"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_40" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="6" name="sequence"/>
- <field name="question">Miscellaneous</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_10"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_41" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="7" name="sequence"/>
- <field name="question">Additional comments :</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_10"/>
- <field name="comment_label">Other</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_21" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">At the supervisor's appraisal date </field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">descriptive_text</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field name="descriptive_text">* His direct reports will be invited through OpenERP to express a feedback on their supervisor's leadership and to give their opinion about their own engagement and effectiveness, the continuous improvement and openness in action in the company, ...
-
-* The employees will send back their anonymous answers to OpenERP. The data will be handled by the HR manager and a brief summary of the data will be sent to the concerned supervisor, to his team and to the supervisor's supervisor.
-* The appraiser should rate the employee’s major work accomplishments and performance according to the metric provided below :
-
- 1 - Significantly exceeds standards and expectations required of the position
- 2 - Exceeds standards and expectations
- 3 - Meet standards and expectations
- 4 - Did not meet standards and expectations
- 5 - Significantly below standards and expectations</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_2"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_column_heading_14" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_3"/>
- </record>
- <record id="survey_question_column_heading_15" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_3"/>
- </record>
- <record id="survey_question_column_heading_16" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_3"/>
- </record>
- <record id="survey_question_column_heading_17" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_3"/>
- </record>
- <record id="survey_question_column_heading_18" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_3"/>
- </record>
- <record id="survey_question_column_heading_19" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_6"/>
- </record>
- <record id="survey_question_column_heading_20" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_6"/>
- </record>
- <record id="survey_question_column_heading_21" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_6"/>
- </record>
- <record id="survey_question_column_heading_22" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_6"/>
- </record>
- <record id="survey_question_column_heading_23" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_6"/>
- </record>
- <record id="survey_question_column_heading_24" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_10"/>
- </record>
- <record id="survey_question_column_heading_25" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_10"/>
- </record>
- <record id="survey_question_column_heading_26" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_10"/>
- </record>
- <record id="survey_question_column_heading_27" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_10"/>
- </record>
- <record id="survey_question_column_heading_28" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_10"/>
- </record>
- <record id="survey_question_column_heading_29" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_14"/>
- </record>
- <record id="survey_question_column_heading_30" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_14"/>
- </record>
- <record id="survey_question_column_heading_31" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_14"/>
- </record>
- <record id="survey_question_column_heading_32" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_14"/>
- </record>
- <record id="survey_question_column_heading_33" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_14"/>
- </record>
- <record id="survey_question_column_heading_34" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_18"/>
- </record>
- <record id="survey_question_column_heading_35" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_18"/>
- </record>
- <record id="survey_question_column_heading_36" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_18"/>
- </record>
- <record id="survey_question_column_heading_37" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_18"/>
- </record>
- <record id="survey_question_column_heading_38" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_18"/>
- </record>
- <record id="survey_question_column_heading_39" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">1</field>
- <field name="question_id" ref="survey_question_40"/>
- </record>
- <record id="survey_question_column_heading_40" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">2</field>
- <field name="question_id" ref="survey_question_40"/>
- </record>
- <record id="survey_question_column_heading_41" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">3</field>
- <field name="question_id" ref="survey_question_40"/>
- </record>
- <record id="survey_question_column_heading_42" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">4</field>
- <field name="question_id" ref="survey_question_40"/>
- </record>
- <record id="survey_question_column_heading_43" model="survey.question.column.heading">
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field name="title">5</field>
- <field name="question_id" ref="survey_question_40"/>
- </record>
- <record id="survey_answer_0" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Demonstrates genuine concern for me as a person. </field>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_2" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I'm efficient at work and my achievements are successful.</field>
- <field name="question_id" ref="survey_question_10"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_3" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I am proud to tell others I work here. </field>
- <field name="question_id" ref="survey_question_3"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_4" model="survey.answer">
- <field name="in_visible_answer_type">0</field>
- <field name="answer">Name of your direct supervisor</field>
- <field name="question_id" ref="survey_question_0"/>
- <field name="type">char</field>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_5" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Actions by Executive management show genuine interest in the well-being of employees.</field>
- <field name="question_id" ref="survey_question_40"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_6" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I know the company's values and live them.</field>
- <field name="question_id" ref="survey_question_18"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_7" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">My work contributes towards the continuous improvement of the company, our services or products. </field>
- <field name="question_id" ref="survey_question_14"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_8" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I have enough work.</field>
- <field name="question_id" ref="survey_question_10"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_9" model="survey.answer">
- <field name="in_visible_answer_type">0</field>
- <field name="answer">Date</field>
- <field name="question_id" ref="survey_question_0"/>
- <field name="type">datetime</field>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_11" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I consistently acquire new knowledge, skills or understanding through contact with my supervisor. He helps me growing my compete</field>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_12" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">My job provides me with a sense of personal accomplishment.</field>
- <field name="question_id" ref="survey_question_3"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_13" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">What I did several months ago is still of use to the company, the services or the products today. </field>
- <field name="question_id" ref="survey_question_14"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_14" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">My best achievements have been communicated to the community, internally or to customers. </field>
- <field name="question_id" ref="survey_question_18"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_15" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I have the same opportunity to succeed as others with similar experiences, performance and educational background. </field>
- <field name="question_id" ref="survey_question_40"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_16" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Compared to similar jobs in other companies where I could work, my total compensation is:
-(Scale: Well below others, Below othe</field>
- <field name="question_id" ref="survey_question_40"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_17" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Overall, I believe the quality of products and/or services my workgroup delivers is improving.</field>
- <field name="question_id" ref="survey_question_14"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_18" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I would prefer to remain with this company even if a comparable job were available in another company. </field>
- <field name="question_id" ref="survey_question_3"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_19" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Listens and takes into account all ideas and do his best to put in place the best of these. </field>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_21" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I mostly work on value-added tasks for the company, the products or the services. (Value-added task : significant improvement pe</field>
- <field name="question_id" ref="survey_question_10"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_22" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Our workgroup identifies and reduces waste of time in our activities and processes. </field>
- <field name="question_id" ref="survey_question_14"/>
- <field eval="4" name="sequence"/>
- </record>
- <record id="survey_answer_23" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Taking everything into account, how satisfied are you with your current job? </field>
- <field name="question_id" ref="survey_question_3"/>
- <field eval="4" name="sequence"/>
- </record>
- <record id="survey_answer_24" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I understand the company strategy and how my workgroup supports it. </field>
- <field name="question_id" ref="survey_question_40"/>
- <field eval="4" name="sequence"/>
- </record>
- <record id="survey_answer_51" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I am willing to put in a great deal of effort beyond what is expected to help my workgroup succeed.</field>
- <field name="question_id" ref="survey_question_3"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_52" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I believe the information that I get from the person I report to. </field>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="5" name="sequence"/>
- </record>
- </data>
-
- <data noupdate="1">
<record id="hr_evaluation_plan_managersevaluationplan0" model="hr_evaluation.plan">
<field eval="1" name="active"/>
<field eval="6" name="month_next"/>
@@ -1163,9 +24,8 @@ Once the form had been filled, the employee send it to his supervisor.
<field eval="3" name="month_first"/>
<field name="company_id" ref="base.main_company"/>
</record>
- </data>
- <data noupdate="1">
+
<record id="hr_evaluation_plan_phase_sendtoemployee0" model="hr_evaluation.plan.phase">
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
<field name="name">Send to Employee</field>
@@ -1175,19 +35,17 @@ Once the form had been filled, the employee send it to his supervisor.
<field name="action">self</field>
<field eval="0" name="send_anonymous_employee"/>
<field eval="0" name="send_answer_employee"/>
- <field name="survey_id" ref="hr_evaluation.survey_2"/>
+ <field name="survey_id" ref="appraisal_form"/>
<field eval="0" name="send_answer_manager"/>
<field eval="0" name="wait"/>
</record>
- </data>
- <data noupdate="1">
+
<record id="hr.employee" model="hr.employee">
<field name="evaluation_plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
</record>
- </data>
- <data>
+
<record forcecreate="True" id="ir_cron_scheduler_evaluation" model="ir.cron">
<field name="name">Run Employee Appraisal</field>
<field eval="True" name="active" />
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index 28bc4a6c96e..8f3998eeb42 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -21,24 +21,26 @@
<field name="model">hr_evaluation.plan</field>
<field name="arch" type="xml">
<form string="Appraisal Plan" version="7.0">
- <group col="4">
- <group>
- <field name="name"/>
- <field name="company_id" widget="selection" groups="base.group_multi_company"/>
- <field name="active"/>
- </group>
- <group>
- <field name="month_first"/>
- <field name="month_next"/>
+ <sheet>
+ <group col="4">
+ <group>
+ <field name="name"/>
+ <field name="company_id" widget="selection" groups="base.group_multi_company"/>
+ <field name="active"/>
+ </group>
+ <group>
+ <field name="month_first"/>
+ <field name="month_next"/>
+ </group>
</group>
- </group>
- <notebook>
- <page string="Appraisal Phases">
+ <notebook>
+ <page string="Appraisal Phases">
<field name="phase_ids"/>
- </page>
- </notebook>
+ </page>
+ </notebook>
+ </sheet>
</form>
- </field>
+ </field>
</record>
<record model="ir.ui.view" id="view_hr_evaluation_plan_tree">
<field name="name">hr_evaluation.plan.form</field>
@@ -58,9 +60,9 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
-
+
<!-- Appraisal Interviews Action -->
-
+
<record id="act_hr_employee_2_hr__evaluation_interview" model="ir.actions.act_window">
<field name="res_model">hr.evaluation.interview</field>
<field name="view_type">form</field>
@@ -127,7 +129,7 @@
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="action"/>
- <field name="survey_id"/>
+ <field name="survey_id" domain="[('res_model','=','hr_evaluation')]"/>
<field name="wait"/>
</tree>
</field>
@@ -165,11 +167,9 @@
</header>
<sheet>
<label for="employee_id" class="oe_edit_only"/>
- <h1><field name="employee_id" class="oe_inline"
- attrs="{'readonly': [('state', '=', 'done')]}"
- on_change="onchange_employee_id(employee_id)"/>,
- <field name="date"
- attrs="{'readonly': [('state', '=', 'done')]}"/>
+ <h1>
+ <field name="employee_id" class="oe_inline" attrs="{'readonly': [('state', '=', 'done')]}" on_change="onchange_employee_id(employee_id)"/>
+ <field name="date" attrs="{'readonly': [('state', '=', 'done')]}"/>
</h1>
<label for="plan_id" class="oe_edit_only"/>
<h2><field name="plan_id" attrs="{'readonly': [('state', '=', 'done')]}"/></h2>
@@ -180,31 +180,7 @@
</group>
</group>
<group string="Appraisal Forms" attrs="{'invisible':[('state','=','draft')]}">
- <field nolabel="1" name="survey_request_ids" attrs="{'readonly': [('state', '=', 'done')]}">
- <form string="Interview Appraisal" version="7.0">
- <div class="oe_right oe_button_box">
- <button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
- <button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
- </div>
- <group>
- <group>
- <field name="survey_id"/>
- <field name="user_to_review_id"/>
- <field name="user_id" string="Interviewer" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_manager']}"/>
- </group>
- <group>
- <field name="date_deadline"/>
- <field name="response" readonly="1"/>
- </group>
- </group>
- <group col="4" string="Status" invisible="1">
- <field name="state"/>
- <div>
- <button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" />
- </div>
- </group>
- </form>
- </field>
+ <field nolabel="1" name="survey_request_ids" attrs="{'readonly': [('state', '=', 'done')]}" />
</group>
<group string="Internal Notes" attrs="{'invisible':[('state','=','draft')]}">
<field nolabel="1" name="note_action"
@@ -230,7 +206,6 @@
<field name="employee_id"/>
<field name="plan_id"/>
<field name="date"/>
- <!--field name="progress" widget="progressbar"/-->
<field name="rating"/>
<field name="state"/>
</tree>
@@ -289,15 +264,10 @@
<header>
<button string="Cancel Survey" name="survey_req_cancel" type="object"
states="draft,waiting_answer" class="oe_left"/>
- <button string="Print Survey" name="action_print_survey" type="object"
- states="draft" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}"
- attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
+ <button string="Print Survey" name="action_print_survey" type="object" states='waiting_answer,done' attrs="{'readonly':[('survey_id','=',False)]}"/>
<button string="Send Request" name="survey_req_waiting_answer" type="object"
states="draft" class="oe_highlight"/>
- <button string="Answer Survey" name="%(survey.action_view_survey_question_message)d" type="action"
- states="waiting_answer" class="oe_highlight"
- context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}"
- attrs="{'readonly':[('survey_id','=',False)]}"/>
+ <button string="Answer Survey" class="oe_highlight" name="action_start_survey" type="object" states='waiting_answer' attrs="{'readonly':[('request_id','=',False)]}"/>
<button string="Done" name="survey_req_done" type="object"
states="waiting_answer"/>
<field name="state" widget="statusbar" statusbar_visible="waiting_answer,done"/>
@@ -306,19 +276,22 @@
<div class="oe_right oe_button_box" name="button_box">
<button string="Send Reminder Email" name="%(mail.action_email_compose_message_wizard)d" type="action"
states="waiting_answer"
- context="{'default_body_text': 'Hello,\n\nKindly post your response for the survey interview.\n\nThanks',
+ context="{'default_body': 'Hello,\n\nKindly post your response for the survey interview.\n\nThanks',
'default_subject': 'Reminder to fill up Survey' }"/>
</div>
<group>
<group>
- <field name="survey_id"/>
- <field name="user_to_review_id"/>
+ <field name="evaluation_id" string="Appraisal"/>
+ <field name="phase_id"/>
+ <field name="user_to_review_id" readonly="1"/>
+ </group>
+ <group>
<field name="user_id" string="Interviewer" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_manager']}"/>
+ <field name="deadline"/>
</group>
<group>
- <field name="date_deadline"/>
- <field name="response" readonly="1"/>
- <field name="evaluation_id" string="Appraisal Plan"/>
+ <field name="request_id"/>
+ <field name="survey_id" domain="[('res_model','=','hr_evaluation')]" readonly="1"/>
</group>
</group>
</sheet>
@@ -326,18 +299,18 @@
</field>
</record>
- <record model="ir.ui.view" id="view_hr_evaluation_interview_tree">
+ <record model="ir.ui.view" id="view_hr_evaluation_interview_tree">
<field name="name">hr_evaluation.interview.tree</field>
<field name="model">hr.evaluation.interview</field>
<field name="arch" type="xml">
<tree string="Interview Appraisal">
- <field name="date_deadline" string="Deadline Date"/>
- <field name="survey_id"/>
+ <field name="deadline" string="Deadline Date"/>
+ <field name="survey_id" domain="[('res_model','=','hr_evaluation')]"/>
<field name="user_id" string="Interviewer"/>
<field name="user_to_review_id"/>
- <field name="response" readonly="1" invisible="True"/>
- <button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
- <button name="action_print_survey" string="Print Survey" type="object" icon="gtk-print" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}" attrs="{'readonly':[('survey_id','=',False)]}"/>
+ <field name="request_id" readonly="1" invisible="True"/>
+ <button name="action_start_survey" string="Answer Survey" type="object" icon="gtk-execute" attrs="{'readonly':[('request_id','=',False)]}"/>
+ <button name="action_print_survey" string="Print Survey" type="object" icon="gtk-print" attrs="{'readonly':[('survey_id','=',False)]}"/>
<button name="%(mail.action_email_compose_message_wizard)d" string="Send Reminder Email" icon="terp-mail-message-new" type="action" states="waiting_answer"/>
<field name="state"/>
<button string="Send Request" name="survey_req_waiting_answer" states="draft" type="object" icon="gtk-yes" />
@@ -351,7 +324,7 @@
<field name="model">hr.evaluation.interview</field>
<field name="arch" type="xml">
<search string="Search Appraisal">
- <field name="date_deadline"/>
+ <field name="deadline"/>
<filter icon="terp-gtk-go-back-rtl" string="To Do" name="todo" domain="[('state','=','waiting_answer')]"/>
<field name="user_to_review_id"/>
<field name="user_id" string="Interviewer"/>
@@ -368,7 +341,7 @@
<field name="name">Interview Requests</field>
<field name="model">hr.evaluation.interview</field>
<field name="arch" type="xml">
- <calendar string="Interview Request" color="user_to_review_id" date_start="date_deadline">
+ <calendar string="Interview Request" color="user_to_review_id" date_start="deadline">
<field name="request_id"/>
</calendar>
</field>
@@ -379,12 +352,11 @@
<field name="res_model">hr.evaluation.interview</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
- <field name="domain">[('is_evaluation' ,'=', True)]</field>
- <field name="context">{'default_is_evaluation': True, "search_default_todo":1,"search_default_user_id":uid}</field>
+ <field name="context">{"search_default_todo":1,"search_default_user_id":uid}</field>
<field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
- Click to create a new interview request related to a personal evaluation.
+ Click to create a new interview request related to a personal evaluation.
</p><p>
Interview requests are usually generated automatically by
OpenERP according to an employee's appraisal plan. Each user
@@ -425,7 +397,7 @@
target="new" multi="True"
key2="client_action_multi"
context="{'default_composition_mode': 'mass_mail',
- 'default_body_text': 'Hello,\n\nKindly post your response for the survey interview.\n\nThanks',
+ 'default_body': 'Hello,\n\nKindly post your response for the survey interview.\n\nThanks',
'default_subject': 'Reminder to fill up Survey'}"/>
</data>
diff --git a/addons/hr_evaluation/report/hr_evaluation_report.py b/addons/hr_evaluation/report/hr_evaluation_report.py
index 36353b65dfb..ce6f381fb60 100644
--- a/addons/hr_evaluation/report/hr_evaluation_report.py
+++ b/addons/hr_evaluation/report/hr_evaluation_report.py
@@ -22,41 +22,43 @@
from openerp import tools
from openerp.osv import fields, osv
-class hr_evaluation_report(osv.osv):
+
+class hr_evaluation_report(osv.Model):
_name = "hr.evaluation.report"
_description = "Evaluations Statistics"
_auto = False
_columns = {
'create_date': fields.date('Create Date', readonly=True),
- 'delay_date':fields.float('Delay to Start', digits=(16,2),readonly=True),
- 'overpass_delay':fields.float('Overpassed Deadline', digits=(16,2), readonly=True),
+ 'delay_date': fields.float('Delay to Start', digits=(16, 2), readonly=True),
+ 'overpass_delay': fields.float('Overpassed Deadline', digits=(16, 2), readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'deadline': fields.date("Deadline", readonly=True),
- 'request_id': fields.many2one('survey.request', 'Request_id', readonly=True),
+ 'request_id': fields.many2one('survey.user_input', 'Request_id', readonly=True),
'closed': fields.date("closed", readonly=True),
'year': fields.char('Year', size=4, readonly=True),
- 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
- ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
- ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
+ 'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'),
+ ('05', 'May'), ('06', 'June'), ('07', 'July'), ('08', 'August'), ('09', 'September'),
+ ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', readonly=True),
'employee_id': fields.many2one('hr.employee', "Employee", readonly=True),
'rating': fields.selection([
- ('0','Significantly bellow expectations'),
- ('1','Did not meet expectations'),
- ('2','Meet expectations'),
- ('3','Exceeds expectations'),
- ('4','Significantly exceeds expectations'),
+ ('0', 'Significantly bellow expectations'),
+ ('1', 'Did not meet expectations'),
+ ('2', 'Meet expectations'),
+ ('3', 'Exceeds expectations'),
+ ('4', 'Significantly exceeds expectations'),
], "Overall Rating", readonly=True),
- 'nbr':fields.integer('# of Requests', readonly=True),
+ 'nbr': fields.integer('# of Requests', readonly=True),
'state': fields.selection([
- ('draft','Draft'),
- ('wait','Plan In Progress'),
- ('progress','Final Validation'),
- ('done','Done'),
- ('cancel','Cancelled'),
- ], 'Status',readonly=True),
+ ('draft', 'Draft'),
+ ('wait', 'Plan In Progress'),
+ ('progress', 'Final Validation'),
+ ('done', 'Done'),
+ ('cancel', 'Cancelled'),
+ ], 'Status', readonly=True),
}
_order = 'create_date desc'
+
def init(self, cr):
tools.drop_view_if_exists(cr, 'hr_evaluation_report')
cr.execute("""
diff --git a/addons/hr_evaluation/security/ir.model.access.csv b/addons/hr_evaluation/security/ir.model.access.csv
index 1f22e3b5d16..3fb1425651c 100644
--- a/addons/hr_evaluation/security/ir.model.access.csv
+++ b/addons/hr_evaluation/security/ir.model.access.csv
@@ -6,37 +6,20 @@ access_hr_evaluation_plan_phase_user,hr_evaluation.plan.phase.user,model_hr_eval
access_hr_evaluation_interview_user,hr.evaluation.interview.user,model_hr_evaluation_interview,base.group_hr_user,1,1,1,1
access_hr_evaluation_interview_employee,hr.evaluation.interview.employee,model_hr_evaluation_interview,base.group_user,1,1,1,0
access_hr_evaluation_report,hr.evaluation.report,model_hr_evaluation_report,base.group_hr_manager,1,1,1,1
-access_survey_type_hr_manager,survey.type,survey.model_survey_type,base.group_hr_manager,1,1,1,1
-access_survey_hr_manager,survey.hr.manager,survey.model_survey,base.group_hr_manager,1,1,1,1
-access_survey_history_manager,survey.history,survey.model_survey_history,base.group_hr_manager,1,1,1,1
+access_survey_hr_manager,survey.hr.manager,survey.model_survey_survey,base.group_hr_manager,1,1,1,1
access_survey_question_hr_manager,survey.question,survey.model_survey_question,base.group_hr_manager,1,1,1,1
-access_survey_question_column_heading_hr_manager,survey.question.column.heading,survey.model_survey_question_column_heading,base.group_hr_manager,1,1,1,1
-access_survey_answer_hr_manager,survey.answer,survey.model_survey_answer,base.group_hr_manager,1,1,1,1
-access_survey_response_hr_manager,survey.response,survey.model_survey_response,base.group_hr_manager,1,1,1,1
-access_survey_response_line_hr_manager,survey.response.line,survey.model_survey_response_line,base.group_hr_manager,1,1,1,1
-access_survey_tbl_column_heading_hr_manager,survey.tbl.column.heading,survey.model_survey_tbl_column_heading,base.group_hr_manager,1,1,1,1
-access_survey_response_answer_hr_manager,survey.response.answer,survey.model_survey_response_answer,base.group_hr_manager,1,1,1,1
-access_survey_request_hr_manager,survey.request,survey.model_survey_request,base.group_hr_manager,1,1,1,1
-access_survey_answer_hr_user,survey.answer.hr.user,survey.model_survey_answer,base.group_hr_user,1,1,1,0
-access_survey_response_answer_hr_user,survey.response.answer.hr.user,survey.model_survey_response_answer,base.group_hr_user,1,1,1,0
-access_survey_type_hr_user,survey.type.hr.user,survey.model_survey_type,base.group_hr_user,1,1,1,0
+access_survey_question_column_heading_hr_manager,survey.question.column.heading,survey.model_survey_label,base.group_hr_manager,1,1,1,1
+access_survey_response_hr_manager,survey.response,survey.model_survey_user_input,base.group_hr_manager,1,1,1,1
+access_survey_response_line_hr_manager,survey.response.line,survey.model_survey_user_input_line,base.group_hr_manager,1,1,1,1
access_survey_question_hr_user,survey.question.hr.user,survey.model_survey_question,base.group_hr_user,1,1,1,0
access_survey_page_hr_user,survey.page.hr.user,survey.model_survey_page,base.group_hr_user,1,1,1,1
-access_survey_response_hr_user,survey.response.hr.user,survey.model_survey_response,base.group_hr_user,1,1,1,0
-access_survey_history_hr_user,survey.history.hr.user,survey.model_survey_history,base.group_hr_user,1,1,1,0
-access_survey_request_hr_user,survey.request.hr.user,survey.model_survey_request,base.group_hr_user,1,1,1,0
-access_survey_question_column_heading_hr_user,survey.question.column.heading.hr.user,survey.model_survey_question_column_heading,base.group_hr_user,1,1,1,0
-access_survey_response_line_hr_user,survey.response.line.hr.user,survey.model_survey_response_line,base.group_hr_user,1,1,1,0
-access_survey_tbl_column_heading_hr_user,survey.tbl.column.heading.hr.user,survey.model_survey_tbl_column_heading,base.group_hr_user,1,1,1,0
+access_survey_response_hr_user,survey.response.hr.user,survey.model_survey_user_input,base.group_hr_user,1,1,1,0
+access_survey_question_column_heading_hr_user,survey.question.column.heading.hr.user,survey.model_survey_label,base.group_hr_user,1,1,1,0
+access_survey_response_line_hr_user,survey.response.line.hr.user,survey.model_survey_user_input_line,base.group_hr_user,1,1,1,0
access_calendar_attendee_survey_user,base.calendar.calendar.attendee.survey.user,calendar.model_calendar_attendee,base.group_survey_user,1,1,1,0
-access_calendar_attendee_tool_user,base.calendar.calendar.attendee.tool.user,calendar.model_calendar_attendee,base.group_tool_user,1,1,1,0
-access_survey_request_hr_employee,survey.request.hr.employee,survey.model_survey_request,base.group_user,1,1,1,0
-access_survey_hr_employee,survey.hr.employee,survey.model_survey,base.group_user,1,1,0,0
+access_survey_hr_employee,survey.hr.employee,survey.model_survey_survey,base.group_user,1,1,0,0
access_survey_page_hr_employee,survey.page.hr.employee,survey.model_survey_page,base.group_user,1,0,0,0
-access_survey_answer_hr_employee,survey.answer.employee,survey.model_survey_answer,base.group_user,1,0,0,0
access_survey_question_hr_employee,survey.question.employee,survey.model_survey_question,base.group_user,1,0,0,0
-access_survey_response_hr_employee,survey.response.employee,survey.model_survey_response,base.group_user,1,1,1,0
-access_survey_question_column_heading_hr_employee,survey.question.column.heading.employee,survey.model_survey_question_column_heading,base.group_user,1,0,0,0
-access_survey_response_line_hr_employee,survey.response.line.employee,survey.model_survey_response_line,base.group_user,1,1,1,0
-access_survey_response_answer_hr_employee,survey.response.answer.hr.employee,survey.model_survey_response_answer,base.group_user,1,1,1,0
-access_survey_tbl_column_heading_hr_employee,survey.tbl.column.heading,survey.model_survey_tbl_column_heading,base.group_user,1,1,1,0 \ No newline at end of file
+access_survey_response_hr_employee,survey.response.employee,survey.model_survey_user_input,base.group_user,1,1,1,0
+access_survey_question_column_heading_hr_employee,survey.question.column.heading.employee,survey.model_survey_label,base.group_user,1,0,0,0
+access_survey_response_line_hr_employee,survey.response.line.employee,survey.model_survey_user_input_line,base.group_user,1,1,1,0 \ No newline at end of file
diff --git a/addons/hr_evaluation/survey_data_appraisal.xml b/addons/hr_evaluation/survey_data_appraisal.xml
new file mode 100644
index 00000000000..d3f83f91ba5
--- /dev/null
+++ b/addons/hr_evaluation/survey_data_appraisal.xml
@@ -0,0 +1,676 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <!-- Appraisal form -->
+ <record model="survey.survey" id="appraisal_form">
+ <field name="title">Employee Appraisal Form</field>
+ <field name="stage_id" ref="survey.stage_permanent" />
+ <field name="res_model">hr_evaluation</field>
+ <field name="auth_required" eval="True" />
+ <field name="users_can_go_back" eval="True" />
+ <field name="description">&lt;p&gt; &lt;/p&gt;</field>
+ <field name="thank_you_message">&lt;p&gt; &lt;/p&gt;</field>
+ </record>
+ <!-- Page 1 -->
+ <record model="survey.page" id="appraisal_1">
+ <field name="title">Employee Appraisal Form</field>
+ <field name="survey_id" ref="appraisal_form" />
+ <field name="sequence">1</field>
+ <field name="description">&lt;h2&gt;Overall Purpose Of Employee Appraisal&lt;/h2&gt;
+&lt;ul&gt;&lt;li&gt;To initiate a clear and open communication of performance expectations
+&lt;li&gt;To assist employees in their professional growth, through the identification of strengths and opportunities for
+development&lt;/ul&gt;
+&lt;h2&gt;At the outset of the appraisal time period&lt;/h2&gt;
+&lt;ul&gt;&lt;li&gt;It is the joint responsibility of the employee and the supervisor (appraiser) to establish a feasible work plan for the
+coming year, including major employee responsibilities and corresponding benchmarks against which results will be
+evaluated.
+&lt;li&gt;Critical or key elements of performance and professional development needs (if any), should also be noted at this time&lt;/ul&gt;
+&lt;h2&gt;At the conclusion of the appraisal time period&lt;/h2&gt;
+&lt;ul&gt;&lt;li&gt;The employee will be responsible for completing a draft of the Appraisal Form as a tool for self-appraisal and a starting
+point for the supervisor’s evaluation. The employee can add examples of achievements for each criterion.
+Once the form had been filled, the employee send it to his supervisor.
+&lt;li&gt;It is the primary responsibility of the supervisor to gather the necessary input from the appropriate sources of feedback
+(internal and/or external customers, peers). In case of collaboration with OpenERP SA Belgium, the supervisor must
+receive completed evaluation form from the employee's Belgian project manager.
+&lt;li&gt;The supervisor synthesizes and integrates all input into the completed appraisal. He motivates his evaluation in the ad
+hoc fields.
+&lt;li&gt;The employee may choose to offer comments or explanation regarding the completed review.
+&lt;li&gt;The supervisor send the form to the HR department in India and in Belgium&lt;/ul&gt;</field>
+ </record>
+ <record model="survey.question" id="appraisal_1_1">
+ <field name="page_id" ref="appraisal_1" />
+ <field name="sequence">1</field>
+ <field name="question">Name</field>
+ <field name="type">textbox</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.question" id="appraisal_1_2">
+ <field name="page_id" ref="appraisal_1" />
+ <field name="sequence">2</field>
+ <field name="question">Position Title</field>
+ <field name="type">textbox</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.question" id="appraisal_1_3">
+ <field name="page_id" ref="appraisal_1" />
+ <field name="sequence">3</field>
+ <field name="question">Appraisal for Period</field>
+ <field name="type">textbox</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.question" id="appraisal_1_4">
+ <field name="page_id" ref="appraisal_1" />
+ <field name="sequence">4</field>
+ <field name="question">Date of review</field>
+ <field name="type">textbox</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.question" id="appraisal_1_5">
+ <field name="page_id" ref="appraisal_1" />
+ <field name="sequence">5</field>
+ <field name="question">Appraiser</field>
+ <field name="type">textbox</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <!-- Page 2 -->
+ <record model="survey.page" id="appraisal_2">
+ <field name="title">Work Plan</field>
+ <field name="survey_id" ref="appraisal_form" />
+ <field name="sequence">2</field>
+ <field name="description">&lt;p&gt; &lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="appraisal_2_1">
+ <field name="page_id" ref="appraisal_2" />
+ <field name="sequence">1</field>
+ <field name="question">Objectives</field>
+ <field name="type">free_text</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.question" id="appraisal_2_2">
+ <field name="page_id" ref="appraisal_2" />
+ <field name="sequence">2</field>
+ <field name="question">Results</field>
+ <field name="type">free_text</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.question" id="appraisal_2_3">
+ <field name="page_id" ref="appraisal_2" />
+ <field name="sequence">3</field>
+ <field name="question">Additional Comments</field>
+ <field name="type">free_text</field>
+ </record>
+ <!-- Page 3 -->
+ <record model="survey.page" id="appraisal_3">
+ <field name="title">Employee Performance in Key Areas</field>
+ <field name="survey_id" ref="appraisal_form" />
+ <field name="sequence">3</field>
+ <field name="description">The appraiser should rate the employee’s major work accomplishments and performance according to the metric provided
+below:&lt;ol&gt;
+&lt;li&gt; Significantly exceeds standards and expectations required of the position
+&lt;li&gt; Exceeds standards and expectations
+&lt;li&gt; Meet standards and expectations
+&lt;li&gt; Did not meet standards and expectations
+&lt;li&gt; Significantly below standards and expectations&lt;/ol&gt;</field>
+ </record>
+ <record model="survey.question" id="appraisal_3_1">
+ <field name="page_id" ref="appraisal_3" />
+ <field name="sequence">1</field>
+ <field name="question">Subject</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="acol_3_1_1">
+ <field name="question_id" ref="appraisal_3_1"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="acol_3_1_2">
+ <field name="question_id" ref="appraisal_3_1"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="acol_3_1_3">
+ <field name="question_id" ref="appraisal_3_1"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="acol_3_1_4">
+ <field name="question_id" ref="appraisal_3_1"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="acol_3_1_5">
+ <field name="question_id" ref="appraisal_3_1"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_1">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">1</field>
+ <field name="value">Ability to cope with multidisciplinarity of team</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_2">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">2</field>
+ <field name="value">Enthusiasm &amp; implication toward projects/assignments</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_3">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">3</field>
+ <field name="value">Compliance to internal rules and processes (timesheets completion, etc.)</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_4">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">4</field>
+ <field name="value">Team spirit: ability to work efficiently with peers, manage the conflicts with diplomacy</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_5">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">5</field>
+ <field name="value">Initiative and self autonomy</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_6">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">6</field>
+ <field name="value">Ability to follow and complete work as instructed</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_7">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">7</field>
+ <field name="value">Decision making</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_8">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">8</field>
+ <field name="value">Customer commitment</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_9">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">9</field>
+ <field name="value">Communication skills (written &amp; verbally): clearness, concision, exactitude</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_10">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">10</field>
+ <field name="value">Technical skills regarding to the job requirements</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_11">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">11</field>
+ <field name="value">Analytical and synthetic mind</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_12">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">12</field>
+ <field name="value">Promptness and attendance record</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_13">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">13</field>
+ <field name="value">Adaptability: Ability to adapt oneself to organizational changes while keeping efficiency</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_14">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">14</field>
+ <field name="value">Creativity and forward looking aptitude</field>
+ </record>
+ <record model="survey.label" id="arow_3_1_15">
+ <field name="question_id_2" ref="appraisal_3_1"/>
+ <field name="sequence">15</field>
+ <field name="value">Time management: projects/tasks are completed on time</field>
+ </record>
+ <record model="survey.question" id="appraisal_3_2">
+ <field name="page_id" ref="appraisal_3" />
+ <field name="sequence">2</field>
+ <field name="question">Supervisors only</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="acol_3_2_1">
+ <field name="question_id" ref="appraisal_3_2"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="acol_3_2_2">
+ <field name="question_id" ref="appraisal_3_2"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="acol_3_2_3">
+ <field name="question_id" ref="appraisal_3_2"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="acol_3_2_4">
+ <field name="question_id" ref="appraisal_3_2"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="acol_3_2_5">
+ <field name="question_id" ref="appraisal_3_2"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="arow_3_2_1">
+ <field name="question_id_2" ref="appraisal_3_2"/>
+ <field name="sequence">1</field>
+ <field name="value">Results of the bottom-up survey and mitigation actions to face technical, organizational, structural and/or relational issues</field>
+ </record>
+ <record model="survey.label" id="arow_3_2_2">
+ <field name="question_id_2" ref="appraisal_3_2"/>
+ <field name="sequence">2</field>
+ <field name="value">Delegation: Ability to efficiently assign tasks to other people</field>
+ </record>
+ <record model="survey.label" id="arow_3_2_3">
+ <field name="question_id_2" ref="appraisal_3_2"/>
+ <field name="sequence">3</field>
+ <field name="value">Leadership: create a challenging and motivating work environment aligned with the company's strategy</field>
+ </record>
+ <record model="survey.label" id="arow_3_2_4">
+ <field name="question_id_2" ref="appraisal_3_2"/>
+ <field name="sequence">4</field>
+ <field name="value">Leadership: sustain subordinates in their professional growth</field>
+ </record>
+ <record model="survey.label" id="arow_3_2_5">
+ <field name="question_id_2" ref="appraisal_3_2"/>
+ <field name="sequence">5</field>
+ <field name="value">Ability to manage planning resources, risks, budgets and deadlines</field>
+ </record>
+ <!-- Page 4 -->
+ <record model="survey.page" id="appraisal_4">
+ <field name="title">Professional Development and Performance Plan</field>
+ <field name="survey_id" ref="appraisal_form" />
+ <field name="sequence">4</field>
+ <field name="description">&lt;p&gt;Identify professional, performance, or project objectives you recommend for employee’s continued career development
+over the coming year.&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="appraisal_4_1">
+ <field name="page_id" ref="appraisal_4" />
+ <field name="sequence">1</field>
+ <field name="question">Professional Development Objectives</field>
+ <field name="type">free_text</field>
+ </record>
+ <record model="survey.question" id="appraisal_4_2">
+ <field name="page_id" ref="appraisal_4" />
+ <field name="sequence">2</field>
+ <field name="question">Personal Performance Objectives</field>
+ <field name="type">free_text</field>
+ </record>
+ <record model="survey.question" id="appraisal_4_3">
+ <field name="page_id" ref="appraisal_4" />
+ <field name="sequence">3</field>
+ <field name="question">Project Objectives</field>
+ <field name="type">free_text</field>
+ </record>
+ <!-- Page 5 -->
+ <record model="survey.page" id="appraisal_5">
+ <field name="title">Employee Comments</field>
+ <field name="survey_id" ref="appraisal_form" />
+ <field name="description">&lt;p&gt;&lt;/p&gt;</field>
+ <field name="sequence">5</field>
+ </record>
+ <record model="survey.question" id="appraisal_5_1">
+ <field name="page_id" ref="appraisal_5" />
+ <field name="sequence">1</field>
+ <field name="question">Use the following space to make any comments regarding the above performance evaluation.</field>
+ <field name="type">free_text</field>
+ </record>
+ <!-- Employee Opinion form -->
+ <record model="survey.survey" id="opinion_form">
+ <field name="title">Employee Opinion Form</field>
+ <field name="stage_id" ref="survey.stage_permanent" />
+ <field name="res_model">hr_evaluation</field>
+ <field name="auth_required" eval="True" />
+ <field name="users_can_go_back" eval="True" />
+ <field name="description">&lt;p&gt; &lt;/p&gt;</field>
+ <field name="thank_you_message">&lt;p&gt; &lt;/p&gt;</field>
+ </record>
+ <!-- Page 1 -->
+ <record model="survey.page" id="opinion_1">
+ <field name="title">Appraisal Process</field>
+ <field name="survey_id" ref="opinion_form" />
+ <field name="sequence">1</field>
+ <field name="description">&lt;h2&gt;At the supervisor's appraisal date&lt;/h2&gt;
+&lt;p&gt;His direct reports will be invited through OpenERP to express a feedback on their supervisor's leadership and to give their opinion about their own engagement and effectiveness, the continuous improvement and openness in action in thecompany...&lt;/p&gt;
+&lt;p&gt;The employees will send back their anonymous answers to OpenERP. The data will be handled by the HR manager and a brief summary of the data will be sent to the concerned supervisor, to his team and to the supervisor's supervisor.&lt;/p&gt;
+&lt;p&gt;The appraiser should rate the employee's major work accomplishments and performance according to the metric provided below
+&lt;ol&gt;
+&lt;li&gt;Significantly exceeds standards and expectations required of the position&lt;/li&gt;
+&lt;li&gt;Exceeds standards and expectations&lt;/li&gt;
+&lt;li&gt;Meet standards and expectations&lt;/li&gt;
+&lt;li&gt;Did not meet standards and expectations&lt;/li&gt;
+&lt;li&gt;Significantly below standards and expectations&lt;/li&gt;
+&lt;/ol&gt;&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="opinion_1_1">
+ <field name="page_id" ref="opinion_1" />
+ <field name="sequence">1</field>
+ <field name="question">Name of your direct supervisor</field>
+ <field name="type">textbox</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.question" id="opinion_1_2">
+ <field name="page_id" ref="opinion_1" />
+ <field name="sequence">2</field>
+ <field name="question">Date</field>
+ <field name="type">textbox</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <!-- Page 2 -->
+ <record model="survey.page" id="opinion_2">
+ <field name="title">Evaluation</field>
+ <field name="survey_id" ref="opinion_form" />
+ <field name="sequence">2</field>
+ <field name="description">&lt;p&gt; &lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="opinion_2_1">
+ <field name="page_id" ref="opinion_2" />
+ <field name="sequence">1</field>
+ <field name="question">Engagement</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="opcol_2_1_1">
+ <field name="question_id" ref="opinion_2_1"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="opcol_2_1_2">
+ <field name="question_id" ref="opinion_2_1"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="opcol_2_1_3">
+ <field name="question_id" ref="opinion_2_1"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="opcol_2_1_4">
+ <field name="question_id" ref="opinion_2_1"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="opcol_2_1_5">
+ <field name="question_id" ref="opinion_2_1"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="oprow_2_1_1">
+ <field name="question_id_2" ref="opinion_2_1"/>
+ <field name="sequence">1</field>
+ <field name="value">I am proud to tell others I work here</field>
+ </record>
+ <record model="survey.label" id="oprow_2_1_2">
+ <field name="question_id_2" ref="opinion_2_1"/>
+ <field name="sequence">2</field>
+ <field name="value">My job provides me with a sense of personal accomplishment</field>
+ </record>
+ <record model="survey.label" id="oprow_2_1_3">
+ <field name="question_id_2" ref="opinion_2_1"/>
+ <field name="sequence">3</field>
+ <field name="value">I would prefer to remain with this company even if a comparable job were available in another company</field>
+ </record>
+ <record model="survey.label" id="oprow_2_1_4">
+ <field name="question_id_2" ref="opinion_2_1"/>
+ <field name="sequence">4</field>
+ <field name="value">Taking everything into account, how satisfied are you with your current job?</field>
+ </record>
+ <record model="survey.label" id="oprow_2_1_5">
+ <field name="question_id_2" ref="opinion_2_1"/>
+ <field name="sequence">5</field>
+ <field name="value">I am willing to put in a great deal of effort beyond what is expected to help my workgroup succeed</field>
+ </record>
+ <record model="survey.question" id="opinion_2_2">
+ <field name="page_id" ref="opinion_2" />
+ <field name="sequence">2</field>
+ <field name="question">Leadership</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="opcol_2_2_1">
+ <field name="question_id" ref="opinion_2_2"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="opcol_2_2_2">
+ <field name="question_id" ref="opinion_2_2"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="opcol_2_2_3">
+ <field name="question_id" ref="opinion_2_2"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="opcol_2_2_4">
+ <field name="question_id" ref="opinion_2_2"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="opcol_2_2_5">
+ <field name="question_id" ref="opinion_2_2"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="oprow_2_2_1">
+ <field name="question_id_2" ref="opinion_2_2"/>
+ <field name="sequence">1</field>
+ <field name="value">Demonstrates genuine concern for me as a person</field>
+ </record>
+ <record model="survey.label" id="oprow_2_2_2">
+ <field name="question_id_2" ref="opinion_2_2"/>
+ <field name="sequence">2</field>
+ <field name="value">I consistently acquire new knowledge, skills or understanding through contact with my supervisor. He helps me growing my compete</field>
+ </record>
+ <record model="survey.label" id="oprow_2_2_3">
+ <field name="question_id_2" ref="opinion_2_2"/>
+ <field name="sequence">3</field>
+ <field name="value">Listens and takes into account all ideas and do his best to put in place the best of these</field>
+ </record>
+ <record model="survey.label" id="oprow_2_2_4">
+ <field name="question_id_2" ref="opinion_2_2"/>
+ <field name="sequence">4</field>
+ <field name="value">I believe the information that I get from the person I report to.</field>
+ </record>
+ <record model="survey.question" id="opinion_2_3">
+ <field name="page_id" ref="opinion_2" />
+ <field name="sequence">3</field>
+ <field name="question">Effectiveness</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="opcol_2_3_1">
+ <field name="question_id" ref="opinion_2_3"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="opcol_2_3_2">
+ <field name="question_id" ref="opinion_2_3"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="opcol_2_3_3">
+ <field name="question_id" ref="opinion_2_3"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="opcol_2_3_4">
+ <field name="question_id" ref="opinion_2_3"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="opcol_2_3_5">
+ <field name="question_id" ref="opinion_2_3"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="oprow_2_3_1">
+ <field name="question_id_2" ref="opinion_2_3"/>
+ <field name="sequence">1</field>
+ <field name="value">I'm efficient at work and my achievements are successful</field>
+ </record>
+ <record model="survey.label" id="oprow_2_3_2">
+ <field name="question_id_2" ref="opinion_2_3"/>
+ <field name="sequence">2</field>
+ <field name="value">I have enough work</field>
+ </record>
+ <record model="survey.label" id="oprow_2_3_3">
+ <field name="question_id_2" ref="opinion_2_3"/>
+ <field name="sequence">3</field>
+ <field name="value">I mostly work on value-added tasks for the company, the products or the services</field>
+ </record>
+ <record model="survey.question" id="opinion_2_4">
+ <field name="page_id" ref="opinion_2" />
+ <field name="sequence">4</field>
+ <field name="question">Continuous Improvement</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="opcol_2_4_1">
+ <field name="question_id" ref="opinion_2_4"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="opcol_2_4_2">
+ <field name="question_id" ref="opinion_2_4"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="opcol_2_4_3">
+ <field name="question_id" ref="opinion_2_4"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="opcol_2_4_4">
+ <field name="question_id" ref="opinion_2_4"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="opcol_2_4_5">
+ <field name="question_id" ref="opinion_2_4"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="oprow_2_4_1">
+ <field name="question_id_2" ref="opinion_2_4"/>
+ <field name="sequence">1</field>
+ <field name="value">My work contributes towards the continuous improvement of the company, our services or products</field>
+ </record>
+ <record model="survey.label" id="oprow_2_4_2">
+ <field name="question_id_2" ref="opinion_2_4"/>
+ <field name="sequence">2</field>
+ <field name="value">What I did several months ago is still of use to the company, the services or the products today</field>
+ </record>
+ <record model="survey.label" id="oprow_2_4_3">
+ <field name="question_id_2" ref="opinion_2_4"/>
+ <field name="sequence">3</field>
+ <field name="value">Overall, I believe the quality of products and/or services my workgroup delivers is improving</field>
+ </record>
+ <record model="survey.label" id="oprow_2_4_4">
+ <field name="question_id_2" ref="opinion_2_4"/>
+ <field name="sequence">4</field>
+ <field name="value">Our workgroup identifies and reduces waste of time in our activities and processes</field>
+ </record>
+ <record model="survey.question" id="opinion_2_5">
+ <field name="page_id" ref="opinion_2" />
+ <field name="sequence">5</field>
+ <field name="question">Openness</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="opcol_2_5_1">
+ <field name="question_id" ref="opinion_2_5"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="opcol_2_5_2">
+ <field name="question_id" ref="opinion_2_5"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="opcol_2_5_3">
+ <field name="question_id" ref="opinion_2_5"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="opcol_2_5_4">
+ <field name="question_id" ref="opinion_2_5"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="opcol_2_5_5">
+ <field name="question_id" ref="opinion_2_5"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="oprow_2_5_1">
+ <field name="question_id_2" ref="opinion_2_5"/>
+ <field name="sequence">1</field>
+ <field name="value">I know the company's values and live them</field>
+ </record>
+ <record model="survey.label" id="oprow_2_5_2">
+ <field name="question_id_2" ref="opinion_2_5"/>
+ <field name="sequence">2</field>
+ <field name="value">My best achievements have been communicated to the community, internally or to customers</field>
+ </record>
+ <record model="survey.question" id="opinion_2_6">
+ <field name="page_id" ref="opinion_2" />
+ <field name="sequence">6</field>
+ <field name="question">Miscellaneous</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="opcol_2_6_1">
+ <field name="question_id" ref="opinion_2_6"/>
+ <field name="sequence">1</field>
+ <field name="value">1</field>
+ </record>
+ <record model="survey.label" id="opcol_2_6_2">
+ <field name="question_id" ref="opinion_2_6"/>
+ <field name="sequence">2</field>
+ <field name="value">2</field>
+ </record>
+ <record model="survey.label" id="opcol_2_6_3">
+ <field name="question_id" ref="opinion_2_6"/>
+ <field name="sequence">3</field>
+ <field name="value">3</field>
+ </record>
+ <record model="survey.label" id="opcol_2_6_4">
+ <field name="question_id" ref="opinion_2_6"/>
+ <field name="sequence">4</field>
+ <field name="value">4</field>
+ </record>
+ <record model="survey.label" id="opcol_2_6_5">
+ <field name="question_id" ref="opinion_2_6"/>
+ <field name="sequence">5</field>
+ <field name="value">5</field>
+ </record>
+ <record model="survey.label" id="oprow_2_6_1">
+ <field name="question_id_2" ref="opinion_2_6"/>
+ <field name="sequence">1</field>
+ <field name="value">Actions by Executive management show genuine interest in the well-being of employees</field>
+ </record>
+ <record model="survey.label" id="oprow_2_6_2">
+ <field name="question_id_2" ref="opinion_2_6"/>
+ <field name="sequence">2</field>
+ <field name="value">I have the same opportunity to succeed as others with similar experiences, performance and educational background</field>
+ </record>
+ <record model="survey.label" id="oprow_2_6_3">
+ <field name="question_id_2" ref="opinion_2_6"/>
+ <field name="sequence">3</field>
+ <field name="value">Compared to similar jobs in other companies where I could work, my total compensation...</field>
+ </record>
+ <record model="survey.label" id="oprow_2_6_4">
+ <field name="question_id_2" ref="opinion_2_6"/>
+ <field name="sequence">4</field>
+ <field name="value">I understand the company strategy and how my workgroup supports it</field>
+ </record>
+ <record model="survey.question" id="opinion_2_7">
+ <field name="page_id" ref="opinion_2" />
+ <field name="sequence">7</field>
+ <field name="question">Additional comments</field>
+ <field name="type">free_text</field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/hr_evaluation/test/hr_evalution_demo.yml b/addons/hr_evaluation/test/hr_evalution_demo.yml
index 8c62969dea6..d6a7a327c66 100644
--- a/addons/hr_evaluation/test/hr_evalution_demo.yml
+++ b/addons/hr_evaluation/test/hr_evalution_demo.yml
@@ -1,6 +1,6 @@
--
- !record {model: hr.employee, id: hr.employee_fp, view: False}:
- evaluation_plan_id: hr_evaluation_plan_managersevaluationplan0
--
- !record {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, view: False}:
- plan_id: hr_evaluation.hr_evaluation_plan_managersevaluationplan0 \ No newline at end of file
+# -
+# !record {model: hr.employee, id: hr.employee_fp, view: False}:
+# evaluation_plan_id: hr_evaluation_plan_managersevaluationplan0
+# -
+# !record {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, view: False}:
+# plan_id: hr_evaluation.hr_evaluation_plan_managersevaluationplan0 \ No newline at end of file
diff --git a/addons/hr_evaluation/test/test_hr_evaluation.yml b/addons/hr_evaluation/test/test_hr_evaluation.yml
index 3244e37302e..d9d6c8edd49 100644
--- a/addons/hr_evaluation/test/test_hr_evaluation.yml
+++ b/addons/hr_evaluation/test/test_hr_evaluation.yml
@@ -1,108 +1,103 @@
--
- I set the "Employee Evaluation" survey in open state.
--
- !python {model: survey}: |
- self.survey_open(cr, uid, [ref("survey_2")], context)
--
- I check that state of "Employee Evaluation" survey is Open.
--
- !assert {model: survey, id: survey_2, severity: error, string: Survey should be in OPen state}:
- - state == 'open'
--
- I start the evaluation process by click on "Start Evaluation" button.
--
- !python {model: hr_evaluation.evaluation}: |
- self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
--
- I check that state is "Plan in progress".
--
- !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, severity: error, string: Evaluation should be 'Plan in progress' state}:
- - state == 'wait'
--
- I find a mistake on evaluation form. So I cancel the evaluation and again start it.
--
- !python {model: hr_evaluation.evaluation}: |
- evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0') , context)
- self.button_cancel(cr, uid, [ref('hr_evaluation_evaluation_0')])
- assert evaluation.state == 'cancel', 'Evaluation should be in cancel state'
- self.button_draft(cr, uid, [ref('hr_evaluation_evaluation_0')])
- evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0') , context)
- assert evaluation.state == 'draft', 'Evaluation should be in draft state'
- self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
--
- I check that state is "Plan in progress" and "Interview Request" record is created
--
- !python {model: hr_evaluation.evaluation}: |
- interview_obj = self.pool.get('hr.evaluation.interview')
- evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0') , context)
- assert evaluation.state == 'wait', "Evaluation should be 'Plan in progress' state"
- interview_ids = interview_obj.search(cr, uid, [('evaluation_id','=', ref('hr_evaluation_evaluation_0'))])
- assert len(interview_ids), "Interview evaluation survey not created"
--
- Give answer of the first page in "Employee Evaluation" survey.
--
- !python {model: survey.question.wiz}: |
- name_wiz_obj=self.pool.get('survey.name.wiz')
- interview_obj = self.pool.get('hr.evaluation.interview')
- interview_ids = interview_obj.search(cr, uid, [('evaluation_id','=', ref('hr_evaluation_evaluation_0'))])
- assert len(interview_ids), "Interview evaluation survey not created"
- ctx = {'active_model':'hr.evaluation.interview', 'active_id': interview_ids[0], 'active_ids': [interview_ids], 'survey_id': ref("survey_2")}
- name_id = name_wiz_obj.create(cr, uid, {'survey_id': ref("survey_2")})
- ctx ["sur_name_id"] = name_id
- self.create(cr, uid, {str(ref("survey_question_2")) +"_" +str(ref("survey_answer_1")) + "_multi" :'tpa',
- str(ref("survey_question_2")) +"_" +str(ref("survey_answer_10")) + "_multi" :'application eng',
- str(ref("survey_question_2")) +"_" +str(ref("survey_answer_20")) + "_multi" :'3',
- str(ref("survey_question_2")) +"_" +str(ref("survey_answer_25")) + "_multi" :'2011-12-02 16:42:00',
- str(ref("survey_question_2")) +"_" +str(ref("survey_answer_43")) + "_multi" :'HR',
- }, context = ctx)
--
- I close this Evaluation survey by giving answer of questions.
--
- !python {model: hr_evaluation.evaluation}: |
- interview_obj = self.pool.get('hr.evaluation.interview')
- evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0'))
- interview_obj.survey_req_done(cr, uid, [r.id for r in evaluation.survey_request_ids])
- for survey in evaluation.survey_request_ids:
- interview = interview_obj.browse(cr, uid, survey.id, context)
- assert interview.state == "done", 'survey must be in done state'
--
- I print the evaluation.
--
- !python {model: hr_evaluation.evaluation}: |
- evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0'))
- self.pool.get('hr.evaluation.interview').action_print_survey(cr, uid, [r.id for r in evaluation.survey_request_ids])
--
- I click on "Final Validation" button to finalise evaluation.
--
- !python {model: hr_evaluation.evaluation}: |
- self.button_final_validation(cr, uid, [ref("hr_evaluation_evaluation_0")])
--
- I check that state is "Waiting Appreciation".
--
- !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
- - state == 'progress'
--
- Give Rating "Meet expectations" by selecting overall Rating.
--
- !record {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
- rating: '2'
--
- I close this Evaluation by click on "Done" button of this wizard.
--
- !python {model: hr_evaluation.evaluation}: |
- self.button_done(cr, uid, [ref("hr_evaluation_evaluation_0")])
--
- I check that state of Evaluation is done.
--
- !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, severity: error, string: Evaluation should be in done state}:
- - state == 'done'
--
- Print Evaluations Statistics Report
--
- !python {model: hr.evaluation.report}: |
- import os, time
- from openerp import tools
- ctx={}
- data_dict={'state': 'done', 'rating': 2, 'employee_id': ref("hr.employee_fp")}
- from openerp.tools import test_reports
- test_reports.try_report_action(cr, uid, 'hr_evaluation_evaluation_0',wiz_data=data_dict, context=ctx, our_module='hr_evaluation')
+# -
+# I check that state of "Employee Evaluation" survey is Open.
+# -
+# !assert {model: survey.survey, id: appraisal_form, severity: error, string: Survey should be in 'open' state}:
+# - state == 'open'
+# -
+# I start the evaluation process by click on "Start Evaluation" button.
+# -
+# !python {model: hr_evaluation.evaluation}: |
+# self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
+# -
+# I check that state is "Plan in progress".
+# -
+# !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, severity: error, string: Evaluation should be 'Plan in progress' state}:
+# - state == 'wait'
+# -
+# I find a mistake on evaluation form. So I cancel the evaluation and again start it.
+# -
+# !python {model: hr_evaluation.evaluation}: |
+# evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0') , context)
+# self.button_cancel(cr, uid, [ref('hr_evaluation_evaluation_0')])
+# assert evaluation.state == 'cancel', 'Evaluation should be in cancel state'
+# self.button_draft(cr, uid, [ref('hr_evaluation_evaluation_0')])
+# evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0') , context)
+# assert evaluation.state == 'draft', 'Evaluation should be in draft state'
+# self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
+# -
+# I check that state is "Plan in progress" and "Interview Request" record is created
+# -
+# !python {model: hr_evaluation.evaluation}: |
+# interview_obj = self.pool.get('hr.evaluation.interview')
+# evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0') , context)
+# assert evaluation.state == 'wait', "Evaluation should be 'Plan in progress' state"
+# interview_ids = interview_obj.search(cr, uid, [('evaluation_id','=', ref('hr_evaluation_evaluation_0'))])
+# assert len(interview_ids), "Interview evaluation survey not created"
+# -
+# Give answer of the first page in "Employee Evaluation" survey.
+# -
+# !python {model: survey.question.wiz}: |
+# name_wiz_obj=self.pool.get('survey.name.wiz')
+# interview_obj = self.pool.get('hr.evaluation.interview')
+# interview_ids = interview_obj.search(cr, uid, [('evaluation_id','=', ref('hr_evaluation_evaluation_0'))])
+# assert len(interview_ids), "Interview evaluation survey not created"
+# ctx = {'active_model':'hr.evaluation.interview', 'active_id': interview_ids[0], 'active_ids': [interview_ids], 'survey_id': ref("survey_2")}
+# name_id = name_wiz_obj.create(cr, uid, {'survey_id': ref("survey_2")})
+# ctx ["sur_name_id"] = name_id
+# self.create(cr, uid, {str(ref("survey_question_2")) +"_" +str(ref("survey_answer_1")) + "_multi" :'tpa',
+# str(ref("survey_question_2")) +"_" +str(ref("survey_answer_10")) + "_multi" :'application eng',
+# str(ref("survey_question_2")) +"_" +str(ref("survey_answer_20")) + "_multi" :'3',
+# str(ref("survey_question_2")) +"_" +str(ref("survey_answer_25")) + "_multi" :'2011-12-02 16:42:00',
+# str(ref("survey_question_2")) +"_" +str(ref("survey_answer_43")) + "_multi" :'HR',
+# }, context = ctx)
+# -
+# I close this Evaluation survey by giving answer of questions.
+# -
+# !python {model: hr_evaluation.evaluation}: |
+# interview_obj = self.pool.get('hr.evaluation.interview')
+# evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0'))
+# interview_obj.survey_req_done(cr, uid, [r.id for r in evaluation.survey_request_ids])
+# for survey in evaluation.survey_request_ids:
+# interview = interview_obj.browse(cr, uid, survey.id, context)
+# assert interview.state == "done", 'survey must be in done state'
+# -
+# I print the evaluation.
+# -
+# !python {model: hr_evaluation.evaluation}: |
+# evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0'))
+# self.pool.get('hr.evaluation.interview').action_print_survey(cr, uid, [r.id for r in evaluation.survey_request_ids])
+# -
+# I click on "Final Validation" button to finalise evaluation.
+# -
+# !python {model: hr_evaluation.evaluation}: |
+# self.button_final_validation(cr, uid, [ref("hr_evaluation_evaluation_0")])
+# -
+# I check that state is "Waiting Appreciation".
+# -
+# !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
+# - state == 'progress'
+# -
+# Give Rating "Meet expectations" by selecting overall Rating.
+# -
+# !record {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
+# rating: '2'
+# -
+# I close this Evaluation by click on "Done" button of this wizard.
+# -
+# !python {model: hr_evaluation.evaluation}: |
+# self.button_done(cr, uid, [ref("hr_evaluation_evaluation_0")])
+# -
+# I check that state of Evaluation is done.
+# -
+# !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, severity: error, string: Evaluation should be in done state}:
+# - state == 'done'
+# -
+# Print Evaluations Statistics Report
+# -
+# !python {model: hr.evaluation.report}: |
+# import os, time
+# from openerp import tools
+# ctx={}
+# data_dict={'state': 'done', 'rating': 2, 'employee_id': ref("hr.employee_fp")}
+# from openerp.tools import test_reports
+# test_reports.try_report_action(cr, uid, 'hr_evaluation_evaluation_0',wiz_data=data_dict, context=ctx, our_module='hr_evaluation')
diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py
index e6c94b4245f..27c7d194b74 100644
--- a/addons/hr_recruitment/__openerp__.py
+++ b/addons/hr_recruitment/__openerp__.py
@@ -25,7 +25,7 @@
'version': '1.0',
'category': 'Human Resources',
'sequence': 25,
- 'summary': 'Jobs, Recruitment, Applications, Job Interviews',
+ 'summary': 'Jobs, Recruitment, Applications, Job Interviews, Surveys',
'description': """
Manage job positions and the recruitment process
================================================
@@ -37,7 +37,8 @@ You can define the different phases of interviews and easily rate the applicant
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
- 'images': ['images/hr_recruitment_analysis.jpeg','images/hr_recruitment_applicants.jpeg','static/src/img/down1.png'],
+ 'images': ['images/hr_recruitment_analysis.jpeg',
+ 'images/hr_recruitment_applicants.jpeg'],
'depends': [
'decimal_precision',
'hr',
@@ -56,6 +57,7 @@ You can define the different phases of interviews and easily rate the applicant
'board_hr_recruitment_statistical_view.xml',
'hr_recruitment_installer_view.xml',
'res_config_view.xml',
+ 'survey_data_recruitment.xml',
'hr_recruitment_data.xml',
],
'demo': ['hr_recruitment_demo.xml'],
@@ -63,10 +65,8 @@ You can define the different phases of interviews and easily rate the applicant
'static/src/js/job_position.js',
],
'test': ['test/recruitment_process.yml'],
- 'css':['static/src/css/job_position.css'],
+ 'css': ['static/src/css/job_position.css'],
'installable': True,
'auto_install': False,
'application': True,
}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 20e9e0930cc..ac11ef5e81d 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -211,8 +211,8 @@ class hr_applicant(osv.Model):
'partner_mobile': fields.char('Mobile', size=32),
'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
'department_id': fields.many2one('hr.department', 'Department'),
- 'survey': fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
- 'response': fields.integer("Response"),
+ 'survey': fields.related('job_id', 'survey_id', type='many2one', relation='survey.survey', string='Survey'),
+ 'response_id': fields.many2one('survey.user_input', "Response", ondelete='set null', oldname="response"),
'reference': fields.char('Referred By', size=128),
'source_id': fields.many2one('hr.recruitment.source', 'Source'),
'day_open': fields.function(_compute_day, string='Days to Open', \
@@ -311,24 +311,34 @@ class hr_applicant(osv.Model):
}
return res
- def action_print_survey(self, cr, uid, ids, context=None):
- """
- If response is available then print this response otherwise print survey form(print template of the survey).
+ def action_start_survey(self, cr, uid, ids, context=None):
+ context = context if context else {}
+ applicant = self.browse(cr, uid, ids, context=context)[0]
+ survey_obj = self.pool.get('survey.survey')
+ response_obj = self.pool.get('survey.user_input')
+ # create a response and link it to this applicant
+ if not applicant.response_id:
+ response_id = response_obj.create(cr, uid, {'survey_id': applicant.survey.id, 'partner_id': applicant.partner_id.id}, context=context)
+ self.write(cr, uid, ids[0], {'response_id': response_id}, context=context)
+ else:
+ response_id = applicant.response_id.id
+ # grab the token of the response and start surveying
+ response = response_obj.browse(cr, uid, response_id, context=context)
+ context.update({'survey_token': response.token})
+ return survey_obj.action_start_survey(cr, uid, [applicant.survey.id], context=context)
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Survey IDs
- @param context: A standard dictionary for contextual values
- @return: Dictionary value for print survey form.
- """
- if context is None:
- context = {}
- record = self.browse(cr, uid, ids, context=context)
- record = record and record[0]
- context.update({'survey_id': record.survey.id, 'response_id': [record.response], 'response_no': 0, })
- value = self.pool.get("survey").action_print_survey(cr, uid, ids, context=context)
- return value
+ def action_print_survey(self, cr, uid, ids, context=None):
+ """ If response is available then print this response otherwise print survey form (print template of the survey) """
+ context = context if context else {}
+ applicant = self.browse(cr, uid, ids, context=context)[0]
+ survey_obj = self.pool.get('survey.survey')
+ response_obj = self.pool.get('survey.user_input')
+ if not applicant.response_id:
+ return survey_obj.action_print_survey(cr, uid, [applicant.survey.id], context=context)
+ else:
+ response = response_obj.browse(cr, uid, applicant.response_id.id, context=context)
+ context.update({'survey_token': response.token})
+ return survey_obj.action_print_survey(cr, uid, [applicant.survey.id], context=context)
def action_get_attachment_tree_view(self, cr, uid, ids, context=None):
model, action_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'action_attachment')
@@ -391,9 +401,9 @@ class hr_applicant(osv.Model):
ids = [ids]
res = True
- # user_id change: update date_start
+ # user_id change: update date_open
if vals.get('user_id'):
- vals['date_start'] = fields.datetime.now()
+ vals['date_open'] = fields.datetime.now()
# stage_id: track last stage before update
if 'stage_id' in vals:
vals['date_last_stage_update'] = fields.datetime.now()
@@ -518,7 +528,7 @@ class hr_job(osv.osv):
return res
_columns = {
- 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"),
+ 'survey_id': fields.many2one('survey.survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"),
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="Email alias for this job position. New emails will automatically "
"create new applicants for this job position."),
@@ -559,21 +569,9 @@ class hr_job(osv.osv):
return res
def action_print_survey(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
- datas = {}
- record = self.browse(cr, uid, ids, context=context)[0]
- if record.survey_id:
- datas['ids'] = [record.survey_id.id]
- datas['model'] = 'survey.print'
- context.update({'response_id': [0], 'response_no': 0})
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'survey.form',
- 'datas': datas,
- 'context': context,
- 'nodestroy': True,
- }
+ job = self.browse(cr, uid, ids, context=context)[0]
+ survey_id = job.survey_id.id
+ return self.pool.get('survey.survey').action_print_survey(cr, uid, [survey_id], context=context)
def action_get_attachment_tree_view(self, cr, uid, ids, context=None):
#open attachments of job and related applicantions.
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index 8a88d8ebe5f..5849a67d949 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -118,379 +118,6 @@
<field name="fold" eval="True"/>
</record>
- <record id="survey_job_0" model="survey">
- <field name="title">Job Survey</field>
- <field name="max_response_limit">20</field>
- <field eval="[(6,0,[])]" name="users"/>
- <field name="type" ref="survey.survey_type1"/>
- <field name="responsible_id" ref="base.user_root"/>
- <field name="response_user">5</field>
- </record>
- <record id="survey_page_job_0" model="survey.page">
- <field name="title">Default Section</field>
- <field name="survey_id" ref="survey_job_0"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_page_job_1" model="survey.page">
- <field name="title">Education &amp; Activities</field>
- <field name="survey_id" ref="survey_job_0"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_page_job_2" model="survey.page">
- <field name="title">Importance</field>
- <field name="survey_id" ref="survey_job_0"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_question_job_0" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">From which university will you graduate?</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">single_textbox</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_0"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_job_1" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Rate the Importance</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_2"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_job_2" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Education</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_1"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_job_3" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Knowledge</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_1"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_job_4" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">What is your gender?</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_0"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
-
- <record id="survey_answer_job_70" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Male</field>
- <field name="question_id" ref="survey_question_job_4"/>
- <field eval="1" name="sequence"/>
- </record>
-
- <record id="survey_answer_job_71" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Female</field>
- <field name="question_id" ref="survey_question_job_4"/>
- <field eval="2" name="sequence"/>
- </record>
-
- <record id="survey_question_job_5" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="3" name="sequence"/>
- <field name="question">What age group do you belong to?</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_0"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
-
- <record id="survey_answer_job_81" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">0 - 15</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_job_82" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">16 - 20</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_job_83" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">21 - 30</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_job_84" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">31 - 40</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="4" name="sequence"/>
- </record>
- <record id="survey_answer_job_85" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">41 - 50</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_job_86" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">51 - 60</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="6" name="sequence"/>
- </record>
- <record id="survey_answer_job_87" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">61 - 70</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="7" name="sequence"/>
- </record>
- <record id="survey_answer_job_88" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">71 +</field>
- <field name="question_id" ref="survey_question_job_5"/>
- <field eval="8" name="sequence"/>
- </record>
-
- <record id="survey_question_job_6" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="3" name="sequence"/>
- <field name="question">Experience</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_1"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_job_7" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="4" name="sequence"/>
- <field name="question">Activities</field>
- <field eval="0" name="is_require_answer"/>
- <field name="type">comment</field>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="page_id" ref="survey_page_job_1"/>
- <field name="comment_label">Other</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- <record id="survey_question_column_heading_job_0" model="survey.question.column.heading">
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="title">Not important</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_job_1"/>
- </record>
- <record id="survey_question_column_heading_job_1" model="survey.question.column.heading">
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="title">Somewhat important</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_job_1"/>
- </record>
- <record id="survey_question_column_heading_job_2" model="survey.question.column.heading">
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="title">Important</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_job_1"/>
- </record>
- <record id="survey_question_column_heading_job_3" model="survey.question.column.heading">
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="title">Very important</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_job_1"/>
- </record>
- <record id="survey_question_column_heading_job_4" model="survey.question.column.heading">
- <field eval="1" name="in_visible_menu_choice"/>
- <field name="title">Most important</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_job_1"/>
- </record>
- <record id="survey_answer_job_0" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Good pay</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_job_1" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Getting on with colleagues</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_job_2" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Office environment (décor, light, space etc)</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_job_3" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Desk space</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="4" name="sequence"/>
- </record>
- <record id="survey_answer_job_4" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">State of the art technology</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_job_5" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Office location (proximity to home)</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="6" name="sequence"/>
- </record>
- <record id="survey_answer_job_6" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Good management/boss</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="7" name="sequence"/>
- </record>
- <record id="survey_answer_job_7" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Freebies such as tea, coffee and stationery</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="8" name="sequence"/>
- </record>
- <record id="survey_answer_job_8" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Perks such as free parking, gym passes etc</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="9" name="sequence"/>
- </record>
- <record id="survey_answer_job_9" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">No out of hours working</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="10" name="sequence"/>
- </record>
- <record id="survey_answer_job_10" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Dress code</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="11" name="sequence"/>
- </record>
- <record id="survey_answer_job_11" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Regular meetings</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="12" name="sequence"/>
- </record>
- <record id="survey_answer_job_12" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Good social life (office nights out, good Christmas parties etc)</field>
- <field name="question_id" ref="survey_question_job_1"/>
- <field eval="13" name="sequence"/>
- </record>
-
<record id="mail_alias_jobs" model="mail.alias">
<field name="alias_name">jobs</field>
<field name="alias_model_id" ref="model_hr_applicant"/>
diff --git a/addons/hr_recruitment/hr_recruitment_demo.xml b/addons/hr_recruitment/hr_recruitment_demo.xml
index 8ba49a2beb8..3d6c05c1489 100644
--- a/addons/hr_recruitment/hr_recruitment_demo.xml
+++ b/addons/hr_recruitment/hr_recruitment_demo.xml
@@ -126,35 +126,35 @@
<record id="hr.job_developer" model="hr.job">
<field name="state">recruit</field>
<field name="no_of_recruitment">4</field>
- <field name="survey_id" ref="survey_job_0"/>
+ <field name="survey_id" ref="recruitment_form"/>
</record>
<record id="hr.job_ceo" model="hr.job">
- <field name="survey_id" ref="survey_job_0"/>
+ <field name="survey_id" ref="recruitment_form"/>
</record>
<record id="hr.job_cto" model="hr.job">
- <field name="survey_id" ref="survey_job_0"/>
+ <field name="survey_id" ref="recruitment_form"/>
</record>
<record id="hr.job_consultant" model="hr.job">
<field name="state">recruit</field>
<field name="no_of_recruitment">1</field>
- <field name="survey_id" ref="survey_job_0"/>
+ <field name="survey_id" ref="recruitment_form"/>
</record>
<record id="hr.job_hrm" model="hr.job">
<field name="no_of_recruitment">1</field>
<field name="state">recruit</field>
- <field name="survey_id" ref="survey_job_0"/>
+ <field name="survey_id" ref="recruitment_form"/>
</record>
<record id="hr.job_marketing" model="hr.job">
<field name="state">recruit</field>
<field name="no_of_recruitment">3</field>
- <field name="survey_id" ref="survey_job_0"/>
+ <field name="survey_id" ref="recruitment_form"/>
</record>
<record id="hr.job_trainee" model="hr.job">
<field name="state">recruit</field>
<field name="no_of_recruitment">6</field>
- <field name="survey_id" ref="survey_job_0"/>
+ <field name="survey_id" ref="recruitment_form"/>
</record>
-
+ -->
<record id="message_application_demo" model="mail.message">
<field name="model">hr.applicant</field>
<field name="res_id" ref="hr_case_advertisement"/>
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index c9dc0d04ffb..53e35ea58d1 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -54,7 +54,7 @@
<field name="date_action" invisible="context.get('invisible_next_date', True)"/>
<field name="source_id" invisible="1"/>
<field name="survey" invisible="1"/>
- <field name="response" invisible="1"/>
+ <field name="response_id" invisible="1"/>
<field name="priority"/>
<field name="type_id" invisible="1"/>
<field name="availability" invisible="1"/>
@@ -76,9 +76,9 @@
<div class="oe_right oe_button_box">
<button name="action_makeMeeting" type="object"
string="Schedule Meeting" help="Schedule interview with this applicant"/>
- <button name="%(survey.action_view_survey_question_message)d" type="action"
+ <button name="action_start_survey" type="object"
string="Start Interview" help="Answer related job question"
- context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant'}"
+ context="{'survey_id': survey}"
attrs="{'invisible':[('survey','=',False)]}"/>
<button name="action_print_survey" type="object"
string="Print Interview" help="Print interview report"
@@ -93,7 +93,7 @@
<field name="partner_name" class="oe_inline"/>
<button string="Create Employee" name="create_employee_from_applicant" type="object"
class="oe_link oe_inline" style="margin-left: 8px;"
- attrs="{'invisible': [('emp_id', '!=', False)]}"/>
+ attrs="{'invisible': [('emp_id', '!=', False)]}"/>
</h2>
</div>
<group>
@@ -106,7 +106,7 @@
<field name="type_id" placeholder="Degree"/>
</group>
<group>
- <field name="user_id"
+ <field name="user_id"
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_manager']}"/>
<label for="title_action"/>
<div>
@@ -119,7 +119,7 @@
</group>
<group string="Job">
<field name="survey" invisible="1"/>
- <field name="response" invisible="1"/>
+ <field name="response_id" invisible="1"/>
<field name="job_id" on_change="onchange_job(job_id)"/>
<field name="department_id" on_change="onchange_department_id(department_id, stage_id)"/>
<field name="company_id" />
@@ -183,7 +183,7 @@
<separator/>
<filter string="Next Actions" context="{'invisible_next_action':False, 'invisible_next_date':False}"
domain="[('date_action','&lt;&gt;',False)]" help="Filter and view on next actions and date"/>
-
+
<field name="job_id"/>
<field name="department_id"/>
<field name="user_id"/>
@@ -260,7 +260,7 @@
<li><a name="action_makeMeeting" type="object">Schedule Interview</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
-
+
</div>
<div class="oe_kanban_content" tooltip="kanban-tooltip">
<div>
@@ -295,9 +295,9 @@
</div>
<div class="oe_kanban_footer_left" style="margin-top:5px;">
<t t-raw="record.message_summary.raw_value"/>
- <a t-if="record.attachment_number" name="action_get_attachment_tree_view" type="object" style="margin-right: 10px"> <field name="attachment_number"/> Documents</a>
+ <a t-if="record.attachment_number" name="action_get_attachment_tree_view" type="object" style="margin-right: 10px"> <field name="attachment_number"/> Documents</a>
</div>
-
+
</div>
<div class="oe_clear"></div>
</div>
@@ -318,7 +318,7 @@
process and follow up all operations: meetings, interviews, etc.
</p><p>
Applicants and their attached CV are created automatically when an email is sent.
- If you install the document management modules, all resumes are indexed automatically,
+ If you install the document management modules, all resumes are indexed automatically,
so that you can easily search through their content.
</p>
</field>
@@ -345,7 +345,7 @@
<group name="employee_data" position="inside">
<label for="survey_id" groups="base.group_user"/>
<div groups="base.group_user">
- <field name="survey_id" class="oe_inline" domain="[('type','=','Human Resources')]"/>
+ <field name="survey_id" class="oe_inline" domain="[('res_model','=','hr_recruitment')]"/>
<button string="Print Interview" name="action_print_survey" type="object" attrs="{'invisible':[('survey_id','=',False)]}" class="oe_inline oe_link"/>
</div>
<label for="address_id"/>
@@ -425,7 +425,7 @@
<div class="oe_job_alias oe_kanban_ellipsis" t-if=" record.alias_id.value and record.state.raw_value == 'recruit'">
<span class="oe_e">%%</span><small><field name="alias_id"/></small>
</div>
-
+
</div>
<t t-if="record.state.raw_value == 'recruit'">
<div class="oe_applications">
@@ -483,7 +483,7 @@
<field name="context">{'search_default_in_recruitment': 1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
- Click here to create a new job or remove the filter on "In Recruitment" to recruit for an on hold job.
+ Click here to create a new job or remove the filter on "In Recruitment" to recruit for an on hold job.
</p>
<p>
Define job position profile and manage recruitment in a context of a particular job: print interview survey, define number of expected new employees, and manage its recruitment pipe
diff --git a/addons/hr_recruitment/security/ir.model.access.csv b/addons/hr_recruitment/security/ir.model.access.csv
index 3cc92705a15..9cd9897a51b 100644
--- a/addons/hr_recruitment/security/ir.model.access.csv
+++ b/addons/hr_recruitment/security/ir.model.access.csv
@@ -4,7 +4,7 @@ access_hr_recruitment_report,hr.recruitment.report,model_hr_recruitment_report,b
access_hr_recruitment_stage_user,hr.recruitment.stage.user,model_hr_recruitment_stage,base.group_hr_user,1,1,1,1
access_hr_recruitment_degree,hr.recruitment.degree,model_hr_recruitment_degree,base.group_hr_user,1,1,1,1
access_res_partner_hr_user,res.partner.user,base.model_res_partner,base.group_hr_user,1,1,1,1
-access_survey_hr_user,survey.hr.user,survey.model_survey,base.group_hr_user,1,1,1,0
+access_survey_hr_user,survey.hr.user,survey.model_survey_survey,base.group_hr_user,1,1,1,0
access_calendar_event_hruser,calendar.event.hruser,calendar.model_calendar_event,base.group_hr_user,1,1,1,1
access_hr_recruitment_source_hr_officer,hr.recruitment.source,model_hr_recruitment_source,base.group_hr_user,1,1,1,1
access_hr_recruitment_source_all,hr.recruitment.source,model_hr_recruitment_source,,1,0,0,0
diff --git a/addons/hr_recruitment/static/src/js/job_position.js b/addons/hr_recruitment/static/src/js/job_position.js
index 06e880cb40d..43150117115 100644
--- a/addons/hr_recruitment/static/src/js/job_position.js
+++ b/addons/hr_recruitment/static/src/js/job_position.js
@@ -1,4 +1,5 @@
openerp.hr_recruitment = function (openerp) {
+ "use strict";
openerp.web_kanban.KanbanRecord.include({
on_card_clicked: function() {
@@ -10,4 +11,4 @@ openerp.hr_recruitment = function (openerp) {
},
});
-} \ No newline at end of file
+};
diff --git a/addons/hr_recruitment/survey_data_recruitment.xml b/addons/hr_recruitment/survey_data_recruitment.xml
new file mode 100644
index 00000000000..f6aacb0f23c
--- /dev/null
+++ b/addons/hr_recruitment/survey_data_recruitment.xml
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <!-- Recruitment Form -->
+ <record model="survey.survey" id="recruitment_form">
+ <field name="title">Recruitment Form</field>
+ <field name="stage_id" ref="survey.stage_permanent" />
+ <field name="res_model">hr_recruitment</field>
+ <field name="auth_required" eval="True" />
+ <field name="users_can_go_back" eval="True" />
+ <field name="description">&lt;p&gt;This form is intended to help the responsible of a recruitment interview.&lt;/p&gt;</field>
+ <field name="thank_you_message">&lt;p&gt;&lt;/p&gt;</field>
+ </record>
+ <!-- Page 1 -->
+ <record model="survey.page" id="recruitment_1">
+ <field name="title">Basic information</field>
+ <field name="survey_id" ref="recruitment_form" />
+ <field name="sequence">1</field>
+ <field name="description">&lt;p&gt;&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="recruitment_1_1">
+ <field name="page_id" ref="recruitment_1" />
+ <field name="sequence">1</field>
+ <field name="question">From which university will you graduate?</field>
+ <field name="type">textbox</field>
+ </record>
+ <record model="survey.question" id="recruitment_1_2">
+ <field name="page_id" ref="recruitment_1" />
+ <field name="sequence">2</field>
+ <field name="question">What is your gender?</field>
+ <field name="type">simple_choice</field>
+ <field name="display_mode">dropdown</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_2_1">
+ <field name="question_id" ref="recruitment_1_2"/>
+ <field name="sequence">1</field>
+ <field name="value">Male</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_2_2">
+ <field name="question_id" ref="recruitment_1_2"/>
+ <field name="sequence">2</field>
+ <field name="value">Female</field>
+ </record>
+ <record model="survey.question" id="recruitment_1_3">
+ <field name="page_id" ref="recruitment_1" />
+ <field name="sequence">3</field>
+ <field name="question">What age group do you belong to?</field>
+ <field name="type">simple_choice</field>
+ <field name="display_mode">columns</field>
+ <field name="column_nb">4</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_3_1">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">1</field>
+ <field name="value">0-15</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_3_2">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">2</field>
+ <field name="value">16-20</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_3_3">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">3</field>
+ <field name="value">21-30</field>
+ </record>
+
+ <record model="survey.label" id="recruitment_1_3_4">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">4</field>
+ <field name="value">31-40</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_3_5">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">5</field>
+ <field name="value">41-50</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_3_6">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">6</field>
+ <field name="value">51-60</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_3_7">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">7</field>
+ <field name="value">61-70</field>
+ </record>
+ <record model="survey.label" id="recruitment_1_3_8">
+ <field name="question_id" ref="recruitment_1_3"/>
+ <field name="sequence">8</field>
+ <field name="value">71+</field>
+ </record>
+ <!-- Page 2 -->
+ <record model="survey.page" id="recruitment_2">
+ <field name="title">Education and Activities</field>
+ <field name="survey_id" ref="recruitment_form" />
+ <field name="sequence">2</field>
+ <field name="description">&lt;p&gt;&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="recruitment_2_1">
+ <field name="page_id" ref="recruitment_2" />
+ <field name="sequence">1</field>
+ <field name="question">Knowledge</field>
+ <field name="type">free_text</field>
+ </record>
+ <record model="survey.question" id="recruitment_2_2">
+ <field name="page_id" ref="recruitment_2" />
+ <field name="sequence">2</field>
+ <field name="question">Education</field>
+ <field name="type">free_text</field>
+ </record>
+ <record model="survey.question" id="recruitment_2_3">
+ <field name="page_id" ref="recruitment_2" />
+ <field name="sequence">3</field>
+ <field name="question">Experience</field>
+ <field name="type">free_text</field>
+ </record>
+ <record model="survey.question" id="recruitment_2_4">
+ <field name="page_id" ref="recruitment_2" />
+ <field name="sequence">4</field>
+ <field name="question">Activities</field>
+ <field name="type">free_text</field>
+ </record>
+ <!-- Page 3 -->
+ <record model="survey.page" id="recruitment_3">
+ <field name="title">Importance</field>
+ <field name="survey_id" ref="recruitment_form" />
+ <field name="sequence">3</field>
+ <field name="description">&lt;p&gt;&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="recruitment_3_1">
+ <field name="page_id" ref="recruitment_3" />
+ <field name="sequence">1</field>
+ <field name="question">Rate the Importance</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ </record>
+ <record model="survey.label" id="rcol_3_1_1">
+ <field name="question_id" ref="recruitment_3_1"/>
+ <field name="sequence">1</field>
+ <field name="value">Not important</field>
+ </record>
+ <record model="survey.label" id="rcol_3_1_2">
+ <field name="question_id" ref="recruitment_3_1"/>
+ <field name="sequence">2</field>
+ <field name="value">Somewhat important</field>
+ </record>
+ <record model="survey.label" id="rcol_3_1_3">
+ <field name="question_id" ref="recruitment_3_1"/>
+ <field name="sequence">3</field>
+ <field name="value">Important</field>
+ </record>
+ <record model="survey.label" id="rcol_3_1_4">
+ <field name="question_id" ref="recruitment_3_1"/>
+ <field name="sequence">4</field>
+ <field name="value">Very important</field>
+ </record>
+ <record model="survey.label" id="rcol_3_1_5">
+ <field name="question_id" ref="recruitment_3_1"/>
+ <field name="sequence">5</field>
+ <field name="value">Most important</field>
+ </record>
+
+ <record model="survey.label" id="rrow_2_1_1">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">1</field>
+ <field name="value">Good pay</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_2">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">2</field>
+ <field name="value">Getting on with colleagues</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_3">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">3</field>
+ <field name="value">Office environment</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_4">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">4</field>
+ <field name="value">Desk space</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_5">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">5</field>
+ <field name="value">State of the art technology</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_6">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">6</field>
+ <field name="value">Office location</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_7">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">7</field>
+ <field name="value">Good management</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_8">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">8</field>
+ <field name="value">Freebies such as tea, coffee and stationery</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_9">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">9</field>
+ <field name="value">Perks such as free parking, gym passes</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_10">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">10</field>
+ <field name="value">No out of hours working</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_11">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">11</field>
+ <field name="value">Dress code</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_12">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">12</field>
+ <field name="value">Regular meetings</field>
+ </record>
+ <record model="survey.label" id="rrow_2_1_13">
+ <field name="question_id_2" ref="recruitment_3_1"/>
+ <field name="sequence">13</field>
+ <field name="value">Good social life</field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/hr_recruitment/test/recruitment_process.yml b/addons/hr_recruitment/test/recruitment_process.yml
index 8588e5c96e8..85abad2a9d6 100644
--- a/addons/hr_recruitment/test/recruitment_process.yml
+++ b/addons/hr_recruitment/test/recruitment_process.yml
@@ -48,16 +48,6 @@
!python {model: hr.applicant}: |
self.action_makeMeeting(cr, uid, [ref('hr_case_programmer')])
-
- Applicant fillup the answer of the interview quetion.
--
- !python {model: survey.question.wiz}: |
- ctx = context.copy()
- ctx.update({'active_model': 'hr.applicant', 'active_id': ref("hr_case_programmer"), 'active_ids': [ref("hr_case_programmer")], 'survey_id': ref("survey_job_0")})
- self.fields_view_get(cr, uid, ref("survey.view_survey_question_message"),"form", context=ctx)
- vals = self.default_get(cr, uid , [], context=ctx)
- self.create(cr, uid, vals, context=ctx)
- self.action_new_page(cr, uid, [ref("survey_job_0")], context=ctx)
--
I print Applicant fill up the interview quetion
-
!python {model: hr.applicant}: |
diff --git a/addons/hw_escpos/controllers/main.py b/addons/hw_escpos/controllers/main.py
index 938fa064d52..57fba3a4191 100644
--- a/addons/hw_escpos/controllers/main.py
+++ b/addons/hw_escpos/controllers/main.py
@@ -3,6 +3,7 @@ import commands
import logging
import simplejson
import os
+import os.path
import io
import base64
import openerp
@@ -11,6 +12,8 @@ import random
import math
import md5
import openerp.addons.hw_proxy.controllers.main as hw_proxy
+import pickle
+import re
import subprocess
import traceback
from threading import Thread, Lock
@@ -45,10 +48,58 @@ class EscposDriver(Thread):
self.lock = Lock()
self.status = {'status':'connecting', 'messages':[]}
+ def supported_devices(self):
+ if not os.path.isfile('escpos_devices.pickle'):
+ return supported_devices.device_list
+ else:
+ try:
+ f = open('escpos_devices.pickle','r')
+ return pickle.load(f)
+ f.close()
+ except Exception as e:
+ self.set_status('error',str(e))
+ return supported_devices.device_list
+
+ def add_supported_device(self,device_string):
+ r = re.compile('[0-9A-Fa-f]{4}:[0-9A-Fa-f]{4}');
+ match = r.search(device_string)
+ if match:
+ match = match.group().split(':')
+ vendor = int(match[0],16)
+ product = int(match[1],16)
+ name = device_string.split('ID')
+ if len(name) >= 2:
+ name = name[1]
+ else:
+ name = name[0]
+ _logger.info('ESC/POS: adding support for device: '+match[0]+':'+match[1]+' '+name)
+
+ device_list = supported_devices.device_list[:]
+ if os.path.isfile('escpos_devices.pickle'):
+ try:
+ f = open('escpos_devices.pickle','r')
+ device_list = pickle.load(f)
+ f.close()
+ except Exception as e:
+ self.set_status('error',str(e))
+ device_list.append({
+ 'vendor': vendor,
+ 'product': product,
+ 'name': name,
+ })
+
+ try:
+ f = open('escpos_devices.pickle','w+')
+ f.seek(0)
+ pickle.dump(device_list,f)
+ f.close()
+ except Exception as e:
+ self.set_status('error',str(e))
+
def connected_usb_devices(self):
connected = []
- for device in supported_devices.device_list:
+ for device in self.supported_devices():
if usb.core.find(idVendor=device['vendor'], idProduct=device['product']) != None:
connected.append(device)
return connected
@@ -83,8 +134,9 @@ class EscposDriver(Thread):
printer.cashdraw(5)
def set_status(self, status, message = None):
+ _logger.info(status+' : '+ (message or 'no message'))
if status == self.status['status']:
- if message != None and message != self.status['messages'][-1]:
+ if message != None and (len(self.status['messages']) == 0 or message != self.status['messages'][-1]):
self.status['messages'].append(message)
else:
self.status['status'] = status
@@ -307,7 +359,22 @@ class EscposProxy(hw_proxy.Proxy):
driver.push_task('receipt',receipt)
@http.route('/hw_proxy/print_xml_receipt', type='json', auth='none', cors='*')
- def print_receipt(self, receipt):
+ def print_xml_receipt(self, receipt):
_logger.info('ESC/POS: PRINT XML RECEIPT')
driver.push_task('xml_receipt',receipt)
+
+ @http.route('/hw_proxy/escpos/add_supported_device', type='http', auth='none', cors='*')
+ def add_supported_device(self, device_string):
+ _logger.info('ESC/POS: ADDED NEW DEVICE:'+device_string)
+ driver.add_supported_device(device_string)
+ return "The device:\n"+device_string+"\n has been added to the list of supported devices.<br/><a href='/hw_proxy/status'>Ok</a>"
+
+ @http.route('/hw_proxy/escpos/reset_supported_devices', type='http', auth='none', cors='*')
+ def reset_supported_devices(self):
+ try:
+ os.remove('escpos_devices.pickle')
+ except Exception as e:
+ pass
+ return 'The list of supported devices has been reset to factory defaults.<br/><a href="/hw_proxy/status">Ok</a>'
+
diff --git a/addons/hw_proxy/controllers/main.py b/addons/hw_proxy/controllers/main.py
index 9e94e4817a4..ea9b45c1b35 100644
--- a/addons/hw_proxy/controllers/main.py
+++ b/addons/hw_proxy/controllers/main.py
@@ -97,6 +97,22 @@ class Proxy(http.Controller):
device_name = device[device.find('ID')+2:]
resp+= "<div class='device' data-device='"+device+"'>"+device_name+"</div>\n"
resp += "</div>\n"
+ resp += """
+ <h2>Add New Printer</h2>
+ <p>
+ Copy and paste your printer's device description in the form below. You can find
+ your printer's description in the device list above. If you find that your printer works
+ well, please send your printer's description to <a href='mailto:support@openerp.com'>
+ support@openerp.com</a> so that we can add it to the default list of supported devices.
+ </p>
+ <form action='/hw_proxy/escpos/add_supported_device' method='GET'>
+ <input type='text' style='width:400px' name='device_string' placeholder='123a:b456 Sample Device description' />
+ <input type='submit' value='submit' />
+ </form>
+ <h2>Reset To Defaults</h2>
+ <p>If the added devices cause problems, you can <a href='/hw_proxy/escpos/reset_supported_devices'>Reset the
+ device list to factory default.</a> This operation cannot be undone.</p>
+ """
resp += "</body>\n</html>\n\n"
return request.make_response(resp,{
diff --git a/addons/idea/models/idea.py b/addons/idea/models/idea.py
index 61934cfc3b2..37fbbe82e1c 100644
--- a/addons/idea/models/idea.py
+++ b/addons/idea/models/idea.py
@@ -91,7 +91,7 @@ class IdeaIdea(osv.Model):
# Technical stuff
#------------------------------------------------------
- def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
+ def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
""" Override read_group to always display all states. """
if groupby and groupby[0] == "state":
# Default result structure
@@ -103,7 +103,7 @@ class IdeaIdea(osv.Model):
'state_count': 0,
} for state_value, state_name in states]
# Get standard results
- read_group_res = super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby)
+ read_group_res = super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby, lazy)
# Update standard results with default results
result = []
for state_value, state_name in states:
@@ -114,7 +114,7 @@ class IdeaIdea(osv.Model):
result.append(res[0])
return result
else:
- return super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
+ return super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby, lazy=lazy)
#------------------------------------------------------
# Workflow / Actions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css
index aef0131346a..0abd8ab1b4e 100644
--- a/addons/mail/static/src/css/mail.css
+++ b/addons/mail/static/src/css/mail.css
@@ -664,13 +664,9 @@
.openerp .oe_followers .oe_partner .oe_hidden{
display: none;
}
-.openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title{
- padding-right: 20px;
-}
.openerp .oe_followers .oe_show_more{
cursor: pointer;
}
-
/* ---------------- MESSAGES BODY ------------------ */
.openerp .oe_mail .oe_msg_content .oe_blockquote,
.openerp .oe_mail .oe_msg_content blockquote {
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index 04f01efb8af..bf83fe6d7c6 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -94,19 +94,17 @@ openerp_mail_followers = function(session, mail) {
var $currentTarget = $(event.currentTarget);
var user_pid = $currentTarget.data('id');
$('div.oe_edit_actions').remove();
- self.$dialog = new session.web.dialog($('<div class="oe_edit_actions">'), {
- modal: true,
- width: 'auto',
- height: 'auto',
+ self.$dialog = new session.web.Dialog(this, {
+ size: 'small',
title: _t('Edit Subscription of ') + $currentTarget.siblings('a').text(),
buttons: [
{ text: _t("Apply"), click: function() {
self.do_update_subscription(event, user_pid);
- $(this).dialog("close");
+ this.parents('.modal').modal('hide');
}},
- { text: _t("Cancel"), click: function() { $(this).dialog("close"); }}
+ { text: _t("Cancel"), click: function() { this.parents('.modal').modal('hide'); }}
],
- });
+ }, "<div class='oe_edit_actions'>").open();
return self.fetch_subtypes(user_pid);
},
@@ -272,7 +270,7 @@ openerp_mail_followers = function(session, mail) {
display_subtypes:function (data, id, dialog) {
var self = this;
if (dialog) {
- var $list = self.$dialog;
+ var $list = self.$dialog.$el;
}
else {
var $list = this.$('.oe_subtype_list ul');
diff --git a/addons/note/note.py b/addons/note/note.py
index 7f03f43b36a..38b2395a852 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -116,7 +116,7 @@ class note_note(osv.osv):
}
_order = 'sequence'
- def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
+ def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
if groupby and groupby[0]=="stage_id":
#search all stages
@@ -169,7 +169,7 @@ class note_note(osv.osv):
else:
return super(note_note, self).read_group(self, cr, uid, domain, fields, groupby,
- offset=offset, limit=limit, context=context, orderby=orderby)
+ offset=offset, limit=limit, context=context, orderby=orderby,lazy=lazy)
#upgrade config setting page to configure pad, fancy and tags mode
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js
index d3a6394ee5d..cf6768e0f1f 100644
--- a/addons/pad/static/src/js/pad.js
+++ b/addons/pad/static/src/js/pad.js
@@ -13,6 +13,7 @@ openerp.pad = function(instance) {
event.preventDefault();
self.set("configured", true);
});
+ this.pad_loading_request = null;
},
initialize_content: function() {
var self = this;
@@ -30,14 +31,14 @@ openerp.pad = function(instance) {
},
render_value: function() {
var self = this;
- this._configured_deferred.always(function() {
+ $.when(this._configured_deferred, this.pad_loading_request).always(function() {
if (! self.get('configured')) {
return;
};
var value = self.get('value');
if (self.get('effective_readonly')) {
if (_.str.startsWith(value, 'http')) {
- this.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) {
+ self.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) {
self.$('.oe_pad_content').removeClass('oe_pad_loading').html('<div class="oe_pad_readonly"><div>');
self.$('.oe_pad_readonly').html(data);
}).fail(function() {
diff --git a/addons/payment/__openerp__.py b/addons/payment/__openerp__.py
index bc5d3896ac2..c192bec7c1b 100644
--- a/addons/payment/__openerp__.py
+++ b/addons/payment/__openerp__.py
@@ -7,11 +7,12 @@
'version': '1.0',
'description': """Payment Acquirer Base Module""",
'author': 'OpenERP SA',
- 'depends': ['mail', 'account'],
+ 'depends': ['account'],
'data': [
'views/payment_acquirer.xml',
'views/res_config_view.xml',
'security/ir.model.access.csv',
],
'installable': True,
+ 'auto_install': True,
}
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 4946a71f80b..c547a611cd4 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -118,6 +118,7 @@
</div>
<field name="company_id" groups="base.group_multi_company" widget="selection"
attrs="{'invisible': [('is_only_child', '=', False)]}"/>
+ <field name="active" />
</group>
</group>
<field name="description" placeholder="describe the product characteristics..."
diff --git a/addons/sale_order_dates/__openerp__.py b/addons/sale_order_dates/__openerp__.py
index 3fa9fba0ecf..1f4eb399dd8 100644
--- a/addons/sale_order_dates/__openerp__.py
+++ b/addons/sale_order_dates/__openerp__.py
@@ -22,7 +22,7 @@
{
'name': 'Dates on Sales Order',
- 'version': '1.0',
+ 'version': '1.1',
'category': 'Sales Management',
'description': """
Add additional date information to the sales order.
@@ -30,7 +30,7 @@ Add additional date information to the sales order.
You can add the following additional dates to a sales order:
------------------------------------------------------------
- * Requested Date
+ * Requested Date (will be used as the expected date on pickings)
* Commitment Date
* Effective Date
""",
@@ -40,7 +40,7 @@ You can add the following additional dates to a sales order:
'depends': ['sale_stock'],
'data': ['sale_order_dates_view.xml'],
'demo': [],
- 'test': [],
+ 'test': ['test/requested_date.yml'],
'installable': True,
'auto_install': False,
}
diff --git a/addons/sale_order_dates/i18n/sale_order_dates.pot b/addons/sale_order_dates/i18n/sale_order_dates.pot
index 8a45a8a46af..b34c1143ec0 100644
--- a/addons/sale_order_dates/i18n/sale_order_dates.pot
+++ b/addons/sale_order_dates/i18n/sale_order_dates.pot
@@ -32,12 +32,14 @@ msgstr ""
#. module: sale_order_dates
#: help:sale.order,effective_date:0
-msgid "Date on which picking is created."
+msgid "Date on which the first Delivery Order was created."
msgstr ""
#. module: sale_order_dates
#: help:sale.order,requested_date:0
-msgid "Date requested by the customer for the sale."
+msgid "Date by which the customer has requested the items to be delivered.\n"
+"When this Order gets confirmed, the Delivery Order's expected date will be computed based on this date and the Company's Security Delay.\n"
+"Leave this field empty if you want the Delivery Order to be processed as soon as possible. In that case the expected date will be computed using the default method: based on the Product Lead Times and the Company's Security Delay."
msgstr ""
#. module: sale_order_dates
@@ -52,6 +54,18 @@ msgstr ""
#. module: sale_order_dates
#: help:sale.order,commitment_date:0
-msgid "Committed date for delivery."
+msgid "Date by which the products are sure to be delivered. This is a date that you can promise to the customer, based on the Product Lead Times."
+msgstr ""
+
+#. module: sale_order_dates
+#: code:addons/sale_order_dates/sale_order_dates.py:90
+#, python-format
+msgid "Requested date is too soon!"
+msgstr ""
+
+#. module: sale_order_dates
+#: code:addons/sale_order_dates/sale_order_dates.py:91
+#, python-format
+msgid "The date requested by the customer is sooner than the commitment date. You may be unable to honor the customer's request."
msgstr ""
diff --git a/addons/sale_order_dates/sale_order_dates.py b/addons/sale_order_dates/sale_order_dates.py
index 64b939de088..f3ff971be9f 100644
--- a/addons/sale_order_dates/sale_order_dates.py
+++ b/addons/sale_order_dates/sale_order_dates.py
@@ -19,15 +19,37 @@
#
##############################################################################
-from datetime import datetime
-from dateutil.relativedelta import relativedelta
+from datetime import datetime, timedelta
from openerp.osv import fields, osv
+from openerp.tools.translate import _
+from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
class sale_order_dates(osv.osv):
+ """Add several date fields to Sale Orders, computed or user-entered"""
_inherit = 'sale.order'
+ def copy(self, cr, uid, id, default=None, context=None):
+ """Don't copy the requested date along with the Sales Order"""
+ default = dict(default or {}, requested_date=False)
+ return super(sale_order_dates, self).copy(cr, uid, id, default=default,
+ context=context)
+
+ def _get_date_planned(self, cr, uid, order, line, start_date, context=None):
+ """Compute the expected date from the requested date, not the order date"""
+ if order and order.requested_date:
+ planned_str = self.date_to_datetime(cr, uid,
+ order.requested_date, context)
+ date_planned = datetime.strptime(planned_str,
+ DEFAULT_SERVER_DATETIME_FORMAT)
+ date_planned -= timedelta(days=order.company_id.security_lead)
+ return date_planned.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
+ return super(sale_order_dates, self)._get_date_planned(
+ cr, uid, order, line, start_date, context=context)
+
def _get_effective_date(self, cr, uid, ids, name, arg, context=None):
+ """Read the shipping date from the related packings"""
+ # TODO: would be better if it returned the date the picking was processed?
res = {}
dates_list = []
for order in self.browse(cr, uid, ids, context=context):
@@ -41,22 +63,57 @@ class sale_order_dates(osv.osv):
return res
def _get_commitment_date(self, cr, uid, ids, name, arg, context=None):
+ """Compute the commitment date"""
res = {}
dates_list = []
for order in self.browse(cr, uid, ids, context=context):
+ order_datetime_str = self.date_to_datetime(cr, uid, order.date_order,
+ context)
+ order_datetime = datetime.strptime(order_datetime_str,
+ DEFAULT_SERVER_DATETIME_FORMAT)
dates_list = []
for line in order.order_line:
- dt = datetime.strptime(order.date_order, '%Y-%m-%d') + relativedelta(days=line.delay or 0.0)
- dt_s = dt.strftime('%Y-%m-%d')
+ dt = order_datetime + timedelta(days=line.delay or 0.0)
+ dt_s = dt.strftime(DEFAULT_SERVER_DATE_FORMAT)
dates_list.append(dt_s)
if dates_list:
res[order.id] = min(dates_list)
return res
+ def onchange_requested_date(self, cr, uid, ids, requested_date,
+ commitment_date, context=None):
+ """Warn if the requested dates is sooner than the commitment date"""
+ if (requested_date and commitment_date
+ and requested_date < commitment_date):
+ return {'warning': {
+ 'title': _('Requested date is too soon!'),
+ 'message': _("The date requested by the customer is "
+ "sooner than the commitment date. You may be "
+ "unable to honor the customer's request.")
+ }
+ }
+ return {}
+
_columns = {
- 'commitment_date': fields.function(_get_commitment_date, store=True, type='date', string='Commitment Date', help="Committed date for delivery."),
- 'requested_date': fields.date('Requested Date', help="Date requested by the customer for the sale."),
- 'effective_date': fields.function(_get_effective_date, type='date', store=True, string='Effective Date',help="Date on which picking is created."),
+ 'commitment_date': fields.function(_get_commitment_date, store=True,
+ type='date', string='Commitment Date',
+ help="Date by which the products are sure to be delivered. This is "
+ "a date that you can promise to the customer, based on the "
+ "Product Lead Times."),
+ 'requested_date': fields.date('Requested Date',
+ readonly=True, states={'draft': [('readonly', False)]},
+ help="Date by which the customer has requested the items to be "
+ "delivered.\n"
+ "When this Order gets confirmed, the Delivery Order's "
+ "expected date will be computed based on this date and the "
+ "Company's Security Delay.\n"
+ "Leave this field empty if you want the Delivery Order to be "
+ "processed as soon as possible. In that case the expected "
+ "date will be computed using the default method: based on "
+ "the Product Lead Times and the Company's Security Delay."),
+ 'effective_date': fields.function(_get_effective_date, type='date',
+ store=True, string='Effective Date',
+ help="Date on which the first Delivery Order was created."),
}
diff --git a/addons/sale_order_dates/sale_order_dates_view.xml b/addons/sale_order_dates/sale_order_dates_view.xml
index 68419cd29bb..cc216ddd9b9 100644
--- a/addons/sale_order_dates/sale_order_dates_view.xml
+++ b/addons/sale_order_dates/sale_order_dates_view.xml
@@ -10,13 +10,23 @@
<group name="sale_pay" position="after">
<group colspan="2" col="2" >
<separator string="Dates" colspan="2"/>
- <field name="requested_date"/>
+ <field name="requested_date" on_change="onchange_requested_date(requested_date, commitment_date)"/>
<field name="commitment_date"/>
<field name="effective_date"/>
</group>
</group>
</field>
</record>
+ <record id="view_order_tree_date" model="ir.ui.view">
+ <field name="model">sale.order</field>
+ <field name="inherit_id" ref="sale.view_order_tree"/>
+ <field name="arch" type="xml">
+ <field name="date_order" position="after">
+ <field name="requested_date"/>
+ <field name="commitment_date"/>
+ </field>
+ </field>
+ </record>
</data>
</openerp>
diff --git a/addons/sale_order_dates/test/requested_date.yml b/addons/sale_order_dates/test/requested_date.yml
new file mode 100644
index 00000000000..d05191a4d99
--- /dev/null
+++ b/addons/sale_order_dates/test/requested_date.yml
@@ -0,0 +1,32 @@
+-
+ In order to test the Requested Date feature in Sale Orders in OpenERP,
+ I update a demo Sale Order with Requested Date on 2010-12-17
+-
+ !python {model: sale.order}: |
+ self.write(cr, uid, ref("sale.sale_order_6"), {'requested_date': '2010-07-12'})
+-
+ I confirm the Sale Order.
+-
+ !workflow {
+ model: sale.order, action: order_confirm,
+ ref: sale.sale_order_6
+ }
+-
+ I verify that the Procurements and Stock Moves have been generated with the
+ correct date
+-
+ !python {model: sale.order}: |
+ from datetime import datetime, timedelta
+ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
+
+ so = self.browse(cr, uid, ref("sale.sale_order_6"))
+ security_delay = timedelta(days=so.company_id.security_lead)
+ requested_date = datetime.strptime(
+ self.date_to_datetime(cr, uid, so.requested_date),
+ DEFAULT_SERVER_DATETIME_FORMAT)
+ right_date = (requested_date - security_delay).strftime(
+ DEFAULT_SERVER_DATETIME_FORMAT)
+ for line in so.order_line:
+ assert line.procurement_id, "No Procurement was created"
+ assert line.procurement_id.date_planned == right_date, "The planned date for the Procurement Order is wrong"
+ assert line.procurement_id.move_id.date_expected == right_date, "The expected date for the Stock Move is wrong"
diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py
index 26d9d80f13e..f90aecac184 100644
--- a/addons/sale_stock/sale_stock.py
+++ b/addons/sale_stock/sale_stock.py
@@ -21,7 +21,6 @@
##############################################################################
from datetime import datetime, timedelta
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, DATETIME_FORMATS_MAP, float_compare
-from dateutil.relativedelta import relativedelta
from openerp.osv import fields, osv
from openerp.tools.translate import _
import pytz
@@ -257,7 +256,7 @@ class sale_order(osv.osv):
if tz_name:
utc = pytz.timezone('UTC')
context_tz = pytz.timezone(tz_name)
- user_datetime = user_date + relativedelta(hours=12.0)
+ user_datetime = user_date + timedelta(hours=12.0)
local_timestamp = context_tz.localize(user_datetime, is_dst=False)
user_datetime = local_timestamp.astimezone(utc)
return user_datetime.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
@@ -379,8 +378,9 @@ class sale_order(osv.osv):
return True
def _get_date_planned(self, cr, uid, order, line, start_date, context=None):
+ """Compute the Stock Move date for the Sale Order Line"""
start_date = self.date_to_datetime(cr, uid, start_date, context)
- date_planned = datetime.strptime(start_date, DEFAULT_SERVER_DATETIME_FORMAT) + relativedelta(days=line.delay or 0.0)
+ date_planned = datetime.strptime(start_date, DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(days=line.delay or 0.0)
date_planned = (date_planned - timedelta(days=order.company_id.security_lead)).strftime(DEFAULT_SERVER_DATETIME_FORMAT)
return date_planned
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index 11f970d6ddb..2efd1c8acbe 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -82,7 +82,6 @@
<div attrs="{'invisible':[('type','=','service')]}">
<field name="produce_delay" class="oe_inline"/> days
</div>
- <field name="active"/>
</group>
</group>
<xpath expr="//group[@string='Sale Conditions']" position="inside">
diff --git a/addons/survey/__init__.py b/addons/survey/__init__.py
index 065d64a87e2..0f961ebd110 100644
--- a/addons/survey/__init__.py
+++ b/addons/survey/__init__.py
@@ -20,7 +20,5 @@
##############################################################################
import survey
+import controllers
import wizard
-import report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/__openerp__.py b/addons/survey/__openerp__.py
index d5e4c3af10c..72b11b0d78b 100644
--- a/addons/survey/__openerp__.py
+++ b/addons/survey/__openerp__.py
@@ -21,44 +21,39 @@
{
'name': 'Survey',
- 'version': '1.0',
- 'category': 'Tools',
+ 'version': '2.0',
+ 'category': 'Marketing',
'description': """
-This module is used for surveying.
-==================================
+Create beautiful web surveys and visualize answers
+==================================================
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.
+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 personal token for the invitation of the survey.
""",
+ 'summary': 'Create surveys, collect answers and print statistics',
'author': 'OpenERP SA',
- 'depends': ['mail'],
+ 'website': 'https://www.openerp.com/apps/survey/',
+ 'depends': ['email_template', 'mail', 'website', 'marketing'],
'data': [
- 'survey_report.xml',
- 'survey_data.xml',
- 'wizard/survey_selection.xml',
- 'wizard/survey_answer.xml',
'security/survey_security.xml',
'security/ir.model.access.csv',
- 'survey_view.xml',
- 'wizard/survey_print_statistics.xml',
- 'wizard/survey_print_answer.xml',
- 'wizard/survey_browse_answer.xml',
- 'wizard/survey_print.xml',
- 'wizard/survey_send_invitation.xml'
- ],
- 'demo': ['survey_demo.xml'],
- 'test': [
- 'test/draft2open2close_survey.yml',
- 'test/draft2open2close_request.yml',
- 'test/survey_question_type.yml',
- 'test/survey_report.yml',
+ 'views/survey_views.xml',
+ 'views/survey_templates.xml',
+ 'views/survey_result.xml',
+ 'wizard/survey_email_compose_message.xml',
+ 'data/survey_stages.xml',
+ 'data/survey_cron.xml'
],
+ 'demo': ['data/survey_demo_user.xml',
+ 'data/survey_demo_feedback.xml',
+ 'data/survey.user_input.csv',
+ 'data/survey.user_input_line.csv'],
'installable': True,
'auto_install': False,
- 'images': ['images/survey_answers.jpeg','images/survey_pages.jpeg','images/surveys.jpeg'],
- 'css': ['static/src/css/survey.css','static/css/survey.css'],
+ 'application': True,
+ 'sequence': 10,
+ 'images': [],
}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/report/__init__.py b/addons/survey/controllers/__init__.py
index 26fc1d46d63..672df6ec1f9 100644
--- a/addons/survey/report/__init__.py
+++ b/addons/survey/controllers/__init__.py
@@ -2,13 +2,12 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
-# $Id$
+# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# 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.
+# 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
@@ -20,8 +19,4 @@
#
##############################################################################
-import survey_analysis_report
-import survey_form
-import survey_browse_response
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+import main
diff --git a/addons/survey/controllers/main.py b/addons/survey/controllers/main.py
new file mode 100644
index 00000000000..a937cd0e826
--- /dev/null
+++ b/addons/survey/controllers/main.py
@@ -0,0 +1,356 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
+#
+# 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 json
+import logging
+import werkzeug
+from datetime import datetime
+from math import ceil
+
+from openerp import SUPERUSER_ID
+from openerp.addons.web import http
+from openerp.addons.web.http import request
+from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT as DTF
+from openerp.tools.safe_eval import safe_eval
+
+
+_logger = logging.getLogger(__name__)
+
+
+class WebsiteSurvey(http.Controller):
+
+ ## HELPER METHODS ##
+
+ def _check_bad_cases(self, cr, uid, request, survey_obj, survey, user_input_obj, context=None):
+ # In case of bad survey, redirect to surveys list
+ if survey_obj.exists(cr, SUPERUSER_ID, survey.id, context=context) == []:
+ return werkzeug.utils.redirect("/survey/")
+
+ # In case of auth required, block public user
+ if survey.auth_required and uid == request.registry['website'].get_public_user(cr, uid, context):
+ return request.website.render("website.403")
+
+ # In case of non open surveys
+ if survey.stage_id.closed:
+ return request.website.render("survey.notopen")
+
+ # If there is no pages
+ if not survey.page_ids:
+ return request.website.render("survey.nopages")
+
+ # Everything seems to be ok
+ return None
+
+ def _check_deadline(self, cr, uid, user_input, context=None):
+ '''Prevent opening of the survey if the deadline has turned out
+
+ ! This will NOT disallow access to users who have already partially filled the survey !'''
+ if user_input.deadline:
+ dt_deadline = datetime.strptime(user_input.deadline, DTF)
+ dt_now = datetime.now()
+ if dt_now > dt_deadline: # survey is not open anymore
+ return request.website.render("survey.notopen")
+
+ return None
+
+ ## ROUTES HANDLERS ##
+
+ # Survey start
+ @http.route(['/survey/start/<model("survey.survey"):survey>',
+ '/survey/start/<model("survey.survey"):survey>/<string:token>'],
+ type='http', auth='public', multilang=True, website=True)
+ def start_survey(self, survey, token=None, **post):
+ cr, uid, context = request.cr, request.uid, request.context
+ survey_obj = request.registry['survey.survey']
+ user_input_obj = request.registry['survey.user_input']
+
+ # Test mode
+ if token and token == "phantom":
+ _logger.info("[survey] Phantom mode")
+ user_input_id = user_input_obj.create(cr, uid, {'survey_id': survey.id, 'test_entry': True}, context=context)
+ user_input = user_input_obj.browse(cr, uid, [user_input_id], context=context)[0]
+ data = {'survey': survey, 'page': None, 'token': user_input.token}
+ return request.website.render('survey.survey_init', data)
+ # END Test mode
+
+ # Controls if the survey can be displayed
+ errpage = self._check_bad_cases(cr, uid, request, survey_obj, survey, user_input_obj, context=context)
+ if errpage:
+ return errpage
+
+ # Manual surveying
+ if not token:
+ user_input_id = user_input_obj.create(cr, uid, {'survey_id': survey.id}, context=context)
+ user_input = user_input_obj.browse(cr, uid, [user_input_id], context=context)[0]
+ else:
+ try:
+ user_input_id = user_input_obj.search(cr, uid, [('token', '=', token)], context=context)[0]
+ except IndexError: # Invalid token
+ return request.website.render("website.403")
+ else:
+ user_input = user_input_obj.browse(cr, uid, [user_input_id], context=context)[0]
+
+ # Do not open expired survey
+ errpage = self._check_deadline(cr, uid, user_input, context=context)
+ if errpage:
+ return errpage
+
+ # Select the right page
+ if user_input.state == 'new': # Intro page
+ data = {'survey': survey, 'page': None, 'token': user_input.token}
+ return request.website.render('survey.survey_init', data)
+ else:
+ return request.redirect('/survey/fill/%s/%s' % (survey.id, user_input.token))
+
+ # Survey displaying
+ @http.route(['/survey/fill/<model("survey.survey"):survey>/<string:token>',
+ '/survey/fill/<model("survey.survey"):survey>/<string:token>/<string:prev>'],
+ type='http', auth='public', multilang=True, website=True)
+ def fill_survey(self, survey, token, prev=None, **post):
+ '''Display and validates a survey'''
+ cr, uid, context = request.cr, request.uid, request.context
+ survey_obj = request.registry['survey.survey']
+ user_input_obj = request.registry['survey.user_input']
+
+ # Controls if the survey can be displayed
+ errpage = self._check_bad_cases(cr, uid, request, survey_obj, survey, user_input_obj, context=context)
+ if errpage:
+ return errpage
+
+ # Load the user_input
+ try:
+ user_input_id = user_input_obj.search(cr, uid, [('token', '=', token)])[0]
+ except IndexError: # Invalid token
+ return request.website.render("website.403")
+ else:
+ user_input = user_input_obj.browse(cr, uid, [user_input_id], context=context)[0]
+
+ # Do not display expired survey (even if some pages have already been
+ # displayed -- There's a time for everything!)
+ errpage = self._check_deadline(cr, uid, user_input, context=context)
+ if errpage:
+ return errpage
+
+ # Select the right page
+ if user_input.state == 'new': # First page
+ page, page_nr, last = survey_obj.next_page(cr, uid, user_input, 0, go_back=False, context=context)
+ data = {'survey': survey, 'page': page, 'page_nr': page_nr, 'token': user_input.token}
+ if last:
+ data.update({'last': True})
+ return request.website.render('survey.survey', data)
+ elif user_input.state == 'done': # Display success message
+ return request.website.render('survey.sfinished', {'survey': survey,
+ 'token': token,
+ 'user_input': user_input})
+ elif user_input.state == 'skip':
+ flag = (True if prev and prev == 'prev' else False)
+ page, page_nr, last = survey_obj.next_page(cr, uid, user_input, user_input.last_displayed_page_id.id, go_back=flag, context=context)
+ data = {'survey': survey, 'page': page, 'page_nr': page_nr, 'token': user_input.token}
+ if last:
+ data.update({'last': True})
+ return request.website.render('survey.survey', data)
+ else:
+ return request.website.render("website.403")
+
+ # AJAX prefilling of a survey
+ @http.route(['/survey/prefill/<model("survey.survey"):survey>/<string:token>',
+ '/survey/prefill/<model("survey.survey"):survey>/<string:token>/<model("survey.page"):page>'],
+ type='http', auth='public', multilang=True, website=True)
+ def prefill(self, survey, token, page=None, **post):
+ cr, uid, context = request.cr, request.uid, request.context
+ user_input_line_obj = request.registry['survey.user_input_line']
+ ret = {}
+
+ # Fetch previous answers
+ if page:
+ ids = user_input_line_obj.search(cr, uid, [('user_input_id.token', '=', token), ('page_id', '=', page.id)], context=context)
+ else:
+ ids = user_input_line_obj.search(cr, uid, [('user_input_id.token', '=', token)], context=context)
+ previous_answers = user_input_line_obj.browse(cr, uid, ids, context=context)
+
+ # Return non empty answers in a JSON compatible format
+ for answer in previous_answers:
+ if not answer.skipped:
+ answer_tag = '%s_%s_%s' % (answer.survey_id.id, answer.page_id.id, answer.question_id.id)
+ answer_value = None
+ if answer.answer_type == 'free_text':
+ answer_value = answer.value_free_text
+ elif answer.answer_type == 'text' and answer.question_id.type == 'textbox':
+ answer_value = answer.value_text
+ elif answer.answer_type == 'text' and answer.question_id.type != 'textbox':
+ # here come comment answers for matrices, simple choice and multiple choice
+ answer_tag = "%s_%s" % (answer_tag, 'comment')
+ answer_value = answer.value_text
+ elif answer.answer_type == 'number':
+ answer_value = answer.value_number.__str__()
+ elif answer.answer_type == 'date':
+ answer_value = answer.value_date
+ elif answer.answer_type == 'suggestion' and not answer.value_suggested_row:
+ answer_value = answer.value_suggested.id
+ elif answer.answer_type == 'suggestion' and answer.value_suggested_row:
+ answer_tag = "%s_%s" % (answer_tag, answer.value_suggested_row.id)
+ answer_value = answer.value_suggested.id
+ if answer_value:
+ dict_soft_update(ret, answer_tag, answer_value)
+ else:
+ _logger.warning("[survey] No answer has been found for question %s marked as non skipped" % answer_tag)
+ return json.dumps(ret)
+
+ # AJAX submission of a page
+ @http.route(['/survey/submit/<model("survey.survey"):survey>'],
+ type='http', auth='public', multilang=True, website=True)
+ def submit(self, survey, **post):
+ _logger.debug('Incoming data: %s', post)
+ page_id = int(post['page_id'])
+ cr, uid, context = request.cr, request.uid, request.context
+ survey_obj = request.registry['survey.survey']
+ questions_obj = request.registry['survey.question']
+ questions_ids = questions_obj.search(cr, uid, [('page_id', '=', page_id)], context=context)
+ questions = questions_obj.browse(cr, uid, questions_ids, context=context)
+
+ # Answer validation
+ errors = {}
+ for question in questions:
+ answer_tag = "%s_%s_%s" % (survey.id, page_id, question.id)
+ errors.update(questions_obj.validate_question(cr, uid, question, post, answer_tag, context=context))
+
+ ret = {}
+ if (len(errors) != 0):
+ # Return errors messages to webpage
+ ret['errors'] = errors
+ else:
+ # Store answers into database
+ user_input_obj = request.registry['survey.user_input']
+
+ user_input_line_obj = request.registry['survey.user_input_line']
+ try:
+ user_input_id = user_input_obj.search(cr, uid, [('token', '=', post['token'])], context=context)[0]
+ except KeyError: # Invalid token
+ return request.website.render("website.403")
+ for question in questions:
+ answer_tag = "%s_%s_%s" % (survey.id, page_id, question.id)
+ user_input_line_obj.save_lines(cr, uid, user_input_id, question, post, answer_tag, context=context)
+
+ user_input = user_input_obj.browse(cr, uid, user_input_id, context=context)
+ go_back = post['button_submit'] == 'previous'
+ next_page, _, last = survey_obj.next_page(cr, uid, user_input, page_id, go_back=go_back, context=context)
+ vals = {'last_displayed_page_id': page_id}
+ if next_page is None and not go_back:
+ vals.update({'state': 'done'})
+ else:
+ vals.update({'state': 'skip'})
+ user_input_obj.write(cr, uid, user_input_id, vals, context=context)
+ ret['redirect'] = '/survey/fill/%s/%s' % (survey.id, post['token'])
+ if go_back:
+ ret['redirect'] += '/prev'
+ return json.dumps(ret)
+
+ # Printing routes
+ @http.route(['/survey/print/<model("survey.survey"):survey>',
+ '/survey/print/<model("survey.survey"):survey>/<string:token>'],
+ type='http', auth='user', multilang=True, website=True)
+ def print_survey(self, survey, token=None, **post):
+ '''Display an survey in printable view; if <token> is set, it will
+ grab the answers of the user_input_id that has <token>.'''
+ return request.website.render('survey.survey_print',
+ {'survey': survey,
+ 'token': token,
+ 'page_nr': 0})
+
+ @http.route(['/survey/results/<model("survey.survey"):survey>'],
+ type='http', auth='user', multilang=True, website=True)
+ def survey_reporting(self, survey, token=None, **post):
+ '''Display survey Results & Statistics for given survey.'''
+ result_template, current_filters, filter_display_data, filter_finish = 'survey.result', [], [], False
+ survey_obj = request.registry['survey.survey']
+ if not survey.user_input_ids or not [input_id.id for input_id in survey.user_input_ids if input_id.state != 'new']:
+ result_template = 'survey.no_result'
+ if 'finished' in post:
+ post.pop('finished')
+ filter_finish = True
+ if post or filter_finish:
+ filter_data = self.get_filter_data(post)
+ current_filters = survey_obj.filter_input_ids(request.cr, request.uid, filter_data, filter_finish, context=request.context)
+ filter_display_data = survey_obj.get_filter_display_data(request.cr, request.uid, filter_data, context=request.context)
+ return request.website.render(result_template,
+ {'survey_dict': self.prepare_result_dict(survey, current_filters),
+ 'page_range': self.page_range,
+ 'current_filters': current_filters,
+ 'filter_display_data': filter_display_data,
+ 'filter_finish': filter_finish
+ })
+
+ def prepare_result_dict(self,survey, current_filters=[]):
+ """Returns dictionary having values for rendering template"""
+ survey_obj = request.registry['survey.survey']
+ result = {'survey':survey, 'page_ids': []}
+ for page in survey.page_ids:
+ page_dict = {'page': page, 'question_ids': []}
+ for question in page.question_ids:
+ question_dict = {'question':question, 'input_summary':survey_obj.get_input_summary(request.cr, request.uid, question, current_filters, context=request.context), 'prepare_result':survey_obj.prepare_result(request.cr, request.uid, question, current_filters, context=request.context), 'graph_data': self.get_graph_data(question, current_filters)}
+ page_dict['question_ids'].append(question_dict)
+ result['page_ids'].append(page_dict)
+ return result
+
+ def get_filter_data(self, post):
+ """Returns data used for filtering the result"""
+ filters = []
+ for ids in post:
+ #if user add some random data in query URI, ignore it
+ try:
+ row_id, answer_id = ids.split(',')
+ filters.append({'row_id': int(row_id), 'answer_id': int(answer_id)})
+ except:
+ return filters
+ return filters
+
+ def page_range(self, total_record, limit):
+ '''Returns number of pages required for pagination'''
+ total = ceil(total_record / float(limit))
+ return range(1, int(total + 1))
+
+ def get_graph_data(self, question, current_filters=[]):
+ '''Returns formatted data required by graph library on basis of filter'''
+ survey_obj = request.registry['survey.survey']
+ result = []
+ if question.type == 'multiple_choice':
+ result.append({'key': str(question.question),
+ 'values': survey_obj.prepare_result(request.cr, request.uid, question, current_filters, context=request.context)})
+ if question.type == 'simple_choice':
+ result = survey_obj.prepare_result(request.cr, request.uid, question, current_filters, context=request.context)
+ if question.type == 'matrix':
+ data = survey_obj.prepare_result(request.cr, request.uid, question, current_filters, context=request.context)
+ for answer in data['answers']:
+ values = []
+ for res in data['result']:
+ if res[1] == answer:
+ values.append({'text': data['rows'][res[0]], 'count': data['result'][res]})
+ result.append({'key': data['answers'].get(answer), 'values': values})
+ return json.dumps(result)
+
+def dict_soft_update(dictionary, key, value):
+ ''' Insert the pair <key>: <value> into the <dictionary>. If <key> is
+ already present, this function will append <value> to the list of
+ existing data (instead of erasing it) '''
+ if key in dictionary:
+ dictionary[key].append(value)
+ else:
+ dictionary.update({key: [value]})
diff --git a/addons/survey/data/survey.user_input.csv b/addons/survey/data/survey.user_input.csv
new file mode 100644
index 00000000000..7af2096bb88
--- /dev/null
+++ b/addons/survey/data/survey.user_input.csv
@@ -0,0 +1,7 @@
+id,survey_id:id,state
+ui1,feedback_form,done
+ui2,feedback_form,done
+ui3,feedback_form,done
+ui4,feedback_form,skip
+ui5,feedback_form,skip
+ui6,feedback_form,new
diff --git a/addons/survey/data/survey.user_input_line.csv b/addons/survey/data/survey.user_input_line.csv
new file mode 100644
index 00000000000..58b67969d5a
--- /dev/null
+++ b/addons/survey/data/survey.user_input_line.csv
@@ -0,0 +1,125 @@
+id,user_input_id:id,question_id:id,skipped,answer_type,value_text,value_number,value_date,value_free_text,value_suggested:id,value_suggested_row:id
+uil_1,ui1,feedback_1_1,,suggestion,,,,,choice_1_1_1,
+uil_2,ui1,feedback_1_2,,suggestion,,,,,choice_1_2_2,
+uil_3,ui1,feedback_2_1,,suggestion,,,,,fcol_2_1_2,frow_2_1_1
+uil_4,ui1,feedback_2_1,,suggestion,,,,,fcol_2_1_3,frow_2_1_2
+uil_5,ui1,feedback_2_1,,suggestion,,,,,fcol_2_1_4,frow_2_1_3
+uil_6,ui1,feedback_2_1,,suggestion,,,,,fcol_2_1_1,frow_2_1_4
+uil_7,ui1,feedback_2_1,,suggestion,,,,,fcol_2_1_2,frow_2_1_5
+uil_8,ui1,feedback_2_2,,suggestion,,,,,fcol_2_2_4,frow_2_2_1
+uil_9,ui1,feedback_2_2,,suggestion,,,,,fcol_2_2_1,frow_2_2_2
+uil_10,ui1,feedback_2_2,,suggestion,,,,,fcol_2_2_2,frow_2_2_3
+uil_11,ui1,feedback_2_2,,suggestion,,,,,fcol_2_2_3,frow_2_2_4
+uil_12,ui1,feedback_2_2,,suggestion,,,,,fcol_2_2_4,frow_2_2_5
+uil_13,ui1,feedback_2_3,,free_text,,,,It is very difficult to understand,,
+uil_14,ui1,feedback_2_4,,suggestion,,,,,choice_2_4_1,
+uil_15,ui1,feedback_2_4,,suggestion,,,,,choice_2_4_2,
+uil_16,ui1,feedback_2_5,,suggestion,,,,,fcol_2_5_3,frow_2_5_1
+uil_17,ui1,feedback_2_5,,suggestion,,,,,fcol_2_5_4,frow_2_5_2
+uil_18,ui1,feedback_2_5,,suggestion,,,,,fcol_2_5_1,frow_2_5_3
+uil_19,ui1,feedback_2_5,,suggestion,,,,,fcol_2_5_2,frow_2_5_4
+uil_20,ui1,feedback_2_5,,suggestion,,,,,fcol_2_5_3,frow_2_5_5
+uil_21,ui1,feedback_2_6,,suggestion,,,,,choice_2_6_2,
+uil_22,ui1,feedback_2_7,,suggestion,,,,,fcol_2_7_2,frow_2_7_1
+uil_23,ui1,feedback_2_7,,suggestion,,,,,fcol_2_7_3,frow_2_7_2
+uil_24,ui1,feedback_2_7,,suggestion,,,,,fcol_2_7_4,frow_2_7_3
+uil_25,ui1,feedback_2_7,,suggestion,,,,,fcol_2_7_1,frow_2_7_4
+uil_26,ui1,feedback_3_1,,suggestion,,,,,choice_3_1_1,
+uil_27,ui1,feedback_3_1,,suggestion,,,,,choice_3_1_5,
+uil_28,ui1,feedback_3_2,,free_text,,,,Accept merge proposals more quickly,,
+uil_29,ui1,feedback_3_3,,free_text,,,,Pay them!,,
+uil_30,ui1,feedback_4_1,,suggestion,,,,,choice_4_1_2,
+uil_31,ui1,feedback_4_1,,suggestion,,,,,choice_4_1_3,
+uil_32,ui1,feedback_4_1,,suggestion,,,,,choice_4_1_4,
+uil_33,ui2,feedback_1_1,,suggestion,,,,,choice_1_1_3,
+uil_34,ui2,feedback_1_2,,suggestion,,,,,choice_1_2_3,
+uil_35,ui2,feedback_2_1,,suggestion,,,,,fcol_2_1_3,frow_2_1_1
+uil_36,ui2,feedback_2_1,,suggestion,,,,,fcol_2_1_4,frow_2_1_2
+uil_37,ui2,feedback_2_1,,suggestion,,,,,fcol_2_1_1,frow_2_1_3
+uil_38,ui2,feedback_2_1,,suggestion,,,,,fcol_2_1_2,frow_2_1_4
+uil_39,ui2,feedback_2_1,,suggestion,,,,,fcol_2_1_3,frow_2_1_5
+uil_40,ui2,feedback_2_2,,suggestion,,,,,fcol_2_2_3,frow_2_2_1
+uil_41,ui2,feedback_2_2,,suggestion,,,,,fcol_2_2_4,frow_2_2_2
+uil_42,ui2,feedback_2_2,,suggestion,,,,,fcol_2_2_1,frow_2_2_3
+uil_43,ui2,feedback_2_2,,suggestion,,,,,fcol_2_2_2,frow_2_2_4
+uil_44,ui2,feedback_2_2,,suggestion,,,,,fcol_2_2_3,frow_2_2_5
+uil_45,ui2,feedback_2_3,,free_text,,,,I prefer a command-line tool,,
+uil_46,ui2,feedback_2_4,,suggestion,,,,,choice_2_4_3,
+uil_47,ui2,feedback_2_4,,suggestion,,,,,choice_2_4_1,
+uil_48,ui2,feedback_2_5,,suggestion,,,,,fcol_2_5_4,frow_2_5_1
+uil_49,ui2,feedback_2_5,,suggestion,,,,,fcol_2_5_1,frow_2_5_2
+uil_50,ui2,feedback_2_5,,suggestion,,,,,fcol_2_5_2,frow_2_5_3
+uil_51,ui2,feedback_2_5,,suggestion,,,,,fcol_2_5_3,frow_2_5_4
+uil_52,ui2,feedback_2_5,,suggestion,,,,,fcol_2_5_4,frow_2_5_5
+uil_53,ui2,feedback_2_6,,suggestion,,,,,choice_2_6_1,
+uil_54,ui2,feedback_2_7,,suggestion,,,,,fcol_2_7_3,frow_2_7_1
+uil_55,ui2,feedback_2_7,,suggestion,,,,,fcol_2_7_4,frow_2_7_2
+uil_56,ui2,feedback_2_7,,suggestion,,,,,fcol_2_7_1,frow_2_7_3
+uil_57,ui2,feedback_2_7,,suggestion,,,,,fcol_2_7_2,frow_2_7_4
+uil_58,ui2,feedback_3_1,,suggestion,,,,,choice_3_1_2,
+uil_59,ui2,feedback_3_1,,suggestion,,,,,choice_3_1_3,
+uil_60,ui2,feedback_3_1,,suggestion,,,,,choice_3_1_4,
+uil_61,ui2,feedback_3_2,,free_text,,,,Reward most engaged contributors,,
+uil_62,ui2,feedback_3_3,,free_text,,,,Launch OpenERP hackhatons,,
+uil_63,ui2,feedback_4_1,,suggestion,,,,,choice_4_1_1,
+uil_64,ui2,feedback_4_1,,suggestion,,,,,choice_4_1_2,
+uil_65,ui2,feedback_4_1,,suggestion,,,,,choice_4_1_3,
+uil_66,ui3,feedback_1_1,,suggestion,,,,,choice_1_1_1,
+uil_67,ui3,feedback_1_2,,suggestion,,,,,choice_1_2_2,
+uil_68,ui3,feedback_2_1,,suggestion,,,,,fcol_2_1_2,frow_2_1_1
+uil_69,ui3,feedback_2_1,,suggestion,,,,,fcol_2_1_3,frow_2_1_2
+uil_70,ui3,feedback_2_1,,suggestion,,,,,fcol_2_1_4,frow_2_1_3
+uil_71,ui3,feedback_2_1,,suggestion,,,,,fcol_2_1_1,frow_2_1_4
+uil_72,ui3,feedback_2_1,,suggestion,,,,,fcol_2_1_2,frow_2_1_5
+uil_73,ui3,feedback_2_2,,suggestion,,,,,fcol_2_2_4,frow_2_2_1
+uil_74,ui3,feedback_2_2,,suggestion,,,,,fcol_2_2_1,frow_2_2_2
+uil_75,ui3,feedback_2_2,,suggestion,,,,,fcol_2_2_2,frow_2_2_3
+uil_76,ui3,feedback_2_2,,suggestion,,,,,fcol_2_2_3,frow_2_2_4
+uil_77,ui3,feedback_2_2,,suggestion,,,,,fcol_2_2_4,frow_2_2_5
+uil_78,ui3,feedback_2_3,,free_text,,,,I prefer a command-line tool,,
+uil_79,ui3,feedback_2_4,,suggestion,,,,,choice_2_4_1,
+uil_80,ui3,feedback_2_4,,suggestion,,,,,choice_2_4_2,
+uil_81,ui3,feedback_2_5,,suggestion,,,,,fcol_2_5_3,frow_2_5_1
+uil_82,ui3,feedback_2_5,,suggestion,,,,,fcol_2_5_4,frow_2_5_2
+uil_83,ui3,feedback_2_5,,suggestion,,,,,fcol_2_5_1,frow_2_5_3
+uil_84,ui3,feedback_2_5,,suggestion,,,,,fcol_2_5_2,frow_2_5_4
+uil_85,ui3,feedback_2_5,,suggestion,,,,,fcol_2_5_3,frow_2_5_5
+uil_86,ui3,feedback_2_6,,suggestion,,,,,choice_2_6_2,
+uil_87,ui3,feedback_2_7,,suggestion,,,,,fcol_2_7_2,frow_2_7_1
+uil_88,ui3,feedback_2_7,,suggestion,,,,,fcol_2_7_3,frow_2_7_2
+uil_89,ui3,feedback_2_7,,suggestion,,,,,fcol_2_7_4,frow_2_7_3
+uil_90,ui3,feedback_2_7,,suggestion,,,,,fcol_2_7_1,frow_2_7_4
+uil_91,ui3,feedback_3_1,,suggestion,,,,,choice_3_1_1,
+uil_92,ui3,feedback_3_1,,suggestion,,,,,choice_3_1_5,
+uil_93,ui3,feedback_3_2,,free_text,,,,Reward most engaged contributors,,
+uil_94,ui3,feedback_3_3,,free_text,,,,Launch OpenERP hackhatons,,
+uil_95,ui3,feedback_4_1,,suggestion,,,,,choice_4_1_2,
+uil_96,ui3,feedback_4_1,,suggestion,,,,,choice_4_1_3,
+uil_97,ui3,feedback_4_1,,suggestion,,,,,choice_4_1_4,
+uil_98,ui4,feedback_1_1,,suggestion,,,,,choice_1_1_2,
+uil_99,ui4,feedback_1_2,,suggestion,,,,,choice_1_2_3,
+uil_100,ui4,feedback_2_1,,suggestion,,,,,fcol_2_1_1,frow_2_1_1
+uil_101,ui4,feedback_2_1,,suggestion,,,,,fcol_2_1_2,frow_2_1_2
+uil_102,ui4,feedback_2_1,,suggestion,,,,,fcol_2_1_3,frow_2_1_3
+uil_103,ui4,feedback_2_1,,suggestion,,,,,fcol_2_1_4,frow_2_1_4
+uil_104,ui4,feedback_2_1,,suggestion,,,,,fcol_2_1_1,frow_2_1_5
+uil_105,ui4,feedback_2_2,,suggestion,,,,,fcol_2_2_4,frow_2_2_1
+uil_106,ui4,feedback_2_2,,suggestion,,,,,fcol_2_2_1,frow_2_2_2
+uil_107,ui4,feedback_2_2,,suggestion,,,,,fcol_2_2_2,frow_2_2_3
+uil_108,ui4,feedback_2_2,,suggestion,,,,,fcol_2_2_3,frow_2_2_4
+uil_109,ui4,feedback_2_2,,suggestion,,,,,fcol_2_2_4,frow_2_2_5
+uil_110,ui4,feedback_2_3,,free_text,,,,A more graphical tool would be useful.,,
+uil_111,ui4,feedback_2_4,,suggestion,,,,,choice_2_4_2,
+uil_112,ui4,feedback_2_4,,suggestion,,,,,choice_2_4_3,
+uil_113,ui4,feedback_2_5,,suggestion,,,,,fcol_2_5_3,frow_2_5_1
+uil_114,ui4,feedback_2_5,,suggestion,,,,,fcol_2_5_4,frow_2_5_2
+uil_115,ui4,feedback_2_5,,suggestion,,,,,fcol_2_5_1,frow_2_5_3
+uil_116,ui4,feedback_2_5,,suggestion,,,,,fcol_2_5_2,frow_2_5_4
+uil_117,ui4,feedback_2_5,,suggestion,,,,,fcol_2_5_3,frow_2_5_5
+uil_118,ui4,feedback_2_6,,suggestion,,,,,choice_2_6_1,
+uil_119,ui4,feedback_2_7,,suggestion,,,,,fcol_2_7_2,frow_2_7_1
+uil_120,ui4,feedback_2_7,,suggestion,,,,,fcol_2_7_3,frow_2_7_2
+uil_121,ui4,feedback_2_7,,suggestion,,,,,fcol_2_7_4,frow_2_7_3
+uil_122,ui4,feedback_2_7,,suggestion,,,,,fcol_2_7_1,frow_2_7_4
+uil_123,ui5,feedback_1_1,,suggestion,,,,,choice_1_1_1,
+uil_124,ui5,feedback_1_2,,suggestion,,,,,choice_1_2_2,
diff --git a/addons/survey/data/survey_cron.xml b/addons/survey/data/survey_cron.xml
new file mode 100644
index 00000000000..7f22bbcb5ff
--- /dev/null
+++ b/addons/survey/data/survey_cron.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<openerp>
+ <data noupdate="1">
+ <!-- Remove unused user inputs -->
+ <record forcecreate="True" id="ir_cron_clean_empty_surveys"
+ model="ir.cron">
+ <field name="name">Run Clean empty surveys</field>
+ <field name="active" eval="True"/>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="interval_number">1</field>
+ <field name="interval_type">hours</field>
+ <field name="numbercall">-1</field>
+ <field name="doall" eval="False"/>
+ <field name="model" eval="'survey.user_input'"/>
+ <field name="function" eval="'do_clean_emptys'"/>
+ <field name="args" eval="'()'"/>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/survey/data/survey_demo_feedback.xml b/addons/survey/data/survey_demo_feedback.xml
new file mode 100644
index 00000000000..7b59bde24e4
--- /dev/null
+++ b/addons/survey/data/survey_demo_feedback.xml
@@ -0,0 +1,441 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data noupdate="1">
+ <!-- User Feedback Form -->
+ <record model="survey.survey" id="feedback_form">
+ <field name="title">User Feedback Form</field>
+ <field name="stage_id" ref="survey.stage_in_progress" />
+ <field name="auth_required" eval="False" />
+ <field name="users_can_go_back" eval="True" />
+ <field name="description">&lt;p&gt;This survey should take less than five minutes.&lt;/p&gt;</field>
+ <field name="thank_you_message">&lt;p&gt;&lt;/p&gt;</field>
+ </record>
+ <!-- Page 1 -->
+ <record model="survey.page" id="feedback_1">
+ <field name="title">About your OpenERP usage</field>
+ <field name="survey_id" ref="feedback_form" />
+ <field name="sequence">1</field>
+ <field name="description">&lt;p&gt;&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="feedback_1_1">
+ <field name="page_id" ref="feedback_1" />
+ <field name="sequence">1</field>
+ <field name="question">Are you using OpenERP on a daily basis?</field>
+ <field name="type">simple_choice</field>
+ <field name="display_mode">dropdown</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="choice_1_1_1">
+ <field name="question_id" ref="feedback_1_1"/>
+ <field name="sequence">1</field>
+ <field name="value">Yes, I use a version &lt; 7.0</field>
+ </record>
+ <record model="survey.label" id="choice_1_1_2">
+ <field name="question_id" ref="feedback_1_1"/>
+ <field name="sequence">2</field>
+ <field name="value">Yes, I use the 7.0 version, installed locally</field>
+ </record>
+ <record model="survey.label" id="choice_1_1_3">
+ <field name="question_id" ref="feedback_1_1"/>
+ <field name="sequence">3</field>
+ <field name="value">Yes, I use the online version of OpenERP</field>
+ </record>
+ <record model="survey.label" id="choice_1_1_4">
+ <field name="question_id" ref="feedback_1_1"/>
+ <field name="sequence">4</field>
+ <field name="value">No, I just tested it</field>
+ </record>
+ <record model="survey.question" id="feedback_1_2">
+ <field name="page_id" ref="feedback_1" />
+ <field name="sequence">2</field>
+ <field name="question">Which modules are you using/testing?</field>
+ <field name="type">multiple_choice</field>
+ <field name="column_nb">4</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="choice_1_2_1">
+ <field name="question_id" ref="feedback_1_2"/>
+ <field name="sequence">1</field>
+ <field name="value">Sales Management</field>
+ </record>
+ <record model="survey.label" id="choice_1_2_2">
+ <field name="question_id" ref="feedback_1_2"/>
+ <field name="sequence">2</field>
+ <field name="value">Purchases Management</field>
+ </record>
+ <record model="survey.label" id="choice_1_2_3">
+ <field name="question_id" ref="feedback_1_2"/>
+ <field name="sequence">3</field>
+ <field name="value">Financial Management</field>
+ </record>
+ <record model="survey.label" id="choice_1_2_4">
+ <field name="question_id" ref="feedback_1_2"/>
+ <field name="sequence">4</field>
+ <field name="value">CRM</field>
+ </record>
+ <record model="survey.label" id="choice_1_2_5">
+ <field name="question_id" ref="feedback_1_2"/>
+ <field name="sequence">5</field>
+ <field name="value">Project Management</field>
+ </record>
+ <record model="survey.label" id="choice_1_2_6">
+ <field name="question_id" ref="feedback_1_2"/>
+ <field name="sequence">6</field>
+ <field name="value">Human Ressources</field>
+ </record>
+ <!-- Page 2 -->
+ <record model="survey.page" id="feedback_2">
+ <field name="title">Ergonomy and ease of use</field>
+ <field name="survey_id" ref="feedback_form" />
+ <field name="sequence">2</field>
+ <field name="description">&lt;p&gt;These questions relate to the ergonomy and ease of use of OpenERP. Try to remind your firsts days on OpenERP and
+what have been your difficulties.&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="feedback_2_1">
+ <field name="page_id" ref="feedback_2" />
+ <field name="sequence">1</field>
+ <field name="question">What do you think about the documentation available on doc.openerp.com?</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="fcol_2_1_1">
+ <field name="question_id" ref="feedback_2_1"/>
+ <field name="sequence">1</field>
+ <field name="value">Totally disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_1_2">
+ <field name="question_id" ref="feedback_2_1"/>
+ <field name="sequence">2</field>
+ <field name="value">Disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_1_3">
+ <field name="question_id" ref="feedback_2_1"/>
+ <field name="sequence">3</field>
+ <field name="value">Agree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_1_4">
+ <field name="question_id" ref="feedback_2_1"/>
+ <field name="sequence">4</field>
+ <field name="value">Totally agree</field>
+ </record>
+ <record model="survey.label" id="frow_2_1_1">
+ <field name="question_id_2" ref="feedback_2_1"/>
+ <field name="sequence">1</field>
+ <field name="value">It is up-to-date</field>
+ </record>
+ <record model="survey.label" id="frow_2_1_2">
+ <field name="question_id_2" ref="feedback_2_1"/>
+ <field name="sequence">2</field>
+ <field name="value">It helps in the beginning</field>
+ </record>
+ <record model="survey.label" id="frow_2_1_3">
+ <field name="question_id_2" ref="feedback_2_1"/>
+ <field name="sequence">3</field>
+ <field name="value">I use the contextual help in OpenERP</field>
+ </record>
+ <record model="survey.label" id="frow_2_1_4">
+ <field name="question_id_2" ref="feedback_2_1"/>
+ <field name="sequence">4</field>
+ <field name="value">It is complete</field>
+ </record>
+ <record model="survey.label" id="frow_2_1_5">
+ <field name="question_id_2" ref="feedback_2_1"/>
+ <field name="sequence">5</field>
+ <field name="value">It is clear</field>
+ </record>
+ <record model="survey.question" id="feedback_2_2">
+ <field name="page_id" ref="feedback_2" />
+ <field name="sequence">2</field>
+ <field name="question">What do you think about the process views of OpenERP, available in the web client ?</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="fcol_2_2_1">
+ <field name="question_id" ref="feedback_2_2"/>
+ <field name="sequence">1</field>
+ <field name="value">Totally disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_2_2">
+ <field name="question_id" ref="feedback_2_2"/>
+ <field name="sequence">2</field>
+ <field name="value">Disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_2_3">
+ <field name="question_id" ref="feedback_2_2"/>
+ <field name="sequence">3</field>
+ <field name="value">Agree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_2_4">
+ <field name="question_id" ref="feedback_2_2"/>
+ <field name="sequence">4</field>
+ <field name="value">Totally agree</field>
+ </record>
+ <record model="survey.label" id="frow_2_2_1">
+ <field name="question_id_2" ref="feedback_2_2"/>
+ <field name="sequence">1</field>
+ <field name="value">They help new users to understand OpenERP</field>
+ </record>
+ <record model="survey.label" id="frow_2_2_2">
+ <field name="question_id_2" ref="feedback_2_2"/>
+ <field name="sequence">2</field>
+ <field name="value">They are clean and correct</field>
+ </record>
+ <record model="survey.label" id="frow_2_2_3">
+ <field name="question_id_2" ref="feedback_2_2"/>
+ <field name="sequence">3</field>
+ <field name="value">They are useful on a daily usage</field>
+ </record>
+ <record model="survey.label" id="frow_2_2_4">
+ <field name="question_id_2" ref="feedback_2_2"/>
+ <field name="sequence">4</field>
+ <field name="value">A process is defined for all enterprise flows</field>
+ </record>
+ <record model="survey.label" id="frow_2_2_5">
+ <field name="question_id_2" ref="feedback_2_2"/>
+ <field name="sequence">5</field>
+ <field name="value">It's easy to find the process you need</field>
+ </record>
+ <record model="survey.question" id="feedback_2_3">
+ <field name="page_id" ref="feedback_2" />
+ <field name="sequence">3</field>
+ <field name="question">Do you have suggestions on how to improve the process view ?</field>
+ <field name="type">free_text</field>
+ </record>
+ <record model="survey.question" id="feedback_2_4">
+ <field name="page_id" ref="feedback_2" />
+ <field name="sequence">4</field>
+ <field name="question">What do you think about the structure of the menus?</field>
+ <field name="type">multiple_choice</field>
+ <field name="column_nb">4</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="choice_2_4_1">
+ <field name="question_id" ref="feedback_2_4"/>
+ <field name="sequence">1</field>
+ <field name="value">The current menu structure is good</field>
+ </record>
+ <record model="survey.label" id="choice_2_4_2">
+ <field name="question_id" ref="feedback_2_4"/>
+ <field name="sequence">2</field>
+ <field name="value">It can be improved</field>
+ </record>
+ <record model="survey.label" id="choice_2_4_3">
+ <field name="question_id" ref="feedback_2_4"/>
+ <field name="sequence">3</field>
+ <field name="value">There are too much menus, it's complex to understand</field>
+ </record>
+ <record model="survey.question" id="feedback_2_5">
+ <field name="page_id" ref="feedback_2" />
+ <field name="sequence">5</field>
+ <field name="question">What do you think about the groups of users?</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="fcol_2_5_1">
+ <field name="question_id" ref="feedback_2_5"/>
+ <field name="sequence">1</field>
+ <field name="value">Totally disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_5_2">
+ <field name="question_id" ref="feedback_2_5"/>
+ <field name="sequence">2</field>
+ <field name="value">Disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_5_3">
+ <field name="question_id" ref="feedback_2_5"/>
+ <field name="sequence">3</field>
+ <field name="value">Agree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_5_4">
+ <field name="question_id" ref="feedback_2_5"/>
+ <field name="sequence">4</field>
+ <field name="value">Totally agree</field>
+ </record>
+ <record model="survey.label" id="frow_2_5_1">
+ <field name="question_id_2" ref="feedback_2_5"/>
+ <field name="sequence">1</field>
+ <field name="value">The security rules defined on groups are useful</field>
+ </record>
+ <record model="survey.label" id="frow_2_5_2">
+ <field name="question_id_2" ref="feedback_2_5"/>
+ <field name="sequence">2</field>
+ <field name="value">Those security rules are standard and can be used out-of-the-box in most cases</field>
+ </record>
+ <record model="survey.label" id="frow_2_5_3">
+ <field name="question_id_2" ref="feedback_2_5"/>
+ <field name="sequence">3</field>
+ <field name="value">The 'Usability/Extended View' group helps in daily work</field>
+ </record>
+ <record model="survey.label" id="frow_2_5_4">
+ <field name="question_id_2" ref="feedback_2_5"/>
+ <field name="sequence">4</field>
+ <field name="value">The 'Usability/Extended View' group hides only optional fields</field>
+ </record>
+ <record model="survey.label" id="frow_2_5_5">
+ <field name="question_id_2" ref="feedback_2_5"/>
+ <field name="sequence">5</field>
+ <field name="value">The groups set on menu items are relevant</field>
+ </record>
+ <record model="survey.question" id="feedback_2_6">
+ <field name="page_id" ref="feedback_2" />
+ <field name="sequence">6</field>
+ <field name="question">What do you think about the structure of the menus?</field>
+ <field name="type">simple_choice</field>
+ <field name="display_mode">columns</field>
+ <field name="column_nb">4</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="choice_2_6_1">
+ <field name="question_id" ref="feedback_2_6"/>
+ <field name="sequence">1</field>
+ <field name="value">There are too many groups defined, security is too complex to set</field>
+ </record>
+ <record model="survey.label" id="choice_2_6_2">
+ <field name="question_id" ref="feedback_2_6"/>
+ <field name="sequence">2</field>
+ <field name="value">There are too few groups defined, security isn't accurate enough</field>
+ </record>
+ <record model="survey.label" id="choice_2_6_3">
+ <field name="question_id" ref="feedback_2_6"/>
+ <field name="sequence">3</field>
+ <field name="value">The number of groups is good</field>
+ </record>
+ <record model="survey.question" id="feedback_2_7">
+ <field name="page_id" ref="feedback_2" />
+ <field name="sequence">7</field>
+ <field name="question">What do you think about configuration wizards?</field>
+ <field name="type">matrix</field>
+ <field name="matrix_subtype">simple</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="fcol_2_7_1">
+ <field name="question_id" ref="feedback_2_7"/>
+ <field name="sequence">1</field>
+ <field name="value">Totally disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_7_2">
+ <field name="question_id" ref="feedback_2_7"/>
+ <field name="sequence">2</field>
+ <field name="value">Disagree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_7_3">
+ <field name="question_id" ref="feedback_2_7"/>
+ <field name="sequence">3</field>
+ <field name="value">Agree</field>
+ </record>
+ <record model="survey.label" id="fcol_2_7_4">
+ <field name="question_id" ref="feedback_2_7"/>
+ <field name="sequence">4</field>
+ <field name="value">Totally agree</field>
+ </record>
+ <record model="survey.label" id="frow_2_7_1">
+ <field name="question_id_2" ref="feedback_2_7"/>
+ <field name="sequence">1</field>
+ <field name="value">Descriptions and help tooltips are clear enough</field>
+ </record>
+ <record model="survey.label" id="frow_2_7_2">
+ <field name="question_id_2" ref="feedback_2_7"/>
+ <field name="sequence">2</field>
+ <field name="value">Configuration wizard exists for each important setting</field>
+ </record>
+ <record model="survey.label" id="frow_2_7_3">
+ <field name="question_id_2" ref="feedback_2_7"/>
+ <field name="sequence">3</field>
+ <field name="value">Extra modules proposed are relevant</field>
+ </record>
+ <record model="survey.label" id="frow_2_7_4">
+ <field name="question_id_2" ref="feedback_2_7"/>
+ <field name="sequence">4</field>
+ <field name="value">Running the configuration wizards is a good way to spare time</field>
+ </record>
+ <!-- Page 3 -->
+ <record model="survey.page" id="feedback_3">
+ <field name="title">Community and contributors</field>
+ <field name="survey_id" ref="feedback_form" />
+ <field name="sequence">3</field>
+ <field name="description">&lt;p&gt;&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="feedback_3_1">
+ <field name="page_id" ref="feedback_3" />
+ <field name="sequence">1</field>
+ <field name="question">How do you contribute or plan to contribute to OpenERP?</field>
+ <field name="type">multiple_choice</field>
+ <field name="column_nb">6</field>
+ <field name="constr_mandatory" eval="True" />
+ </record>
+ <record model="survey.label" id="choice_3_1_1">
+ <field name="question_id" ref="feedback_3_1"/>
+ <field name="sequence">1</field>
+ <field name="value">I participate to discussion and forums</field>
+ </record>
+ <record model="survey.label" id="choice_3_1_2">
+ <field name="question_id" ref="feedback_3_1"/>
+ <field name="sequence">2</field>
+ <field name="value">I'd like to contribute but I don't know how?</field>
+ </record>
+ <record model="survey.label" id="choice_3_1_3">
+ <field name="question_id" ref="feedback_3_1"/>
+ <field name="sequence">3</field>
+ <field name="value">I develop new features</field>
+ </record>
+ <record model="survey.label" id="choice_3_1_4">
+ <field name="question_id" ref="feedback_3_1"/>
+ <field name="sequence">4</field>
+ <field name="value">I help to translate</field>
+ </record>
+ <record model="survey.label" id="choice_3_1_5">
+ <field name="question_id" ref="feedback_3_1"/>
+ <field name="sequence">5</field>
+ <field name="value">I write documentations</field>
+ </record>
+ <record model="survey.question" id="feedback_3_2">
+ <field name="page_id" ref="feedback_3" />
+ <field name="sequence">2</field>
+ <field name="question">Do you have a proposition to help people to contribute?</field>
+ <field name="type">free_text</field>
+ </record>
+ <record model="survey.question" id="feedback_3_3">
+ <field name="page_id" ref="feedback_3" />
+ <field name="sequence">3</field>
+ <field name="question">Do you have a proposition to attract new contributors?</field>
+ <field name="type">free_text</field>
+ </record>
+ <!-- Page 4 -->
+ <record model="survey.page" id="feedback_4">
+ <field name="title">Questions for developers</field>
+ <field name="survey_id" ref="feedback_form" />
+ <field name="sequence">4</field>
+ <field name="description">&lt;p&gt;If you do not contribute or develop in OpenERP, skip this page.&lt;/p&gt;</field>
+ </record>
+ <record model="survey.question" id="feedback_4_1">
+ <field name="page_id" ref="feedback_4" />
+ <field name="sequence">1</field>
+ <field name="question">Where do you develop your new features?</field>
+ <field name="type">multiple_choice</field>
+ <field name="column_nb">6</field>
+ </record>
+ <record model="survey.label" id="choice_4_1_1">
+ <field name="question_id" ref="feedback_4_1"/>
+ <field name="sequence">1</field>
+ <field name="value">I use Launchpad, like all official OpenERP projects</field>
+ </record>
+ <record model="survey.label" id="choice_4_1_2">
+ <field name="question_id" ref="feedback_4_1"/>
+ <field name="sequence">2</field>
+ <field name="value">I use another repository system (SourceForge...)</field>
+ </record>
+ <record model="survey.label" id="choice_4_1_3">
+ <field name="question_id" ref="feedback_4_1"/>
+ <field name="sequence">3</field>
+ <field name="value">I host them on my own website</field>
+ </record>
+ <record model="survey.label" id="choice_4_1_4">
+ <field name="question_id" ref="feedback_4_1"/>
+ <field name="sequence">4</field>
+ <field name="value">I do not publish my developments</field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/survey/data/survey_demo_user.xml b/addons/survey/data/survey_demo_user.xml
new file mode 100644
index 00000000000..26a60c8b2c5
--- /dev/null
+++ b/addons/survey/data/survey_demo_user.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data noupdate="1">
+ <!-- Grant survey permissions to demo user -->
+ <record id="base.user_demo" model="res.users">
+ <field eval="[(4, ref('base.group_survey_manager'))]" name="groups_id"/>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/survey/data/survey_stages.xml b/addons/survey/data/survey_stages.xml
new file mode 100644
index 00000000000..33522d8d3fe
--- /dev/null
+++ b/addons/survey/data/survey_stages.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<openerp>
+ <data noupdate="1">
+ <!-- Standard stages for surveys -->
+ <record id="stage_draft" model="survey.stage">
+ <field name="name">Draft</field>
+ <field name="sequence" eval="1" />
+ <field name="closed" eval="False" />
+ <field name="fold" eval="False" />
+ </record>
+ <record id="stage_in_progress" model="survey.stage">
+ <field name="name">In progress</field>
+ <field name="sequence" eval="2" />
+ <field name="closed" eval="False" />
+ <field name="fold" eval="False" />
+ </record>
+ <record id="stage_closed" model="survey.stage">
+ <field name="name">Closed</field>
+ <field name="sequence" eval="3" />
+ <field name="closed" eval="True" />
+ <field name="fold" eval="True" />
+ </record>
+ <record id="stage_permanent" model="survey.stage">
+ <field name="name">Permanent</field>
+ <field name="sequence" eval="4" />
+ <field name="closed" eval="False" />
+ <field name="fold" eval="True" />
+ </record>
+ </data>
+</openerp>
diff --git a/addons/survey/i18n/es_MX.po b/addons/survey/i18n/es_MX.po
deleted file mode 100644
index 7c1c9bbbad1..00000000000
--- a/addons/survey/i18n/es_MX.po
+++ /dev/null
@@ -1,1914 +0,0 @@
-# Spanish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2011-01-11 11:16+0000\n"
-"PO-Revision-Date: 2011-01-18 18:43+0000\n"
-"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
-"<jesteve@zikzakmedia.com>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-09-05 05:45+0000\n"
-"X-Generator: Launchpad (build 13830)\n"
-
-#. module: survey
-#: view:survey.print:0
-#: view:survey.print.answer:0
-msgid "Print Option"
-msgstr "OpciĂłn imprimir"
-
-#. module: survey
-#: code:addons/survey/survey.py:422
-#, python-format
-msgid ""
-"Minimum Required Answer you entered is "
-"greater than the number of answer. "
-"Please use a number that is smaller than %d."
-msgstr ""
-"El nĂşmero mĂ­nimo de respuestas requeridas que ha introducido es mayor que el "
-"nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: view:survey.question.wiz:0
-msgid "Your Messages"
-msgstr "Sus mensajes"
-
-#. module: survey
-#: field:survey.question,comment_valid_type:0
-#: field:survey.question,validation_type:0
-msgid "Text Validation"
-msgstr "ValidaciĂłn del texto"
-
-#. module: survey
-#: code:addons/survey/survey.py:434
-#, python-format
-msgid ""
-"Maximum Required Answer you entered for "
-"your maximum is greater than the number of answer. "
-" Please use a number that is smaller than %d."
-msgstr ""
-"El número máximo de respuestas requeridas que ha introducido para su máximo "
-"es mayor que el nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: view:survey:0
-#: field:survey,invited_user_ids:0
-msgid "Invited User"
-msgstr "Usuario invitado"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Character"
-msgstr "Carácter"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_form1
-#: model:ir.ui.menu,name:survey.menu_print_survey_form
-#: model:ir.ui.menu,name:survey.menu_reporting
-#: model:ir.ui.menu,name:survey.menu_survey_form
-#: model:ir.ui.menu,name:survey.menu_surveys
-msgid "Surveys"
-msgstr "Encuestas"
-
-#. module: survey
-#: view:survey:0
-msgid "Set to draft"
-msgstr "Cambiar a borrador"
-
-#. module: survey
-#: field:survey.question,in_visible_answer_type:0
-msgid "Is Answer Type Invisible?"
-msgstr "ÂżLa respuesta es de tipo invisible?"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-#: view:survey.request:0
-msgid "Group By..."
-msgstr "Agrupar por..."
-
-#. module: survey
-#: view:survey.send.invitation.log:0
-msgid "Results :"
-msgstr "Resultados :"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Survey Request"
-msgstr "Solicitud de encuesta"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "A Range"
-msgstr "Un rango"
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Table Answer"
-msgstr "Tabla de respuesta"
-
-#. module: survey
-#: field:survey.history,date:0
-msgid "Date started"
-msgstr "Fecha de inicio"
-
-#. module: survey
-#: field:survey,history:0
-msgid "History Lines"
-msgstr "LĂ­neas histĂłrico"
-
-#. module: survey
-#: code:addons/survey/survey.py:448
-#, python-format
-msgid ""
-"You must enter one or more menu choices in "
-"column heading (white spaces not allowed)"
-msgstr ""
-"Debe introducir una o más opciones de menú en la cabecera de columna (no se "
-"permiten espacios en blanco)"
-
-#. module: survey
-#: field:survey.question.column.heading,in_visible_menu_choice:0
-msgid "Is Menu Choice Invisible??"
-msgstr "ÂżLa opciĂłn de menĂş es invisible?"
-
-#. module: survey
-#: field:survey.send.invitation,mail:0
-msgid "Body"
-msgstr "Cuerpo"
-
-#. module: survey
-#: field:survey.question,allow_comment:0
-msgid "Allow Comment Field"
-msgstr "Permitir campo comentario"
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "A4 (210mm x 297mm)"
-msgstr "A4 (210mm x 297mm)"
-
-#. module: survey
-#: field:survey.question,comment_maximum_date:0
-#: field:survey.question,validation_maximum_date:0
-msgid "Maximum date"
-msgstr "Fecha Máxima"
-
-#. module: survey
-#: field:survey.question,in_visible_menu_choice:0
-msgid "Is Menu Choice Invisible?"
-msgstr "ÂżLa opciĂłn de menĂş es invisible?"
-
-#. module: survey
-#: view:survey:0
-msgid "Completed"
-msgstr "Completada"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "Exactly"
-msgstr "Exactamente"
-
-#. module: survey
-#: view:survey:0
-msgid "Open Date"
-msgstr "Fecha de Inicio"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Set to Draft"
-msgstr "Cambiar a borrador"
-
-#. module: survey
-#: field:survey.question,is_comment_require:0
-msgid "Add Comment Field"
-msgstr "Campo para agregar comentario"
-
-#. module: survey
-#: code:addons/survey/survey.py:401
-#, python-format
-msgid ""
-"#Required Answer you entered is greater "
-"than the number of answer. Please use a "
-"number that is smaller than %d."
-msgstr ""
-"NĂşmero de respuestas requeridas que ha escrito es mayor que el nĂşmero de "
-"respuestas. Introduzca un nĂşmero menor que %d."
-
-#. module: survey
-#: field:survey.question,tot_resp:0
-msgid "Total Answer"
-msgstr "Total respuesta"
-
-#. module: survey
-#: field:survey.tbl.column.heading,name:0
-msgid "Row Number"
-msgstr "NĂşmero de Fila"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_name_wiz
-msgid "survey.name.wiz"
-msgstr "encuesta.nombre.asist"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_question_form
-msgid "Survey Questions"
-msgstr "Preguntas de las encuestas"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Choices (Only One Answers Per Row)"
-msgstr "Matriz de selecciĂłn (solamente una respuesta por fila)"
-
-#. module: survey
-#: code:addons/survey/survey.py:475
-#, python-format
-msgid ""
-"Maximum Required Answer you entered for your maximum is greater than the "
-"number of answer. Please use a number that is smaller than %d."
-msgstr ""
-"El número máximo de respuestas requeridas que ha introducido para su máximo "
-"es mayor que el nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. 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 "Pregunta de la encuesta"
-
-#. module: survey
-#: view:survey.question.column.heading:0
-msgid "Use if question type is rating_scale"
-msgstr "Utilizar si la pregunta es de tipo calificaciĂłn_escala"
-
-#. module: survey
-#: field:survey.print,page_number:0
-#: field:survey.print.answer,page_number:0
-msgid "Include Page Number"
-msgstr "Incluir número de página"
-
-#. module: survey
-#: view:survey.page:0
-#: view:survey.question:0
-#: view:survey.send.invitation.log:0
-msgid "Ok"
-msgstr "Aceptar"
-
-#. module: survey
-#: field:survey.page,title:0
-msgid "Page Title"
-msgstr "Título de la página"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_define_survey
-msgid "Define Surveys"
-msgstr "Definir encuestas"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_history
-msgid "Survey History"
-msgstr "HistĂłrico encuestas"
-
-#. module: survey
-#: field:survey.response.answer,comment:0
-#: field:survey.response.line,comment:0
-msgid "Notes"
-msgstr "Notas"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-msgid "Search Survey"
-msgstr "Buscar encuesta"
-
-#. module: survey
-#: field:survey.response.answer,answer:0
-#: field:survey.tbl.column.heading,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: survey
-#: field:survey.question,column_heading_ids:0
-msgid " Column heading"
-msgstr " Cabecera columna"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_run_survey_form
-msgid "Answer a Survey"
-msgstr "Responder una encuesta"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:92
-#, python-format
-msgid "Error!"
-msgstr "¡Error!"
-
-#. module: survey
-#: field:survey,tot_comp_survey:0
-msgid "Total Completed Survey"
-msgstr "Total encuestas completadas"
-
-#. module: survey
-#: view:survey.response.answer:0
-msgid "(Use Only Question Type is matrix_of_drop_down_menus)"
-msgstr "(usar sĂłlo cuando el tipo de pregunta sea matrix_of_drop_down_menus)"
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.survey_analysis
-msgid "Survey Statistics"
-msgstr "EstadĂ­sticas encuestas"
-
-#. module: survey
-#: selection:survey,state:0
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Cancelled"
-msgstr "Cancelada"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Rating Scale"
-msgstr "Escala de calificaciĂłn"
-
-#. module: survey
-#: field:survey.question,comment_field_type:0
-msgid "Comment Field Type"
-msgstr "Campo tipo comentario"
-
-#. module: survey
-#: code:addons/survey/survey.py:375
-#: code:addons/survey/survey.py:387
-#: code:addons/survey/survey.py:401
-#: code:addons/survey/survey.py:406
-#: code:addons/survey/survey.py:416
-#: code:addons/survey/survey.py:422
-#: code:addons/survey/survey.py:428
-#: code:addons/survey/survey.py:434
-#: code:addons/survey/survey.py:438
-#: code:addons/survey/survey.py:444
-#: code:addons/survey/survey.py:448
-#: code:addons/survey/survey.py:458
-#: code:addons/survey/survey.py:462
-#: code:addons/survey/survey.py:467
-#: code:addons/survey/survey.py:473
-#: code:addons/survey/survey.py:475
-#: code:addons/survey/survey.py:477
-#: code:addons/survey/survey.py:482
-#: code:addons/survey/survey.py:484
-#: code:addons/survey/survey.py:642
-#: code:addons/survey/wizard/survey_answer.py:124
-#: code:addons/survey/wizard/survey_answer.py:131
-#: code:addons/survey/wizard/survey_answer.py:700
-#: code:addons/survey/wizard/survey_answer.py:739
-#: code:addons/survey/wizard/survey_answer.py:759
-#: code:addons/survey/wizard/survey_answer.py:788
-#: code:addons/survey/wizard/survey_answer.py:793
-#: code:addons/survey/wizard/survey_answer.py:801
-#: code:addons/survey/wizard/survey_answer.py:812
-#: code:addons/survey/wizard/survey_answer.py:821
-#: code:addons/survey/wizard/survey_answer.py:826
-#: code:addons/survey/wizard/survey_answer.py:900
-#: code:addons/survey/wizard/survey_answer.py:936
-#: code:addons/survey/wizard/survey_answer.py:954
-#: code:addons/survey/wizard/survey_answer.py:982
-#: code:addons/survey/wizard/survey_answer.py:985
-#: code:addons/survey/wizard/survey_answer.py:988
-#: code:addons/survey/wizard/survey_answer.py:1000
-#: code:addons/survey/wizard/survey_answer.py:1007
-#: code:addons/survey/wizard/survey_answer.py:1010
-#: code:addons/survey/wizard/survey_selection.py:134
-#: code:addons/survey/wizard/survey_selection.py:138
-#: code:addons/survey/wizard/survey_send_invitation.py:74
-#, python-format
-msgid "Warning !"
-msgstr "¡ Advertencia !"
-
-#. module: survey
-#: selection:survey.question,comment_field_type:0
-msgid "Single Line Of Text"
-msgstr "Ăšnica lĂ­nea de texto"
-
-#. module: survey
-#: view:survey.send.invitation:0
-#: field:survey.send.invitation,send_mail_existing:0
-msgid "Send Reminder for Existing User"
-msgstr "Enviar recordatorio para usuario existente"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Choice (Multiple Answer)"
-msgstr "SelecciĂłn mĂşltiple (mĂştiples respuestas)"
-
-#. module: survey
-#: view:survey:0
-msgid "Edit Survey"
-msgstr "Editar encuesta"
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Survey Answer Line"
-msgstr "LĂ­ne de respuesta encuesta"
-
-#. module: survey
-#: field:survey.question.column.heading,menu_choice:0
-msgid "Menu Choice"
-msgstr "SelecciĂłn MenĂş"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "At Most"
-msgstr "Como máximo"
-
-#. module: survey
-#: field:survey.question,is_validation_require:0
-msgid "Validate Text"
-msgstr "Validar texto"
-
-#. module: survey
-#: field:survey.response.line,single_text:0
-msgid "Text"
-msgstr "Texto"
-
-#. module: survey
-#: constraint:res.users:0
-msgid "The chosen company is not in the allowed companies for this user"
-msgstr ""
-"La compañía seleccionada no está en las compañías permitidas para este "
-"usuario"
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "Letter (8.5\" x 11\")"
-msgstr "Carta (8.5\" x 11\")"
-
-#. module: survey
-#: view:survey:0
-#: field:survey,responsible_id:0
-msgid "Responsible"
-msgstr "Responsable"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_request
-msgid "survey.request"
-msgstr "solicitud.encuesta"
-
-#. module: survey
-#: field:survey.send.invitation,mail_subject:0
-#: field:survey.send.invitation,mail_subject_existing:0
-msgid "Subject"
-msgstr "Asunto"
-
-#. module: survey
-#: field:survey.question,comment_maximum_float:0
-#: field:survey.question,validation_maximum_float:0
-msgid "Maximum decimal number"
-msgstr "Máximo número de decimales"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Late"
-msgstr "Retrasado"
-
-#. module: survey
-#: sql_constraint:res.users:0
-msgid "You can not have two users with the same login !"
-msgstr "¡No puede tener dos usuarios con el mismo identificador de usuario!"
-
-#. module: survey
-#: field:survey.send.invitation,mail_from:0
-msgid "From"
-msgstr "De"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Don't Validate Comment Text."
-msgstr "No validar texto de comentario"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Whole Number"
-msgstr "Debe ser un nĂşmero entero"
-
-#. module: survey
-#: field:survey.answer,question_id:0
-#: field:survey.page,question_ids:0
-#: field:survey.question,question:0
-#: field:survey.question.column.heading,question_id:0
-#: field:survey.response.line,question_id:0
-msgid "Question"
-msgstr "Pregunta"
-
-#. module: survey
-#: view:survey.page:0
-msgid "Search Survey Page"
-msgstr "Buscar página de la encuesta"
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Send"
-msgstr "Enviar"
-
-#. module: survey
-#: field:survey.question.wiz,name:0
-msgid "Number"
-msgstr "NĂşmero"
-
-#. module: survey
-#: code:addons/survey/survey.py:444
-#, python-format
-msgid ""
-"You must enter one or more menu choices in "
-"column heading"
-msgstr ""
-"Debe introducir una o más opciones de menú en el encabezado de la columna"
-
-#. module: survey
-#: model:ir.actions.act_window,help:survey.action_survey_form1
-msgid ""
-"You can create survey for different purposes: recruitment interviews, "
-"employee's periodical evaluations, marketing campaigns, etc. A survey is "
-"made of pages containing questions of several types: text, multiple choices, "
-"etc. You can edit survey manually or click on the 'Edit Survey' for a "
-"WYSIWYG interface."
-msgstr ""
-"Puede crear encuestas para diferentes propĂłsitos: entrevistas de selecciĂłn "
-"de personal, evaluaciones periódicas de los empleados, campañas de "
-"marketing, etc. Una encuesta se compone de páginas que contienen preguntas "
-"de varios tipos: texto, opciones mĂşltiples, etc. Puede editar la encuesta "
-"manualmente o hacer clic en \"Editar encuesta” para una interfaz WYSIWYG."
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-#: field:survey.request,state:0
-msgid "State"
-msgstr "Estado"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Evaluation Plan Phase"
-msgstr "Fase del plan de evaluaciĂłn"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Between"
-msgstr "Entre"
-
-#. module: survey
-#: view:survey.print:0
-#: view:survey.print.answer:0
-#: view:survey.print.statistics:0
-msgid "Print"
-msgstr "Imprimir"
-
-#. module: survey
-#: field:survey.question,make_comment_field:0
-msgid "Make Comment Field an Answer Choice"
-msgstr "Hacer campo comentario como opciĂłn de respuesta"
-
-#. module: survey
-#: view:survey:0
-#: field:survey,type:0
-msgid "Type"
-msgstr "Tipo"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Email"
-msgstr "Email"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_answer_surveys
-msgid "Answer Surveys"
-msgstr "Reponder encuestas"
-
-#. module: survey
-#: selection:survey.response,state:0
-msgid "Not Finished"
-msgstr "No teminado"
-
-#. module: survey
-#: view:survey.print:0
-msgid "Survey Print"
-msgstr "Imprimir encuesta"
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Select Partner"
-msgstr "Seleccionar empresa"
-
-#. module: survey
-#: field:survey.question,type:0
-msgid "Question Type"
-msgstr "Tipo pregunta"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:131
-#, python-format
-msgid "You can not answer this survey more than %s times"
-msgstr "No puede responder a esta encuesta más de '%s' veces"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_answer
-msgid "Answers"
-msgstr "Respuestas"
-
-#. module: survey
-#: model:ir.module.module,description:survey.module_meta_information
-msgid ""
-"\n"
-" This module is used for surveying. 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 ""
-"\n"
-" Este mĂłdulo se usa para realizar encuestas. Se basa en las respuestas o "
-"comentarios de los usuarios a varias preguntas.\n"
-" Una encuesta puede tener varias páginas. Cada página puede contener "
-"mĂşltiples preguntas y cada pregunta puede tener varias respuestas.\n"
-" Diferentes usuarios pueden dar diferentes respuestas a la pregunta de "
-"acuerdo a como esté confeccionada la encuesta.\n"
-" También se puede invitar a las empresas a responder una encuesta, "
-"enviándoles correos electrónicos con nombre de usuario y contraseña.\n"
-" "
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:124
-#, python-format
-msgid "You can not answer because the survey is not open"
-msgstr "No puede responder porque la encuesta no está abierta"
-
-#. module: survey
-#: selection:survey.response,response_type:0
-msgid "Link"
-msgstr "VĂ­nculo"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_type_form
-#: model:ir.model,name:survey.model_survey_type
-#: view:survey.type:0
-msgid "Survey Type"
-msgstr "Tipo de encuesta"
-
-#. module: survey
-#: field:survey.page,sequence:0
-msgid "Page Nr"
-msgstr "Nº página"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-#: field:survey.question,descriptive_text:0
-#: selection:survey.question,type:0
-msgid "Descriptive Text"
-msgstr "Texto descriptivo"
-
-#. module: survey
-#: field:survey.question,minimum_req_ans:0
-msgid "Minimum Required Answer"
-msgstr "Respuesta mĂ­nima requerida"
-
-#. module: survey
-#: code:addons/survey/survey.py:484
-#, python-format
-msgid ""
-"You must enter one or more menu choices in column heading (white spaces not "
-"allowed)"
-msgstr ""
-"Debe introducir una o más opciones de menú en el encabezado de la columna "
-"(espacios en blanco no está permitidos)"
-
-#. module: survey
-#: field:survey.question,req_error_msg:0
-msgid "Error Message"
-msgstr "Mensaje de error"
-
-#. module: survey
-#: code:addons/survey/survey.py:482
-#, python-format
-msgid "You must enter one or more menu choices in column heading"
-msgstr "Debe introducir una o más opciones de menú en la cabecera de columna"
-
-#. module: survey
-#: field:survey.request,date_deadline:0
-msgid "Deadline date"
-msgstr "Fecha lĂ­mite"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Date"
-msgstr "Debe ser una fecha"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print
-msgid "survey.print"
-msgstr "encuesta.imprimir"
-
-#. module: survey
-#: view:survey.question.column.heading:0
-#: field:survey.question.column.heading,title:0
-msgid "Column Heading"
-msgstr "Cabecera columna"
-
-#. module: survey
-#: field:survey.question,is_require_answer:0
-msgid "Require Answer to Question"
-msgstr "Respuesta obligatoria a la pregunta"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_request_tree
-#: model:ir.ui.menu,name:survey.menu_survey_type_form1
-msgid "Survey Requests"
-msgstr "Solicitudes de encuestas"
-
-#. module: survey
-#: code:addons/survey/survey.py:375
-#: code:addons/survey/survey.py:462
-#, python-format
-msgid "You must enter one or more column heading."
-msgstr "Debe introducir una o más cabeceras de columna."
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:759
-#: code:addons/survey/wizard/survey_answer.py:954
-#, python-format
-msgid "Please enter an integer value"
-msgstr "Por favor introduzca un valor numérico entero"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_browse_answer
-msgid "survey.browse.answer"
-msgstr "encuesta.explorar.respuestas"
-
-#. module: survey
-#: selection:survey.question,comment_field_type:0
-msgid "Paragraph of Text"
-msgstr "Párrafo de texto"
-
-#. module: survey
-#: code:addons/survey/survey.py:428
-#, python-format
-msgid ""
-"Maximum Required Answer you entered for "
-"your maximum is greater than the number of answer. "
-" Please use a number that is smaller than %d."
-msgstr ""
-"El número máximo de respuestas requeridas que ha introducido para su máximo "
-"es mayor que el nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: view:survey.request:0
-msgid "Watting Answer"
-msgstr "Esperando respuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the question is not answered, display this error message:"
-msgstr ""
-"Cuando la respuesta no sea contestada, mostrar este mensaje de error:"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Options"
-msgstr "Opciones"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_browse_survey_response
-msgid "Browse Answers"
-msgstr "Buscar respuestas"
-
-#. module: survey
-#: field:survey.response.answer,comment_field:0
-#: view:survey.response.line:0
-msgid "Comment"
-msgstr "Comentario"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_answer
-#: model:ir.model,name:survey.model_survey_response_answer
-#: view:survey.answer:0
-#: view:survey.response:0
-#: view:survey.response.answer:0
-#: view:survey.response.line:0
-msgid "Survey Answer"
-msgstr "Respuesta encuesta"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Selection"
-msgstr "SelecciĂłn"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_browse_survey_response
-#: view:survey:0
-msgid "Answer Survey"
-msgstr "Responder encuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Comment Field"
-msgstr "Campo comentario"
-
-#. module: survey
-#: selection:survey.response,response_type:0
-msgid "Manually"
-msgstr "Manualmente"
-
-#. module: survey
-#: help:survey,responsible_id:0
-msgid "User responsible for survey"
-msgstr "Usuario responsable de la encuesta."
-
-#. module: survey
-#: field:survey.question,comment_column:0
-msgid "Add comment column in matrix"
-msgstr "Añadir columna de comentarios en la matriz"
-
-#. module: survey
-#: field:survey.answer,response:0
-msgid "#Answer"
-msgstr "#Respuesta"
-
-#. module: survey
-#: field:survey.print,without_pagebreak:0
-#: field:survey.print.answer,without_pagebreak:0
-msgid "Print Without Page Breaks"
-msgstr "Imprimir sin saltos de página"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the comment is an invalid format, display this error message"
-msgstr ""
-"Mostrar este mensaje de error cuando el comentario esté en un formato no "
-"válido"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_selection.py:138
-#, python-format
-msgid ""
-"You can not give more response. Please contact the author of this survey for "
-"further assistance."
-msgstr ""
-"No puede dar más respuestas. Póngase en contacto con el autor de esta "
-"encuesta para obtener más ayuda."
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_page_question
-#: model:ir.actions.act_window,name:survey.act_survey_question
-msgid "Questions"
-msgstr "Preguntas"
-
-#. module: survey
-#: help:survey,response_user:0
-msgid "Set to one if you require only one Answer per user"
-msgstr "Establecer a uno si sĂłlo requiere una respuesta por usuario."
-
-#. module: survey
-#: field:survey,users:0
-msgid "Users"
-msgstr "Usuarios"
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Message"
-msgstr "Mensaje"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-msgid "MY"
-msgstr "MI"
-
-#. module: survey
-#: field:survey.question,maximum_req_ans:0
-msgid "Maximum Required Answer"
-msgstr "Máximas respuestas requeridas"
-
-#. module: survey
-#: field:survey.name.wiz,page_no:0
-msgid "Page Number"
-msgstr "Número de página"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:92
-#, python-format
-msgid "Cannot locate survey for the question wizard!"
-msgstr "¡No se pudo localizar la encuesta para el asistente de preguntas!"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "and"
-msgstr "y"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print_statistics
-#: view:survey.print.statistics:0
-msgid "Survey Print Statistics"
-msgstr "Imprimir estadĂ­sticas de encuestas"
-
-#. module: survey
-#: field:survey.send.invitation.log,note:0
-msgid "Log"
-msgstr "Registro (Log)"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the choices do not add up correctly, display this error message"
-msgstr ""
-"Mostrar este mensaje de error cuando las selecciones no totalicen "
-"correctamente"
-
-#. module: survey
-#: field:survey,date_close:0
-msgid "Survey Close Date"
-msgstr "Fecha de cierre encuestas"
-
-#. module: survey
-#: field:survey,date_open:0
-msgid "Survey Open Date"
-msgstr "Fecha apertura de encuesta"
-
-#. module: survey
-#: field:survey.question.column.heading,in_visible_rating_weight:0
-msgid "Is Rating Scale Invisible ??"
-msgstr "ÂżLa escala de calificaciĂłn es invisible?"
-
-#. module: survey
-#: view:survey.browse.answer:0
-#: view:survey.name.wiz:0
-msgid "Start"
-msgstr "Inicio"
-
-#. module: survey
-#: code:addons/survey/survey.py:477
-#, python-format
-msgid "Maximum Required Answer is greater than Minimum Required Answer"
-msgstr ""
-"El número máximo de respuestas requeridas es mayor que el mínimo de "
-"respuestas requeridas."
-
-#. module: survey
-#: field:survey.question,comment_maximum_no:0
-#: field:survey.question,validation_maximum_no:0
-msgid "Maximum number"
-msgstr "Número máximo"
-
-#. module: survey
-#: selection:survey,state:0
-#: selection:survey.request,state:0
-#: selection:survey.response.line,state:0
-msgid "Draft"
-msgstr "Borrador"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print_statistics
-msgid "survey.print.statistics"
-msgstr "encuesta.imprimir.estadisticas"
-
-#. module: survey
-#: selection:survey,state:0
-msgid "Closed"
-msgstr "Cerrada"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Drop-down Menus"
-msgstr "Matriz de menĂşs desplegables"
-
-#. module: survey
-#: view:survey:0
-#: field:survey.answer,answer:0
-#: field:survey.name.wiz,response:0
-#: view:survey.page:0
-#: view:survey.print.answer:0
-#: field:survey.print.answer,response_ids:0
-#: view:survey.question:0
-#: field:survey.question,answer_choice_ids:0
-#: field:survey.request,response:0
-#: field:survey.response,question_ids:0
-#: field:survey.response.answer,answer_id:0
-#: field:survey.response.answer,response_id:0
-#: view:survey.response.line:0
-#: field:survey.response.line,response_answer_ids:0
-#: field:survey.response.line,response_id:0
-#: field:survey.response.line,response_table_ids:0
-#: field:survey.send.invitation,partner_ids:0
-#: field:survey.tbl.column.heading,response_table_id:0
-msgid "Answer"
-msgstr "Respuesta"
-
-#. module: survey
-#: field:survey,max_response_limit:0
-msgid "Maximum Answer Limit"
-msgstr "Límite máximo de respuesta"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_act_view_survey_send_invitation
-msgid "Send Invitations"
-msgstr "Enviar invitaciones"
-
-#. module: survey
-#: field:survey.name.wiz,store_ans:0
-msgid "Store Answer"
-msgstr "Guardar respuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Date and Time"
-msgstr "Fecha y hora"
-
-#. module: survey
-#: field:survey,state:0
-#: field:survey.response,state:0
-#: field:survey.response.line,state:0
-msgid "Status"
-msgstr "Estado"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print
-msgid "Print Survey"
-msgstr "Imprimir encuesta"
-
-#. module: survey
-#: field:survey,send_response:0
-msgid "E-mail Notification on Answer"
-msgstr "Email de notificaciĂłn sobre la respuesta"
-
-#. module: survey
-#: field:survey.response.answer,value_choice:0
-msgid "Value Choice"
-msgstr "Valor selecciĂłn"
-
-#. module: survey
-#: view:survey:0
-msgid "Started"
-msgstr "Iniciada"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print_answer
-#: view:survey:0
-#: view:survey.print.answer:0
-msgid "Print Answer"
-msgstr "Imprimir respuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Textboxes"
-msgstr "Campos de texto mĂşltiples"
-
-#. module: survey
-#: selection:survey.print,orientation:0
-#: selection:survey.print.answer,orientation:0
-msgid "Landscape(Horizontal)"
-msgstr "Horizontal"
-
-#. module: survey
-#: field:survey.question,no_of_rows:0
-msgid "No of Rows"
-msgstr "NÂş de columnas"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.name.wiz:0
-msgid "Survey Details"
-msgstr "Detalles encuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Textboxes With Different Type"
-msgstr "Campos de texto mĂşltiples con tipo diferente"
-
-#. module: survey
-#: view:survey.question.column.heading:0
-msgid "Menu Choices (each choice on separate lines)"
-msgstr "Opciones de menĂş (cada opciĂłn en lĂ­neas separadas)"
-
-#. module: survey
-#: field:survey.response,response_type:0
-msgid "Answer Type"
-msgstr "Tipo respuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Validation"
-msgstr "ValidaciĂłn"
-
-#. module: survey
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Waiting Answer"
-msgstr "Esperando respuesta"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Decimal Number"
-msgstr "Debe ser un nĂşmero decimal"
-
-#. module: survey
-#: field:res.users,survey_id:0
-msgid "Groups"
-msgstr "Grupos"
-
-#. module: survey
-#: selection:survey.answer,type:0
-#: selection:survey.question,type:0
-msgid "Date"
-msgstr "Fecha"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Integer"
-msgstr "Entero"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_send_invitation
-msgid "survey.send.invitation"
-msgstr "encuesta.enviar.invitacion"
-
-#. module: survey
-#: field:survey.history,user_id:0
-#: view:survey.request:0
-#: field:survey.request,user_id:0
-#: field:survey.response,user_id:0
-msgid "User"
-msgstr "Usuario"
-
-#. module: survey
-#: field:survey.name.wiz,transfer:0
-msgid "Page Transfer"
-msgstr "Página de transferencia"
-
-#. module: survey
-#: selection:survey.response.line,state:0
-msgid "Skiped"
-msgstr "Omitido"
-
-#. module: survey
-#: field:survey.print,paper_size:0
-#: field:survey.print.answer,paper_size:0
-msgid "Paper Size"
-msgstr "Tamaño del papel"
-
-#. module: survey
-#: field:survey.response.answer,column_id:0
-#: field:survey.tbl.column.heading,column_id:0
-msgid "Column"
-msgstr "Columna"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_tbl_column_heading
-msgid "survey.tbl.column.heading"
-msgstr "encuesta.tbl.columna.cabecera"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_response_line
-msgid "Survey Response Line"
-msgstr "LĂ­nea de respuesta de encuesta"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_selection.py:134
-#, python-format
-msgid "You can not give response for this survey more than %s times"
-msgstr "No puede responder esta encuesta más de %s veces"
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.report_survey_form
-#: model:ir.model,name:survey.model_survey
-#: view:survey:0
-#: view:survey.browse.answer:0
-#: field:survey.browse.answer,survey_id:0
-#: field:survey.history,survey_id:0
-#: view:survey.name.wiz:0
-#: field:survey.name.wiz,survey_id:0
-#: view:survey.page:0
-#: field:survey.page,survey_id:0
-#: view:survey.print:0
-#: field:survey.print,survey_ids:0
-#: field:survey.print.statistics,survey_ids:0
-#: field:survey.question,survey:0
-#: view:survey.request:0
-#: field:survey.request,survey_id:0
-#: field:survey.response,survey_id:0
-msgid "Survey"
-msgstr "Encuesta"
-
-#. module: survey
-#: field:survey.question,in_visible_rating_weight:0
-msgid "Is Rating Scale Invisible?"
-msgstr "ÂżLa escala de calificaciĂłn es invisible?"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Numerical Textboxes"
-msgstr "Campos de texto numéricos"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_question_wiz
-msgid "survey.question.wiz"
-msgstr "enquesta.pregunta.asist"
-
-#. module: survey
-#: view:survey:0
-msgid "History"
-msgstr "Historial"
-
-#. module: survey
-#: help:survey.browse.answer,response_id:0
-msgid ""
-"If this field is empty, all answers of the selected survey will be print."
-msgstr ""
-"Si este campo está vacío, se imprimirán todas las respuestas de la encuesta "
-"seleccionada."
-
-#. module: survey
-#: field:survey.type,code:0
-msgid "Code"
-msgstr "CĂłdigo"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_print_survey_statistics
-msgid "Surveys Statistics"
-msgstr "EstadĂ­sticas de encuestas"
-
-#. module: survey
-#: field:survey.print,orientation:0
-#: field:survey.print.answer,orientation:0
-msgid "Orientation"
-msgstr "OrientaciĂłn"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.answer:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Seq"
-msgstr "Secuencia"
-
-#. module: survey
-#: field:survey.request,email:0
-msgid "E-mail"
-msgstr "Email"
-
-#. module: survey
-#: field:survey.question,comment_minimum_no:0
-#: field:survey.question,validation_minimum_no:0
-msgid "Minimum number"
-msgstr "NĂşmero mĂ­nimo"
-
-#. module: survey
-#: field:survey.question,req_ans:0
-msgid "#Required Answer"
-msgstr "NÂş de respuestas requeridas"
-
-#. module: survey
-#: field:survey.answer,sequence:0
-#: field:survey.question,sequence:0
-msgid "Sequence"
-msgstr "Secuencia"
-
-#. module: survey
-#: field:survey.question,comment_label:0
-msgid "Field Label"
-msgstr "Etiqueta del campo"
-
-#. module: survey
-#: view:survey:0
-msgid "Other"
-msgstr "Otros"
-
-#. module: survey
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Done"
-msgstr "Realizado"
-
-#. module: survey
-#: view:survey:0
-msgid "Test Survey"
-msgstr "Probar encuesta"
-
-#. module: survey
-#: field:survey.question,rating_allow_one_column_require:0
-msgid "Allow Only One Answer per Column (Forced Ranking)"
-msgstr "Permitir una sĂłla respuesta por columna (clasificaciĂłn forzada)"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.browse.answer:0
-#: view:survey.name.wiz:0
-#: view:survey.print:0
-#: view:survey.print.answer:0
-#: view:survey.print.statistics:0
-#: view:survey.send.invitation:0
-msgid "Cancel"
-msgstr "Cancelar"
-
-#. module: survey
-#: view:survey:0
-msgid "Close"
-msgstr "Cerrar"
-
-#. module: survey
-#: field:survey.question,comment_minimum_float:0
-#: field:survey.question,validation_minimum_float:0
-msgid "Minimum decimal number"
-msgstr "NĂşmero decimal mĂ­nimo"
-
-#. module: survey
-#: view:survey:0
-#: selection:survey,state:0
-msgid "Open"
-msgstr "Abrir"
-
-#. module: survey
-#: field:survey,tot_start_survey:0
-msgid "Total Started Survey"
-msgstr "Total encuestas empezadas"
-
-#. module: survey
-#: code:addons/survey/survey.py:467
-#, python-format
-msgid ""
-"#Required Answer you entered is greater than the number of answer. Please "
-"use a number that is smaller than %d."
-msgstr ""
-"El nĂşmero de respuestas requeridas que ha escrito es mayor que el nĂşmero de "
-"respuestas. Introduzca un nĂşmero menor que %d."
-
-#. module: survey
-#: help:survey,max_response_limit:0
-msgid "Set to one if survey is answerable only once"
-msgstr "Establecer a uno si la encuesta sĂłlo puede responderse una vez."
-
-#. module: survey
-#: selection:survey.response,state:0
-msgid "Finished "
-msgstr "Terminado "
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_question_column_heading
-msgid "Survey Question Column Heading"
-msgstr "Cabecera de columna de pregunta de encuesta"
-
-#. module: survey
-#: field:survey.answer,average:0
-msgid "#Avg"
-msgstr "#Prom."
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Choices (Multiple Answers Per Row)"
-msgstr "Matriz de opciones (mĂşltiples respuestas por fila)"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_name
-msgid "Give Survey Answer"
-msgstr "Responder encuesta"
-
-#. module: survey
-#: model:ir.model,name:survey.model_res_users
-msgid "res.users"
-msgstr "res.usuarios"
-
-#. module: survey
-#: view:survey:0
-msgid "Current"
-msgstr "Actual"
-
-#. module: survey
-#: selection:survey.response.line,state:0
-msgid "Answered"
-msgstr "Contestadas"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:433
-#, python-format
-msgid "Complete Survey Answer"
-msgstr "Respuesta completa de la encuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Comment/Essay Box"
-msgstr "Campo de comentarios/redacciĂłn"
-
-#. module: survey
-#: field:survey.answer,type:0
-msgid "Type of Answer"
-msgstr "Tipo de respuesta"
-
-#. module: survey
-#: field:survey.question,required_type:0
-msgid "Respondent must answer"
-msgstr "El encuestado debe responder"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_send_invitation
-#: view:survey.send.invitation:0
-msgid "Send Invitation"
-msgstr "Enviar invitaciĂłn"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:793
-#, python-format
-msgid "You cannot select the same answer more than one time"
-msgstr "No se puede seleccionar la misma respuesta más de una vez"
-
-#. module: survey
-#: view:survey.question:0
-msgid "Search Question"
-msgstr "Buscar pregunta"
-
-#. module: survey
-#: field:survey,title:0
-msgid "Survey Title"
-msgstr "TĂ­tulo de la encuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Single Textbox"
-msgstr "Campo de texto Ăşnico"
-
-#. module: survey
-#: field:survey,note:0
-#: field:survey.name.wiz,note:0
-#: view:survey.page:0
-#: field:survey.page,note:0
-#: view:survey.response.line:0
-msgid "Description"
-msgstr "DescripciĂłn"
-
-#. module: survey
-#: view:survey.name.wiz:0
-msgid "Select Survey"
-msgstr "Seleccionar encuesta"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "At Least"
-msgstr "Al menos"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_send_invitation_log
-#: model:ir.model,name:survey.model_survey_send_invitation_log
-msgid "survey.send.invitation.log"
-msgstr "encuesta.enviar.invitacion.registro"
-
-#. module: survey
-#: selection:survey.print,orientation:0
-#: selection:survey.print.answer,orientation:0
-msgid "Portrait(Vertical)"
-msgstr "Retrato (Vertical)"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be Specific Length"
-msgstr "Debe ser de longitud especĂ­fica"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: field:survey.question,page_id:0
-msgid "Survey Page"
-msgstr "Página de la encuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Required Answer"
-msgstr "Respuesta requerida"
-
-#. module: survey
-#: code:addons/survey/survey.py:473
-#, python-format
-msgid ""
-"Minimum Required Answer you entered is greater than the number of answer. "
-"Please use a number that is smaller than %d."
-msgstr ""
-"El mĂ­nimo de respuestas requeridas que ha introducido es mayor que el nĂşmero "
-"de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: code:addons/survey/survey.py:458
-#, python-format
-msgid "You must enter one or more answer."
-msgstr "Debe dar una o más respuestas."
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.survey_browse_response
-#: field:survey.browse.answer,response_id:0
-msgid "Survey Answers"
-msgstr "Respuestas encuesta"
-
-#. module: survey
-#: view:survey.browse.answer:0
-msgid "Select Survey and Related Answer"
-msgstr "Seleccione encuesta y respuesta relacionada"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_print_survey_answer
-msgid "Surveys Answers"
-msgstr "Respuestas encuestas"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_pages
-msgid "Pages"
-msgstr "Páginas"
-
-#. module: survey
-#: code:addons/survey/survey.py:406
-#, python-format
-msgid ""
-"#Required Answer you entered is greater "
-"than the number of answer. Please use a "
-"number that is smaller than %d."
-msgstr ""
-"El nĂşmero de respuestas requeridas que ha introducido es mayor que el nĂşmero "
-"de respuestas. Utilice un nĂşmero menor que %d."
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:985
-#, python-format
-msgid "You cannot select same answer more than one time'"
-msgstr "No puede seleccionar la misma respuesta más de una vez"
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "Legal (8.5\" x 14\")"
-msgstr "Legal (8.5\" x 14\")"
-
-#. module: survey
-#: field:survey.type,name:0
-msgid "Name"
-msgstr "Nombre"
-
-#. module: survey
-#: view:survey.page:0
-msgid "#Questions"
-msgstr "#Preguntas"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_response
-msgid "survey.response"
-msgstr "encuesta.respuesta"
-
-#. module: survey
-#: field:survey.question,comment_valid_err_msg:0
-#: field:survey.question,make_comment_field_err_msg:0
-#: field:survey.question,numeric_required_sum_err_msg:0
-#: field:survey.question,validation_valid_err_msg:0
-msgid "Error message"
-msgstr "Mensaje de error"
-
-#. module: survey
-#: model:ir.module.module,shortdesc:survey.module_meta_information
-msgid "Survey Module"
-msgstr "MĂłdulo encuestas"
-
-#. module: survey
-#: view:survey.send.invitation:0
-#: field:survey.send.invitation,send_mail:0
-msgid "Send Mail for New User"
-msgstr "Enviar email para nuevo usuario"
-
-#. module: survey
-#: code:addons/survey/survey.py:387
-#, python-format
-msgid "You must enter one or more Answer."
-msgstr "Debe introducir una o más respuestas"
-
-#. module: survey
-#: code:addons/survey/survey.py:416
-#, python-format
-msgid ""
-"Minimum Required Answer you entered is "
-"greater than the number of answer. Please "
-"use a number that is smaller than %d."
-msgstr ""
-"El mĂ­nimo de respuestas requeridas que ha introducido es mayor que el nĂşmero "
-"de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: field:survey.answer,menu_choice:0
-msgid "Menu Choices"
-msgstr "Opciones de menĂş"
-
-#. module: survey
-#: field:survey,page_ids:0
-#: view:survey.question:0
-#: field:survey.response.line,page_id:0
-msgid "Page"
-msgstr "Página"
-
-#. module: survey
-#: code:addons/survey/survey.py:438
-#, python-format
-msgid ""
-"Maximum Required Answer is greater than "
-"Minimum Required Answer"
-msgstr ""
-"El máximo de respuestas requeridas es menor que el mínimo de respuestas "
-"requeridas"
-
-#. module: survey
-#: view:survey.send.invitation.log:0
-msgid "User creation"
-msgstr "CreaciĂłn usuario"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "All"
-msgstr "Todos"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be An Email Address"
-msgstr "Debe ser una direcciĂłn de email"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Choice (Only One Answer)"
-msgstr "SelecciĂłn mĂşltiple (sĂłlo una respuesta)"
-
-#. module: survey
-#: field:survey.answer,in_visible_answer_type:0
-msgid "Is Answer Type Invisible??"
-msgstr "ÂżEl tipo de respuesta es invisible?"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print_answer
-msgid "survey.print.answer"
-msgstr "encuesta.imprimir.respuesta"
-
-#. module: survey
-#: view:survey.answer:0
-msgid "Menu Choices (each choice on separate by lines)"
-msgstr "Opciones de menĂş (cada opciĂłn en lĂ­neas separadas)"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Float"
-msgstr "NĂşmero flotante"
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Single Textboxes"
-msgstr "Campos de texto Ăşnicos"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_send_invitation.py:74
-#, python-format
-msgid "%sSurvey is not in open state"
-msgstr "%s encuesta no está en estado abierto"
-
-#. module: survey
-#: field:survey.question.column.heading,rating_weight:0
-msgid "Weight"
-msgstr "Peso"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Date & Time"
-msgstr "Fecha y hora"
-
-#. module: survey
-#: field:survey.response,date_create:0
-#: field:survey.response.line,date_create:0
-msgid "Create Date"
-msgstr "Fecha creaciĂłn"
-
-#. module: survey
-#: field:survey.question,column_name:0
-msgid "Column Name"
-msgstr "Nombre de columna"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_page_form
-#: model:ir.model,name:survey.model_survey_page
-#: model:ir.ui.menu,name:survey.menu_survey_page_form1
-#: view:survey.page:0
-msgid "Survey Pages"
-msgstr "Páginas encuesta"
-
-#. module: survey
-#: field:survey.question,numeric_required_sum:0
-msgid "Sum of all choices"
-msgstr "Suma de todas las elecciones"
-
-#. module: survey
-#: selection:survey.question,type:0
-#: view:survey.response.line:0
-msgid "Table"
-msgstr "Tabla"
-
-#. module: survey
-#: code:addons/survey/survey.py:642
-#, python-format
-msgid "You cannot duplicate the resource!"
-msgstr "¡No puede duplicar el recurso!"
-
-#. module: survey
-#: field:survey.question,comment_minimum_date:0
-#: field:survey.question,validation_minimum_date:0
-msgid "Minimum date"
-msgstr "Fecha mĂ­nima"
-
-#. module: survey
-#: field:survey,response_user:0
-msgid "Maximum Answer per User"
-msgstr "Máximas respuestas por usuario"
-
-#. module: survey
-#: field:survey.name.wiz,page:0
-msgid "Page Position"
-msgstr "Posición página"
-
-#~ msgid "All Questions"
-#~ msgstr "Todas las preguntas"
-
-#~ msgid "Give Survey Response"
-#~ msgstr "Responder la encuesta"
-
-#~ msgid "Invalid model name in the action definition."
-#~ msgstr "Nombre de modelo inválido en la definición de acción."
-
-#~ msgid "Survey Analysis Report"
-#~ msgstr "Informe de análisis de encuestas"
-
-#~ msgid "Total Response"
-#~ msgstr "Respuesta total"
-
-#~ msgid "Set to one if you require only one response per user"
-#~ msgstr "Establecer a uno si sĂłlo necesita una respuesta por usuario"
-
-#~ msgid "Users Details"
-#~ msgstr "Detalles usuarios"
-
-#~ msgid "Partner"
-#~ msgstr "Empresa"
-
-#~ msgid "Skip"
-#~ msgstr "Saltar"
-
-#~ msgid "New Survey Question"
-#~ msgstr "Nueva pregunta de encuesta"
-
-#~ msgid "Maximum Response Limit"
-#~ msgstr "Límite respuesta máxima"
-
-#~ msgid "Invalid XML for View Architecture!"
-#~ msgstr "¡XML no válido para la estructura de la vista!"
-
-#~ msgid ""
-#~ "The Object name must start with x_ and not contain any special character !"
-#~ msgstr ""
-#~ "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter "
-#~ "especial!"
-
-#~ msgid "Configuration"
-#~ msgstr "ConfiguraciĂłn"
-
-#~ msgid "_Ok"
-#~ msgstr "_Aceptar"
-
-#~ msgid "Page :-"
-#~ msgstr "Página :-"
-
-#~ msgid "#Response"
-#~ msgstr "#Respuesta"
-
-#~ msgid "Response Summary"
-#~ msgstr "Resumen respuesta"
-
-#~ msgid "Response Type"
-#~ msgstr "Tipo respuesta"
-
-#, python-format
-#~ msgid "Error !"
-#~ msgstr "¡Error!"
-
-#~ msgid "New Survey"
-#~ msgstr "Nueva encuesta"
-
-#~ msgid "Response"
-#~ msgstr "Respuesta"
-
-#~ msgid "Modify Date"
-#~ msgstr "Fecha modificada"
-
-#~ msgid "Answered Question"
-#~ msgstr "Pregunta respondida"
-
-#~ msgid "All Surveys"
-#~ msgstr "Todas las encuentas"
-
-#~ 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 ""
-#~ "\n"
-#~ " Este mĂłdulo es utilizado para realizar encuestas. Depende de las "
-#~ "respuestas o revisiĂłn de alguna preguntas por distintos usuarios\n"
-#~ " Una encuesta puede tener múltiples páginas. Cada página puede contener "
-#~ "distintas preguntas y cada pregunta puede tener mĂşltiples respuestas.\n"
-#~ " Distintos usuarios pueden dar distintas respuestas a las preguntas en "
-#~ "funciĂłn de la encuesta realizada \n"
-#~ " También se pueden enviar correos a las empresas con nombre de usuario y "
-#~ "password con una invitaciĂłn a realizar la encuesta.\n"
-#~ " "
-
-#~ msgid "All Survey Questions"
-#~ msgstr "Todas las preguntas de encuestas"
-
-#~ msgid "All Survey Pages"
-#~ msgstr "Todas páginas de encuesta"
-
-#~ msgid "Total Started Survey :-"
-#~ msgstr "Total encuestas iniciadas :-"
-
-#~ msgid "Survey Management"
-#~ msgstr "GestiĂłn de encuestas"
-
-#~ msgid "Survey Response"
-#~ msgstr "Respuesta encuesta"
-
-#, python-format
-#~ msgid "'\" + que_rec[0]['question'] + \"' This question requires an answer."
-#~ msgstr ""
-#~ "Copy text \t\r\n"
-#~ "'\" + que_rec[0]['question'] + \"' Esta pregunta requiere una respuesta"
-
-#~ msgid "New Survey Page"
-#~ msgstr "Nueva página de encuesta"
-
-#~ msgid "Survey Title :-"
-#~ msgstr "TĂ­tulo encuesta :-"
-
-#~ msgid "Response Percentage"
-#~ msgstr "Porcentaje respuesta"
-
-#~ msgid "%"
-#~ msgstr "%"
-
-#~ msgid "Total Completed Survey :-"
-#~ msgstr "Total encuesta completada :-"
-
-#, python-format
-#~ msgid "Attention!"
-#~ msgstr "¡Atención!"
-
-#~ msgid "Response Count"
-#~ msgstr "Cuenta respuestas"
-
-#~ msgid "Maximum Response per User"
-#~ msgstr "Máximas respuestas por usuario"
diff --git a/addons/survey/i18n/es_VE.po b/addons/survey/i18n/es_VE.po
deleted file mode 100644
index 7c1c9bbbad1..00000000000
--- a/addons/survey/i18n/es_VE.po
+++ /dev/null
@@ -1,1914 +0,0 @@
-# Spanish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2011-01-11 11:16+0000\n"
-"PO-Revision-Date: 2011-01-18 18:43+0000\n"
-"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
-"<jesteve@zikzakmedia.com>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-09-05 05:45+0000\n"
-"X-Generator: Launchpad (build 13830)\n"
-
-#. module: survey
-#: view:survey.print:0
-#: view:survey.print.answer:0
-msgid "Print Option"
-msgstr "OpciĂłn imprimir"
-
-#. module: survey
-#: code:addons/survey/survey.py:422
-#, python-format
-msgid ""
-"Minimum Required Answer you entered is "
-"greater than the number of answer. "
-"Please use a number that is smaller than %d."
-msgstr ""
-"El nĂşmero mĂ­nimo de respuestas requeridas que ha introducido es mayor que el "
-"nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: view:survey.question.wiz:0
-msgid "Your Messages"
-msgstr "Sus mensajes"
-
-#. module: survey
-#: field:survey.question,comment_valid_type:0
-#: field:survey.question,validation_type:0
-msgid "Text Validation"
-msgstr "ValidaciĂłn del texto"
-
-#. module: survey
-#: code:addons/survey/survey.py:434
-#, python-format
-msgid ""
-"Maximum Required Answer you entered for "
-"your maximum is greater than the number of answer. "
-" Please use a number that is smaller than %d."
-msgstr ""
-"El número máximo de respuestas requeridas que ha introducido para su máximo "
-"es mayor que el nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: view:survey:0
-#: field:survey,invited_user_ids:0
-msgid "Invited User"
-msgstr "Usuario invitado"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Character"
-msgstr "Carácter"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_form1
-#: model:ir.ui.menu,name:survey.menu_print_survey_form
-#: model:ir.ui.menu,name:survey.menu_reporting
-#: model:ir.ui.menu,name:survey.menu_survey_form
-#: model:ir.ui.menu,name:survey.menu_surveys
-msgid "Surveys"
-msgstr "Encuestas"
-
-#. module: survey
-#: view:survey:0
-msgid "Set to draft"
-msgstr "Cambiar a borrador"
-
-#. module: survey
-#: field:survey.question,in_visible_answer_type:0
-msgid "Is Answer Type Invisible?"
-msgstr "ÂżLa respuesta es de tipo invisible?"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-#: view:survey.request:0
-msgid "Group By..."
-msgstr "Agrupar por..."
-
-#. module: survey
-#: view:survey.send.invitation.log:0
-msgid "Results :"
-msgstr "Resultados :"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Survey Request"
-msgstr "Solicitud de encuesta"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "A Range"
-msgstr "Un rango"
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Table Answer"
-msgstr "Tabla de respuesta"
-
-#. module: survey
-#: field:survey.history,date:0
-msgid "Date started"
-msgstr "Fecha de inicio"
-
-#. module: survey
-#: field:survey,history:0
-msgid "History Lines"
-msgstr "LĂ­neas histĂłrico"
-
-#. module: survey
-#: code:addons/survey/survey.py:448
-#, python-format
-msgid ""
-"You must enter one or more menu choices in "
-"column heading (white spaces not allowed)"
-msgstr ""
-"Debe introducir una o más opciones de menú en la cabecera de columna (no se "
-"permiten espacios en blanco)"
-
-#. module: survey
-#: field:survey.question.column.heading,in_visible_menu_choice:0
-msgid "Is Menu Choice Invisible??"
-msgstr "ÂżLa opciĂłn de menĂş es invisible?"
-
-#. module: survey
-#: field:survey.send.invitation,mail:0
-msgid "Body"
-msgstr "Cuerpo"
-
-#. module: survey
-#: field:survey.question,allow_comment:0
-msgid "Allow Comment Field"
-msgstr "Permitir campo comentario"
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "A4 (210mm x 297mm)"
-msgstr "A4 (210mm x 297mm)"
-
-#. module: survey
-#: field:survey.question,comment_maximum_date:0
-#: field:survey.question,validation_maximum_date:0
-msgid "Maximum date"
-msgstr "Fecha Máxima"
-
-#. module: survey
-#: field:survey.question,in_visible_menu_choice:0
-msgid "Is Menu Choice Invisible?"
-msgstr "ÂżLa opciĂłn de menĂş es invisible?"
-
-#. module: survey
-#: view:survey:0
-msgid "Completed"
-msgstr "Completada"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "Exactly"
-msgstr "Exactamente"
-
-#. module: survey
-#: view:survey:0
-msgid "Open Date"
-msgstr "Fecha de Inicio"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Set to Draft"
-msgstr "Cambiar a borrador"
-
-#. module: survey
-#: field:survey.question,is_comment_require:0
-msgid "Add Comment Field"
-msgstr "Campo para agregar comentario"
-
-#. module: survey
-#: code:addons/survey/survey.py:401
-#, python-format
-msgid ""
-"#Required Answer you entered is greater "
-"than the number of answer. Please use a "
-"number that is smaller than %d."
-msgstr ""
-"NĂşmero de respuestas requeridas que ha escrito es mayor que el nĂşmero de "
-"respuestas. Introduzca un nĂşmero menor que %d."
-
-#. module: survey
-#: field:survey.question,tot_resp:0
-msgid "Total Answer"
-msgstr "Total respuesta"
-
-#. module: survey
-#: field:survey.tbl.column.heading,name:0
-msgid "Row Number"
-msgstr "NĂşmero de Fila"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_name_wiz
-msgid "survey.name.wiz"
-msgstr "encuesta.nombre.asist"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_question_form
-msgid "Survey Questions"
-msgstr "Preguntas de las encuestas"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Choices (Only One Answers Per Row)"
-msgstr "Matriz de selecciĂłn (solamente una respuesta por fila)"
-
-#. module: survey
-#: code:addons/survey/survey.py:475
-#, python-format
-msgid ""
-"Maximum Required Answer you entered for your maximum is greater than the "
-"number of answer. Please use a number that is smaller than %d."
-msgstr ""
-"El número máximo de respuestas requeridas que ha introducido para su máximo "
-"es mayor que el nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. 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 "Pregunta de la encuesta"
-
-#. module: survey
-#: view:survey.question.column.heading:0
-msgid "Use if question type is rating_scale"
-msgstr "Utilizar si la pregunta es de tipo calificaciĂłn_escala"
-
-#. module: survey
-#: field:survey.print,page_number:0
-#: field:survey.print.answer,page_number:0
-msgid "Include Page Number"
-msgstr "Incluir número de página"
-
-#. module: survey
-#: view:survey.page:0
-#: view:survey.question:0
-#: view:survey.send.invitation.log:0
-msgid "Ok"
-msgstr "Aceptar"
-
-#. module: survey
-#: field:survey.page,title:0
-msgid "Page Title"
-msgstr "Título de la página"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_define_survey
-msgid "Define Surveys"
-msgstr "Definir encuestas"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_history
-msgid "Survey History"
-msgstr "HistĂłrico encuestas"
-
-#. module: survey
-#: field:survey.response.answer,comment:0
-#: field:survey.response.line,comment:0
-msgid "Notes"
-msgstr "Notas"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-msgid "Search Survey"
-msgstr "Buscar encuesta"
-
-#. module: survey
-#: field:survey.response.answer,answer:0
-#: field:survey.tbl.column.heading,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: survey
-#: field:survey.question,column_heading_ids:0
-msgid " Column heading"
-msgstr " Cabecera columna"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_run_survey_form
-msgid "Answer a Survey"
-msgstr "Responder una encuesta"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:92
-#, python-format
-msgid "Error!"
-msgstr "¡Error!"
-
-#. module: survey
-#: field:survey,tot_comp_survey:0
-msgid "Total Completed Survey"
-msgstr "Total encuestas completadas"
-
-#. module: survey
-#: view:survey.response.answer:0
-msgid "(Use Only Question Type is matrix_of_drop_down_menus)"
-msgstr "(usar sĂłlo cuando el tipo de pregunta sea matrix_of_drop_down_menus)"
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.survey_analysis
-msgid "Survey Statistics"
-msgstr "EstadĂ­sticas encuestas"
-
-#. module: survey
-#: selection:survey,state:0
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Cancelled"
-msgstr "Cancelada"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Rating Scale"
-msgstr "Escala de calificaciĂłn"
-
-#. module: survey
-#: field:survey.question,comment_field_type:0
-msgid "Comment Field Type"
-msgstr "Campo tipo comentario"
-
-#. module: survey
-#: code:addons/survey/survey.py:375
-#: code:addons/survey/survey.py:387
-#: code:addons/survey/survey.py:401
-#: code:addons/survey/survey.py:406
-#: code:addons/survey/survey.py:416
-#: code:addons/survey/survey.py:422
-#: code:addons/survey/survey.py:428
-#: code:addons/survey/survey.py:434
-#: code:addons/survey/survey.py:438
-#: code:addons/survey/survey.py:444
-#: code:addons/survey/survey.py:448
-#: code:addons/survey/survey.py:458
-#: code:addons/survey/survey.py:462
-#: code:addons/survey/survey.py:467
-#: code:addons/survey/survey.py:473
-#: code:addons/survey/survey.py:475
-#: code:addons/survey/survey.py:477
-#: code:addons/survey/survey.py:482
-#: code:addons/survey/survey.py:484
-#: code:addons/survey/survey.py:642
-#: code:addons/survey/wizard/survey_answer.py:124
-#: code:addons/survey/wizard/survey_answer.py:131
-#: code:addons/survey/wizard/survey_answer.py:700
-#: code:addons/survey/wizard/survey_answer.py:739
-#: code:addons/survey/wizard/survey_answer.py:759
-#: code:addons/survey/wizard/survey_answer.py:788
-#: code:addons/survey/wizard/survey_answer.py:793
-#: code:addons/survey/wizard/survey_answer.py:801
-#: code:addons/survey/wizard/survey_answer.py:812
-#: code:addons/survey/wizard/survey_answer.py:821
-#: code:addons/survey/wizard/survey_answer.py:826
-#: code:addons/survey/wizard/survey_answer.py:900
-#: code:addons/survey/wizard/survey_answer.py:936
-#: code:addons/survey/wizard/survey_answer.py:954
-#: code:addons/survey/wizard/survey_answer.py:982
-#: code:addons/survey/wizard/survey_answer.py:985
-#: code:addons/survey/wizard/survey_answer.py:988
-#: code:addons/survey/wizard/survey_answer.py:1000
-#: code:addons/survey/wizard/survey_answer.py:1007
-#: code:addons/survey/wizard/survey_answer.py:1010
-#: code:addons/survey/wizard/survey_selection.py:134
-#: code:addons/survey/wizard/survey_selection.py:138
-#: code:addons/survey/wizard/survey_send_invitation.py:74
-#, python-format
-msgid "Warning !"
-msgstr "¡ Advertencia !"
-
-#. module: survey
-#: selection:survey.question,comment_field_type:0
-msgid "Single Line Of Text"
-msgstr "Ăšnica lĂ­nea de texto"
-
-#. module: survey
-#: view:survey.send.invitation:0
-#: field:survey.send.invitation,send_mail_existing:0
-msgid "Send Reminder for Existing User"
-msgstr "Enviar recordatorio para usuario existente"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Choice (Multiple Answer)"
-msgstr "SelecciĂłn mĂşltiple (mĂştiples respuestas)"
-
-#. module: survey
-#: view:survey:0
-msgid "Edit Survey"
-msgstr "Editar encuesta"
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Survey Answer Line"
-msgstr "LĂ­ne de respuesta encuesta"
-
-#. module: survey
-#: field:survey.question.column.heading,menu_choice:0
-msgid "Menu Choice"
-msgstr "SelecciĂłn MenĂş"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "At Most"
-msgstr "Como máximo"
-
-#. module: survey
-#: field:survey.question,is_validation_require:0
-msgid "Validate Text"
-msgstr "Validar texto"
-
-#. module: survey
-#: field:survey.response.line,single_text:0
-msgid "Text"
-msgstr "Texto"
-
-#. module: survey
-#: constraint:res.users:0
-msgid "The chosen company is not in the allowed companies for this user"
-msgstr ""
-"La compañía seleccionada no está en las compañías permitidas para este "
-"usuario"
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "Letter (8.5\" x 11\")"
-msgstr "Carta (8.5\" x 11\")"
-
-#. module: survey
-#: view:survey:0
-#: field:survey,responsible_id:0
-msgid "Responsible"
-msgstr "Responsable"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_request
-msgid "survey.request"
-msgstr "solicitud.encuesta"
-
-#. module: survey
-#: field:survey.send.invitation,mail_subject:0
-#: field:survey.send.invitation,mail_subject_existing:0
-msgid "Subject"
-msgstr "Asunto"
-
-#. module: survey
-#: field:survey.question,comment_maximum_float:0
-#: field:survey.question,validation_maximum_float:0
-msgid "Maximum decimal number"
-msgstr "Máximo número de decimales"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Late"
-msgstr "Retrasado"
-
-#. module: survey
-#: sql_constraint:res.users:0
-msgid "You can not have two users with the same login !"
-msgstr "¡No puede tener dos usuarios con el mismo identificador de usuario!"
-
-#. module: survey
-#: field:survey.send.invitation,mail_from:0
-msgid "From"
-msgstr "De"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Don't Validate Comment Text."
-msgstr "No validar texto de comentario"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Whole Number"
-msgstr "Debe ser un nĂşmero entero"
-
-#. module: survey
-#: field:survey.answer,question_id:0
-#: field:survey.page,question_ids:0
-#: field:survey.question,question:0
-#: field:survey.question.column.heading,question_id:0
-#: field:survey.response.line,question_id:0
-msgid "Question"
-msgstr "Pregunta"
-
-#. module: survey
-#: view:survey.page:0
-msgid "Search Survey Page"
-msgstr "Buscar página de la encuesta"
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Send"
-msgstr "Enviar"
-
-#. module: survey
-#: field:survey.question.wiz,name:0
-msgid "Number"
-msgstr "NĂşmero"
-
-#. module: survey
-#: code:addons/survey/survey.py:444
-#, python-format
-msgid ""
-"You must enter one or more menu choices in "
-"column heading"
-msgstr ""
-"Debe introducir una o más opciones de menú en el encabezado de la columna"
-
-#. module: survey
-#: model:ir.actions.act_window,help:survey.action_survey_form1
-msgid ""
-"You can create survey for different purposes: recruitment interviews, "
-"employee's periodical evaluations, marketing campaigns, etc. A survey is "
-"made of pages containing questions of several types: text, multiple choices, "
-"etc. You can edit survey manually or click on the 'Edit Survey' for a "
-"WYSIWYG interface."
-msgstr ""
-"Puede crear encuestas para diferentes propĂłsitos: entrevistas de selecciĂłn "
-"de personal, evaluaciones periódicas de los empleados, campañas de "
-"marketing, etc. Una encuesta se compone de páginas que contienen preguntas "
-"de varios tipos: texto, opciones mĂşltiples, etc. Puede editar la encuesta "
-"manualmente o hacer clic en \"Editar encuesta” para una interfaz WYSIWYG."
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-#: field:survey.request,state:0
-msgid "State"
-msgstr "Estado"
-
-#. module: survey
-#: view:survey.request:0
-msgid "Evaluation Plan Phase"
-msgstr "Fase del plan de evaluaciĂłn"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Between"
-msgstr "Entre"
-
-#. module: survey
-#: view:survey.print:0
-#: view:survey.print.answer:0
-#: view:survey.print.statistics:0
-msgid "Print"
-msgstr "Imprimir"
-
-#. module: survey
-#: field:survey.question,make_comment_field:0
-msgid "Make Comment Field an Answer Choice"
-msgstr "Hacer campo comentario como opciĂłn de respuesta"
-
-#. module: survey
-#: view:survey:0
-#: field:survey,type:0
-msgid "Type"
-msgstr "Tipo"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Email"
-msgstr "Email"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_answer_surveys
-msgid "Answer Surveys"
-msgstr "Reponder encuestas"
-
-#. module: survey
-#: selection:survey.response,state:0
-msgid "Not Finished"
-msgstr "No teminado"
-
-#. module: survey
-#: view:survey.print:0
-msgid "Survey Print"
-msgstr "Imprimir encuesta"
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Select Partner"
-msgstr "Seleccionar empresa"
-
-#. module: survey
-#: field:survey.question,type:0
-msgid "Question Type"
-msgstr "Tipo pregunta"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:131
-#, python-format
-msgid "You can not answer this survey more than %s times"
-msgstr "No puede responder a esta encuesta más de '%s' veces"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_answer
-msgid "Answers"
-msgstr "Respuestas"
-
-#. module: survey
-#: model:ir.module.module,description:survey.module_meta_information
-msgid ""
-"\n"
-" This module is used for surveying. 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 ""
-"\n"
-" Este mĂłdulo se usa para realizar encuestas. Se basa en las respuestas o "
-"comentarios de los usuarios a varias preguntas.\n"
-" Una encuesta puede tener varias páginas. Cada página puede contener "
-"mĂşltiples preguntas y cada pregunta puede tener varias respuestas.\n"
-" Diferentes usuarios pueden dar diferentes respuestas a la pregunta de "
-"acuerdo a como esté confeccionada la encuesta.\n"
-" También se puede invitar a las empresas a responder una encuesta, "
-"enviándoles correos electrónicos con nombre de usuario y contraseña.\n"
-" "
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:124
-#, python-format
-msgid "You can not answer because the survey is not open"
-msgstr "No puede responder porque la encuesta no está abierta"
-
-#. module: survey
-#: selection:survey.response,response_type:0
-msgid "Link"
-msgstr "VĂ­nculo"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_type_form
-#: model:ir.model,name:survey.model_survey_type
-#: view:survey.type:0
-msgid "Survey Type"
-msgstr "Tipo de encuesta"
-
-#. module: survey
-#: field:survey.page,sequence:0
-msgid "Page Nr"
-msgstr "Nº página"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-#: field:survey.question,descriptive_text:0
-#: selection:survey.question,type:0
-msgid "Descriptive Text"
-msgstr "Texto descriptivo"
-
-#. module: survey
-#: field:survey.question,minimum_req_ans:0
-msgid "Minimum Required Answer"
-msgstr "Respuesta mĂ­nima requerida"
-
-#. module: survey
-#: code:addons/survey/survey.py:484
-#, python-format
-msgid ""
-"You must enter one or more menu choices in column heading (white spaces not "
-"allowed)"
-msgstr ""
-"Debe introducir una o más opciones de menú en el encabezado de la columna "
-"(espacios en blanco no está permitidos)"
-
-#. module: survey
-#: field:survey.question,req_error_msg:0
-msgid "Error Message"
-msgstr "Mensaje de error"
-
-#. module: survey
-#: code:addons/survey/survey.py:482
-#, python-format
-msgid "You must enter one or more menu choices in column heading"
-msgstr "Debe introducir una o más opciones de menú en la cabecera de columna"
-
-#. module: survey
-#: field:survey.request,date_deadline:0
-msgid "Deadline date"
-msgstr "Fecha lĂ­mite"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Date"
-msgstr "Debe ser una fecha"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print
-msgid "survey.print"
-msgstr "encuesta.imprimir"
-
-#. module: survey
-#: view:survey.question.column.heading:0
-#: field:survey.question.column.heading,title:0
-msgid "Column Heading"
-msgstr "Cabecera columna"
-
-#. module: survey
-#: field:survey.question,is_require_answer:0
-msgid "Require Answer to Question"
-msgstr "Respuesta obligatoria a la pregunta"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_request_tree
-#: model:ir.ui.menu,name:survey.menu_survey_type_form1
-msgid "Survey Requests"
-msgstr "Solicitudes de encuestas"
-
-#. module: survey
-#: code:addons/survey/survey.py:375
-#: code:addons/survey/survey.py:462
-#, python-format
-msgid "You must enter one or more column heading."
-msgstr "Debe introducir una o más cabeceras de columna."
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:759
-#: code:addons/survey/wizard/survey_answer.py:954
-#, python-format
-msgid "Please enter an integer value"
-msgstr "Por favor introduzca un valor numérico entero"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_browse_answer
-msgid "survey.browse.answer"
-msgstr "encuesta.explorar.respuestas"
-
-#. module: survey
-#: selection:survey.question,comment_field_type:0
-msgid "Paragraph of Text"
-msgstr "Párrafo de texto"
-
-#. module: survey
-#: code:addons/survey/survey.py:428
-#, python-format
-msgid ""
-"Maximum Required Answer you entered for "
-"your maximum is greater than the number of answer. "
-" Please use a number that is smaller than %d."
-msgstr ""
-"El número máximo de respuestas requeridas que ha introducido para su máximo "
-"es mayor que el nĂşmero de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: view:survey.request:0
-msgid "Watting Answer"
-msgstr "Esperando respuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the question is not answered, display this error message:"
-msgstr ""
-"Cuando la respuesta no sea contestada, mostrar este mensaje de error:"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Options"
-msgstr "Opciones"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_browse_survey_response
-msgid "Browse Answers"
-msgstr "Buscar respuestas"
-
-#. module: survey
-#: field:survey.response.answer,comment_field:0
-#: view:survey.response.line:0
-msgid "Comment"
-msgstr "Comentario"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_answer
-#: model:ir.model,name:survey.model_survey_response_answer
-#: view:survey.answer:0
-#: view:survey.response:0
-#: view:survey.response.answer:0
-#: view:survey.response.line:0
-msgid "Survey Answer"
-msgstr "Respuesta encuesta"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Selection"
-msgstr "SelecciĂłn"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_browse_survey_response
-#: view:survey:0
-msgid "Answer Survey"
-msgstr "Responder encuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Comment Field"
-msgstr "Campo comentario"
-
-#. module: survey
-#: selection:survey.response,response_type:0
-msgid "Manually"
-msgstr "Manualmente"
-
-#. module: survey
-#: help:survey,responsible_id:0
-msgid "User responsible for survey"
-msgstr "Usuario responsable de la encuesta."
-
-#. module: survey
-#: field:survey.question,comment_column:0
-msgid "Add comment column in matrix"
-msgstr "Añadir columna de comentarios en la matriz"
-
-#. module: survey
-#: field:survey.answer,response:0
-msgid "#Answer"
-msgstr "#Respuesta"
-
-#. module: survey
-#: field:survey.print,without_pagebreak:0
-#: field:survey.print.answer,without_pagebreak:0
-msgid "Print Without Page Breaks"
-msgstr "Imprimir sin saltos de página"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the comment is an invalid format, display this error message"
-msgstr ""
-"Mostrar este mensaje de error cuando el comentario esté en un formato no "
-"válido"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_selection.py:138
-#, python-format
-msgid ""
-"You can not give more response. Please contact the author of this survey for "
-"further assistance."
-msgstr ""
-"No puede dar más respuestas. Póngase en contacto con el autor de esta "
-"encuesta para obtener más ayuda."
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_page_question
-#: model:ir.actions.act_window,name:survey.act_survey_question
-msgid "Questions"
-msgstr "Preguntas"
-
-#. module: survey
-#: help:survey,response_user:0
-msgid "Set to one if you require only one Answer per user"
-msgstr "Establecer a uno si sĂłlo requiere una respuesta por usuario."
-
-#. module: survey
-#: field:survey,users:0
-msgid "Users"
-msgstr "Usuarios"
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Message"
-msgstr "Mensaje"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-msgid "MY"
-msgstr "MI"
-
-#. module: survey
-#: field:survey.question,maximum_req_ans:0
-msgid "Maximum Required Answer"
-msgstr "Máximas respuestas requeridas"
-
-#. module: survey
-#: field:survey.name.wiz,page_no:0
-msgid "Page Number"
-msgstr "Número de página"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:92
-#, python-format
-msgid "Cannot locate survey for the question wizard!"
-msgstr "¡No se pudo localizar la encuesta para el asistente de preguntas!"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "and"
-msgstr "y"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print_statistics
-#: view:survey.print.statistics:0
-msgid "Survey Print Statistics"
-msgstr "Imprimir estadĂ­sticas de encuestas"
-
-#. module: survey
-#: field:survey.send.invitation.log,note:0
-msgid "Log"
-msgstr "Registro (Log)"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the choices do not add up correctly, display this error message"
-msgstr ""
-"Mostrar este mensaje de error cuando las selecciones no totalicen "
-"correctamente"
-
-#. module: survey
-#: field:survey,date_close:0
-msgid "Survey Close Date"
-msgstr "Fecha de cierre encuestas"
-
-#. module: survey
-#: field:survey,date_open:0
-msgid "Survey Open Date"
-msgstr "Fecha apertura de encuesta"
-
-#. module: survey
-#: field:survey.question.column.heading,in_visible_rating_weight:0
-msgid "Is Rating Scale Invisible ??"
-msgstr "ÂżLa escala de calificaciĂłn es invisible?"
-
-#. module: survey
-#: view:survey.browse.answer:0
-#: view:survey.name.wiz:0
-msgid "Start"
-msgstr "Inicio"
-
-#. module: survey
-#: code:addons/survey/survey.py:477
-#, python-format
-msgid "Maximum Required Answer is greater than Minimum Required Answer"
-msgstr ""
-"El número máximo de respuestas requeridas es mayor que el mínimo de "
-"respuestas requeridas."
-
-#. module: survey
-#: field:survey.question,comment_maximum_no:0
-#: field:survey.question,validation_maximum_no:0
-msgid "Maximum number"
-msgstr "Número máximo"
-
-#. module: survey
-#: selection:survey,state:0
-#: selection:survey.request,state:0
-#: selection:survey.response.line,state:0
-msgid "Draft"
-msgstr "Borrador"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print_statistics
-msgid "survey.print.statistics"
-msgstr "encuesta.imprimir.estadisticas"
-
-#. module: survey
-#: selection:survey,state:0
-msgid "Closed"
-msgstr "Cerrada"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Drop-down Menus"
-msgstr "Matriz de menĂşs desplegables"
-
-#. module: survey
-#: view:survey:0
-#: field:survey.answer,answer:0
-#: field:survey.name.wiz,response:0
-#: view:survey.page:0
-#: view:survey.print.answer:0
-#: field:survey.print.answer,response_ids:0
-#: view:survey.question:0
-#: field:survey.question,answer_choice_ids:0
-#: field:survey.request,response:0
-#: field:survey.response,question_ids:0
-#: field:survey.response.answer,answer_id:0
-#: field:survey.response.answer,response_id:0
-#: view:survey.response.line:0
-#: field:survey.response.line,response_answer_ids:0
-#: field:survey.response.line,response_id:0
-#: field:survey.response.line,response_table_ids:0
-#: field:survey.send.invitation,partner_ids:0
-#: field:survey.tbl.column.heading,response_table_id:0
-msgid "Answer"
-msgstr "Respuesta"
-
-#. module: survey
-#: field:survey,max_response_limit:0
-msgid "Maximum Answer Limit"
-msgstr "Límite máximo de respuesta"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_act_view_survey_send_invitation
-msgid "Send Invitations"
-msgstr "Enviar invitaciones"
-
-#. module: survey
-#: field:survey.name.wiz,store_ans:0
-msgid "Store Answer"
-msgstr "Guardar respuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Date and Time"
-msgstr "Fecha y hora"
-
-#. module: survey
-#: field:survey,state:0
-#: field:survey.response,state:0
-#: field:survey.response.line,state:0
-msgid "Status"
-msgstr "Estado"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print
-msgid "Print Survey"
-msgstr "Imprimir encuesta"
-
-#. module: survey
-#: field:survey,send_response:0
-msgid "E-mail Notification on Answer"
-msgstr "Email de notificaciĂłn sobre la respuesta"
-
-#. module: survey
-#: field:survey.response.answer,value_choice:0
-msgid "Value Choice"
-msgstr "Valor selecciĂłn"
-
-#. module: survey
-#: view:survey:0
-msgid "Started"
-msgstr "Iniciada"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print_answer
-#: view:survey:0
-#: view:survey.print.answer:0
-msgid "Print Answer"
-msgstr "Imprimir respuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Textboxes"
-msgstr "Campos de texto mĂşltiples"
-
-#. module: survey
-#: selection:survey.print,orientation:0
-#: selection:survey.print.answer,orientation:0
-msgid "Landscape(Horizontal)"
-msgstr "Horizontal"
-
-#. module: survey
-#: field:survey.question,no_of_rows:0
-msgid "No of Rows"
-msgstr "NÂş de columnas"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.name.wiz:0
-msgid "Survey Details"
-msgstr "Detalles encuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Textboxes With Different Type"
-msgstr "Campos de texto mĂşltiples con tipo diferente"
-
-#. module: survey
-#: view:survey.question.column.heading:0
-msgid "Menu Choices (each choice on separate lines)"
-msgstr "Opciones de menĂş (cada opciĂłn en lĂ­neas separadas)"
-
-#. module: survey
-#: field:survey.response,response_type:0
-msgid "Answer Type"
-msgstr "Tipo respuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Validation"
-msgstr "ValidaciĂłn"
-
-#. module: survey
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Waiting Answer"
-msgstr "Esperando respuesta"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Decimal Number"
-msgstr "Debe ser un nĂşmero decimal"
-
-#. module: survey
-#: field:res.users,survey_id:0
-msgid "Groups"
-msgstr "Grupos"
-
-#. module: survey
-#: selection:survey.answer,type:0
-#: selection:survey.question,type:0
-msgid "Date"
-msgstr "Fecha"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Integer"
-msgstr "Entero"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_send_invitation
-msgid "survey.send.invitation"
-msgstr "encuesta.enviar.invitacion"
-
-#. module: survey
-#: field:survey.history,user_id:0
-#: view:survey.request:0
-#: field:survey.request,user_id:0
-#: field:survey.response,user_id:0
-msgid "User"
-msgstr "Usuario"
-
-#. module: survey
-#: field:survey.name.wiz,transfer:0
-msgid "Page Transfer"
-msgstr "Página de transferencia"
-
-#. module: survey
-#: selection:survey.response.line,state:0
-msgid "Skiped"
-msgstr "Omitido"
-
-#. module: survey
-#: field:survey.print,paper_size:0
-#: field:survey.print.answer,paper_size:0
-msgid "Paper Size"
-msgstr "Tamaño del papel"
-
-#. module: survey
-#: field:survey.response.answer,column_id:0
-#: field:survey.tbl.column.heading,column_id:0
-msgid "Column"
-msgstr "Columna"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_tbl_column_heading
-msgid "survey.tbl.column.heading"
-msgstr "encuesta.tbl.columna.cabecera"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_response_line
-msgid "Survey Response Line"
-msgstr "LĂ­nea de respuesta de encuesta"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_selection.py:134
-#, python-format
-msgid "You can not give response for this survey more than %s times"
-msgstr "No puede responder esta encuesta más de %s veces"
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.report_survey_form
-#: model:ir.model,name:survey.model_survey
-#: view:survey:0
-#: view:survey.browse.answer:0
-#: field:survey.browse.answer,survey_id:0
-#: field:survey.history,survey_id:0
-#: view:survey.name.wiz:0
-#: field:survey.name.wiz,survey_id:0
-#: view:survey.page:0
-#: field:survey.page,survey_id:0
-#: view:survey.print:0
-#: field:survey.print,survey_ids:0
-#: field:survey.print.statistics,survey_ids:0
-#: field:survey.question,survey:0
-#: view:survey.request:0
-#: field:survey.request,survey_id:0
-#: field:survey.response,survey_id:0
-msgid "Survey"
-msgstr "Encuesta"
-
-#. module: survey
-#: field:survey.question,in_visible_rating_weight:0
-msgid "Is Rating Scale Invisible?"
-msgstr "ÂżLa escala de calificaciĂłn es invisible?"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Numerical Textboxes"
-msgstr "Campos de texto numéricos"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_question_wiz
-msgid "survey.question.wiz"
-msgstr "enquesta.pregunta.asist"
-
-#. module: survey
-#: view:survey:0
-msgid "History"
-msgstr "Historial"
-
-#. module: survey
-#: help:survey.browse.answer,response_id:0
-msgid ""
-"If this field is empty, all answers of the selected survey will be print."
-msgstr ""
-"Si este campo está vacío, se imprimirán todas las respuestas de la encuesta "
-"seleccionada."
-
-#. module: survey
-#: field:survey.type,code:0
-msgid "Code"
-msgstr "CĂłdigo"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_print_survey_statistics
-msgid "Surveys Statistics"
-msgstr "EstadĂ­sticas de encuestas"
-
-#. module: survey
-#: field:survey.print,orientation:0
-#: field:survey.print.answer,orientation:0
-msgid "Orientation"
-msgstr "OrientaciĂłn"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.answer:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Seq"
-msgstr "Secuencia"
-
-#. module: survey
-#: field:survey.request,email:0
-msgid "E-mail"
-msgstr "Email"
-
-#. module: survey
-#: field:survey.question,comment_minimum_no:0
-#: field:survey.question,validation_minimum_no:0
-msgid "Minimum number"
-msgstr "NĂşmero mĂ­nimo"
-
-#. module: survey
-#: field:survey.question,req_ans:0
-msgid "#Required Answer"
-msgstr "NÂş de respuestas requeridas"
-
-#. module: survey
-#: field:survey.answer,sequence:0
-#: field:survey.question,sequence:0
-msgid "Sequence"
-msgstr "Secuencia"
-
-#. module: survey
-#: field:survey.question,comment_label:0
-msgid "Field Label"
-msgstr "Etiqueta del campo"
-
-#. module: survey
-#: view:survey:0
-msgid "Other"
-msgstr "Otros"
-
-#. module: survey
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Done"
-msgstr "Realizado"
-
-#. module: survey
-#: view:survey:0
-msgid "Test Survey"
-msgstr "Probar encuesta"
-
-#. module: survey
-#: field:survey.question,rating_allow_one_column_require:0
-msgid "Allow Only One Answer per Column (Forced Ranking)"
-msgstr "Permitir una sĂłla respuesta por columna (clasificaciĂłn forzada)"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.browse.answer:0
-#: view:survey.name.wiz:0
-#: view:survey.print:0
-#: view:survey.print.answer:0
-#: view:survey.print.statistics:0
-#: view:survey.send.invitation:0
-msgid "Cancel"
-msgstr "Cancelar"
-
-#. module: survey
-#: view:survey:0
-msgid "Close"
-msgstr "Cerrar"
-
-#. module: survey
-#: field:survey.question,comment_minimum_float:0
-#: field:survey.question,validation_minimum_float:0
-msgid "Minimum decimal number"
-msgstr "NĂşmero decimal mĂ­nimo"
-
-#. module: survey
-#: view:survey:0
-#: selection:survey,state:0
-msgid "Open"
-msgstr "Abrir"
-
-#. module: survey
-#: field:survey,tot_start_survey:0
-msgid "Total Started Survey"
-msgstr "Total encuestas empezadas"
-
-#. module: survey
-#: code:addons/survey/survey.py:467
-#, python-format
-msgid ""
-"#Required Answer you entered is greater than the number of answer. Please "
-"use a number that is smaller than %d."
-msgstr ""
-"El nĂşmero de respuestas requeridas que ha escrito es mayor que el nĂşmero de "
-"respuestas. Introduzca un nĂşmero menor que %d."
-
-#. module: survey
-#: help:survey,max_response_limit:0
-msgid "Set to one if survey is answerable only once"
-msgstr "Establecer a uno si la encuesta sĂłlo puede responderse una vez."
-
-#. module: survey
-#: selection:survey.response,state:0
-msgid "Finished "
-msgstr "Terminado "
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_question_column_heading
-msgid "Survey Question Column Heading"
-msgstr "Cabecera de columna de pregunta de encuesta"
-
-#. module: survey
-#: field:survey.answer,average:0
-msgid "#Avg"
-msgstr "#Prom."
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Choices (Multiple Answers Per Row)"
-msgstr "Matriz de opciones (mĂşltiples respuestas por fila)"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_name
-msgid "Give Survey Answer"
-msgstr "Responder encuesta"
-
-#. module: survey
-#: model:ir.model,name:survey.model_res_users
-msgid "res.users"
-msgstr "res.usuarios"
-
-#. module: survey
-#: view:survey:0
-msgid "Current"
-msgstr "Actual"
-
-#. module: survey
-#: selection:survey.response.line,state:0
-msgid "Answered"
-msgstr "Contestadas"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:433
-#, python-format
-msgid "Complete Survey Answer"
-msgstr "Respuesta completa de la encuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Comment/Essay Box"
-msgstr "Campo de comentarios/redacciĂłn"
-
-#. module: survey
-#: field:survey.answer,type:0
-msgid "Type of Answer"
-msgstr "Tipo de respuesta"
-
-#. module: survey
-#: field:survey.question,required_type:0
-msgid "Respondent must answer"
-msgstr "El encuestado debe responder"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_send_invitation
-#: view:survey.send.invitation:0
-msgid "Send Invitation"
-msgstr "Enviar invitaciĂłn"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:793
-#, python-format
-msgid "You cannot select the same answer more than one time"
-msgstr "No se puede seleccionar la misma respuesta más de una vez"
-
-#. module: survey
-#: view:survey.question:0
-msgid "Search Question"
-msgstr "Buscar pregunta"
-
-#. module: survey
-#: field:survey,title:0
-msgid "Survey Title"
-msgstr "TĂ­tulo de la encuesta"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Single Textbox"
-msgstr "Campo de texto Ăşnico"
-
-#. module: survey
-#: field:survey,note:0
-#: field:survey.name.wiz,note:0
-#: view:survey.page:0
-#: field:survey.page,note:0
-#: view:survey.response.line:0
-msgid "Description"
-msgstr "DescripciĂłn"
-
-#. module: survey
-#: view:survey.name.wiz:0
-msgid "Select Survey"
-msgstr "Seleccionar encuesta"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "At Least"
-msgstr "Al menos"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_send_invitation_log
-#: model:ir.model,name:survey.model_survey_send_invitation_log
-msgid "survey.send.invitation.log"
-msgstr "encuesta.enviar.invitacion.registro"
-
-#. module: survey
-#: selection:survey.print,orientation:0
-#: selection:survey.print.answer,orientation:0
-msgid "Portrait(Vertical)"
-msgstr "Retrato (Vertical)"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be Specific Length"
-msgstr "Debe ser de longitud especĂ­fica"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: field:survey.question,page_id:0
-msgid "Survey Page"
-msgstr "Página de la encuesta"
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Required Answer"
-msgstr "Respuesta requerida"
-
-#. module: survey
-#: code:addons/survey/survey.py:473
-#, python-format
-msgid ""
-"Minimum Required Answer you entered is greater than the number of answer. "
-"Please use a number that is smaller than %d."
-msgstr ""
-"El mĂ­nimo de respuestas requeridas que ha introducido es mayor que el nĂşmero "
-"de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: code:addons/survey/survey.py:458
-#, python-format
-msgid "You must enter one or more answer."
-msgstr "Debe dar una o más respuestas."
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.survey_browse_response
-#: field:survey.browse.answer,response_id:0
-msgid "Survey Answers"
-msgstr "Respuestas encuesta"
-
-#. module: survey
-#: view:survey.browse.answer:0
-msgid "Select Survey and Related Answer"
-msgstr "Seleccione encuesta y respuesta relacionada"
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_print_survey_answer
-msgid "Surveys Answers"
-msgstr "Respuestas encuestas"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_pages
-msgid "Pages"
-msgstr "Páginas"
-
-#. module: survey
-#: code:addons/survey/survey.py:406
-#, python-format
-msgid ""
-"#Required Answer you entered is greater "
-"than the number of answer. Please use a "
-"number that is smaller than %d."
-msgstr ""
-"El nĂşmero de respuestas requeridas que ha introducido es mayor que el nĂşmero "
-"de respuestas. Utilice un nĂşmero menor que %d."
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:985
-#, python-format
-msgid "You cannot select same answer more than one time'"
-msgstr "No puede seleccionar la misma respuesta más de una vez"
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "Legal (8.5\" x 14\")"
-msgstr "Legal (8.5\" x 14\")"
-
-#. module: survey
-#: field:survey.type,name:0
-msgid "Name"
-msgstr "Nombre"
-
-#. module: survey
-#: view:survey.page:0
-msgid "#Questions"
-msgstr "#Preguntas"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_response
-msgid "survey.response"
-msgstr "encuesta.respuesta"
-
-#. module: survey
-#: field:survey.question,comment_valid_err_msg:0
-#: field:survey.question,make_comment_field_err_msg:0
-#: field:survey.question,numeric_required_sum_err_msg:0
-#: field:survey.question,validation_valid_err_msg:0
-msgid "Error message"
-msgstr "Mensaje de error"
-
-#. module: survey
-#: model:ir.module.module,shortdesc:survey.module_meta_information
-msgid "Survey Module"
-msgstr "MĂłdulo encuestas"
-
-#. module: survey
-#: view:survey.send.invitation:0
-#: field:survey.send.invitation,send_mail:0
-msgid "Send Mail for New User"
-msgstr "Enviar email para nuevo usuario"
-
-#. module: survey
-#: code:addons/survey/survey.py:387
-#, python-format
-msgid "You must enter one or more Answer."
-msgstr "Debe introducir una o más respuestas"
-
-#. module: survey
-#: code:addons/survey/survey.py:416
-#, python-format
-msgid ""
-"Minimum Required Answer you entered is "
-"greater than the number of answer. Please "
-"use a number that is smaller than %d."
-msgstr ""
-"El mĂ­nimo de respuestas requeridas que ha introducido es mayor que el nĂşmero "
-"de respuestas. Por favor, use un nĂşmero menor que %d."
-
-#. module: survey
-#: field:survey.answer,menu_choice:0
-msgid "Menu Choices"
-msgstr "Opciones de menĂş"
-
-#. module: survey
-#: field:survey,page_ids:0
-#: view:survey.question:0
-#: field:survey.response.line,page_id:0
-msgid "Page"
-msgstr "Página"
-
-#. module: survey
-#: code:addons/survey/survey.py:438
-#, python-format
-msgid ""
-"Maximum Required Answer is greater than "
-"Minimum Required Answer"
-msgstr ""
-"El máximo de respuestas requeridas es menor que el mínimo de respuestas "
-"requeridas"
-
-#. module: survey
-#: view:survey.send.invitation.log:0
-msgid "User creation"
-msgstr "CreaciĂłn usuario"
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "All"
-msgstr "Todos"
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be An Email Address"
-msgstr "Debe ser una direcciĂłn de email"
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Choice (Only One Answer)"
-msgstr "SelecciĂłn mĂşltiple (sĂłlo una respuesta)"
-
-#. module: survey
-#: field:survey.answer,in_visible_answer_type:0
-msgid "Is Answer Type Invisible??"
-msgstr "ÂżEl tipo de respuesta es invisible?"
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print_answer
-msgid "survey.print.answer"
-msgstr "encuesta.imprimir.respuesta"
-
-#. module: survey
-#: view:survey.answer:0
-msgid "Menu Choices (each choice on separate by lines)"
-msgstr "Opciones de menĂş (cada opciĂłn en lĂ­neas separadas)"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Float"
-msgstr "NĂşmero flotante"
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Single Textboxes"
-msgstr "Campos de texto Ăşnicos"
-
-#. module: survey
-#: code:addons/survey/wizard/survey_send_invitation.py:74
-#, python-format
-msgid "%sSurvey is not in open state"
-msgstr "%s encuesta no está en estado abierto"
-
-#. module: survey
-#: field:survey.question.column.heading,rating_weight:0
-msgid "Weight"
-msgstr "Peso"
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Date & Time"
-msgstr "Fecha y hora"
-
-#. module: survey
-#: field:survey.response,date_create:0
-#: field:survey.response.line,date_create:0
-msgid "Create Date"
-msgstr "Fecha creaciĂłn"
-
-#. module: survey
-#: field:survey.question,column_name:0
-msgid "Column Name"
-msgstr "Nombre de columna"
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_page_form
-#: model:ir.model,name:survey.model_survey_page
-#: model:ir.ui.menu,name:survey.menu_survey_page_form1
-#: view:survey.page:0
-msgid "Survey Pages"
-msgstr "Páginas encuesta"
-
-#. module: survey
-#: field:survey.question,numeric_required_sum:0
-msgid "Sum of all choices"
-msgstr "Suma de todas las elecciones"
-
-#. module: survey
-#: selection:survey.question,type:0
-#: view:survey.response.line:0
-msgid "Table"
-msgstr "Tabla"
-
-#. module: survey
-#: code:addons/survey/survey.py:642
-#, python-format
-msgid "You cannot duplicate the resource!"
-msgstr "¡No puede duplicar el recurso!"
-
-#. module: survey
-#: field:survey.question,comment_minimum_date:0
-#: field:survey.question,validation_minimum_date:0
-msgid "Minimum date"
-msgstr "Fecha mĂ­nima"
-
-#. module: survey
-#: field:survey,response_user:0
-msgid "Maximum Answer per User"
-msgstr "Máximas respuestas por usuario"
-
-#. module: survey
-#: field:survey.name.wiz,page:0
-msgid "Page Position"
-msgstr "Posición página"
-
-#~ msgid "All Questions"
-#~ msgstr "Todas las preguntas"
-
-#~ msgid "Give Survey Response"
-#~ msgstr "Responder la encuesta"
-
-#~ msgid "Invalid model name in the action definition."
-#~ msgstr "Nombre de modelo inválido en la definición de acción."
-
-#~ msgid "Survey Analysis Report"
-#~ msgstr "Informe de análisis de encuestas"
-
-#~ msgid "Total Response"
-#~ msgstr "Respuesta total"
-
-#~ msgid "Set to one if you require only one response per user"
-#~ msgstr "Establecer a uno si sĂłlo necesita una respuesta por usuario"
-
-#~ msgid "Users Details"
-#~ msgstr "Detalles usuarios"
-
-#~ msgid "Partner"
-#~ msgstr "Empresa"
-
-#~ msgid "Skip"
-#~ msgstr "Saltar"
-
-#~ msgid "New Survey Question"
-#~ msgstr "Nueva pregunta de encuesta"
-
-#~ msgid "Maximum Response Limit"
-#~ msgstr "Límite respuesta máxima"
-
-#~ msgid "Invalid XML for View Architecture!"
-#~ msgstr "¡XML no válido para la estructura de la vista!"
-
-#~ msgid ""
-#~ "The Object name must start with x_ and not contain any special character !"
-#~ msgstr ""
-#~ "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter "
-#~ "especial!"
-
-#~ msgid "Configuration"
-#~ msgstr "ConfiguraciĂłn"
-
-#~ msgid "_Ok"
-#~ msgstr "_Aceptar"
-
-#~ msgid "Page :-"
-#~ msgstr "Página :-"
-
-#~ msgid "#Response"
-#~ msgstr "#Respuesta"
-
-#~ msgid "Response Summary"
-#~ msgstr "Resumen respuesta"
-
-#~ msgid "Response Type"
-#~ msgstr "Tipo respuesta"
-
-#, python-format
-#~ msgid "Error !"
-#~ msgstr "¡Error!"
-
-#~ msgid "New Survey"
-#~ msgstr "Nueva encuesta"
-
-#~ msgid "Response"
-#~ msgstr "Respuesta"
-
-#~ msgid "Modify Date"
-#~ msgstr "Fecha modificada"
-
-#~ msgid "Answered Question"
-#~ msgstr "Pregunta respondida"
-
-#~ msgid "All Surveys"
-#~ msgstr "Todas las encuentas"
-
-#~ 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 ""
-#~ "\n"
-#~ " Este mĂłdulo es utilizado para realizar encuestas. Depende de las "
-#~ "respuestas o revisiĂłn de alguna preguntas por distintos usuarios\n"
-#~ " Una encuesta puede tener múltiples páginas. Cada página puede contener "
-#~ "distintas preguntas y cada pregunta puede tener mĂşltiples respuestas.\n"
-#~ " Distintos usuarios pueden dar distintas respuestas a las preguntas en "
-#~ "funciĂłn de la encuesta realizada \n"
-#~ " También se pueden enviar correos a las empresas con nombre de usuario y "
-#~ "password con una invitaciĂłn a realizar la encuesta.\n"
-#~ " "
-
-#~ msgid "All Survey Questions"
-#~ msgstr "Todas las preguntas de encuestas"
-
-#~ msgid "All Survey Pages"
-#~ msgstr "Todas páginas de encuesta"
-
-#~ msgid "Total Started Survey :-"
-#~ msgstr "Total encuestas iniciadas :-"
-
-#~ msgid "Survey Management"
-#~ msgstr "GestiĂłn de encuestas"
-
-#~ msgid "Survey Response"
-#~ msgstr "Respuesta encuesta"
-
-#, python-format
-#~ msgid "'\" + que_rec[0]['question'] + \"' This question requires an answer."
-#~ msgstr ""
-#~ "Copy text \t\r\n"
-#~ "'\" + que_rec[0]['question'] + \"' Esta pregunta requiere una respuesta"
-
-#~ msgid "New Survey Page"
-#~ msgstr "Nueva página de encuesta"
-
-#~ msgid "Survey Title :-"
-#~ msgstr "TĂ­tulo encuesta :-"
-
-#~ msgid "Response Percentage"
-#~ msgstr "Porcentaje respuesta"
-
-#~ msgid "%"
-#~ msgstr "%"
-
-#~ msgid "Total Completed Survey :-"
-#~ msgstr "Total encuesta completada :-"
-
-#, python-format
-#~ msgid "Attention!"
-#~ msgstr "¡Atención!"
-
-#~ msgid "Response Count"
-#~ msgstr "Cuenta respuestas"
-
-#~ msgid "Maximum Response per User"
-#~ msgstr "Máximas respuestas por usuario"
diff --git a/addons/survey/i18n/survey.pot b/addons/survey/i18n/survey.pot
deleted file mode 100644
index b7e9fcbb924..00000000000
--- a/addons/survey/i18n/survey.pot
+++ /dev/null
@@ -1,1719 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * survey
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 7.0alpha\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-12-21 17: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: survey
-#: view:survey.response.line:0
-msgid "Single Textboxes"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:471
-#, python-format
-msgid "Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: view:survey.question.wiz:0
-msgid "Your Messages"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_valid_type:0
-#: field:survey.question,validation_type:0
-msgid "Text Validation"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Answers:"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: field:survey,invited_user_ids:0
-msgid "Invited User"
-msgstr ""
-
-#. module: survey
-#: model:survey.type,name:survey.survey_type1
-msgid "Human Resources"
-msgstr ""
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Character"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_form1
-#: model:ir.ui.menu,name:survey.menu_survey_form
-#: model:ir.ui.menu,name:survey.menu_surveys
-msgid "Surveys"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,in_visible_answer_type:0
-msgid "Is Answer Type Invisible?"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-#: view:survey.request:0
-msgid "Group By..."
-msgstr ""
-
-#. module: survey
-#: view:survey.send.invitation.log:0
-msgid "Results :"
-msgstr ""
-
-#. module: survey
-#: view:survey.request:0
-msgid "Survey Request"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "A Range"
-msgstr ""
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Table Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey.history,date:0
-msgid "Date started"
-msgstr ""
-
-#. module: survey
-#: field:survey,history:0
-msgid "History Lines"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-#: field:survey.question,descriptive_text:0
-#: selection:survey.question,type:0
-msgid "Descriptive Text"
-msgstr ""
-
-#. module: survey
-#: field:survey.send.invitation,mail:0
-msgid "Body"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,allow_comment:0
-msgid "Allow Comment Field"
-msgstr ""
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "A4 (210mm x 297mm)"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_maximum_date:0
-#: field:survey.question,validation_maximum_date:0
-msgid "Maximum date"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,in_visible_menu_choice:0
-msgid "Is Menu Choice Invisible?"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Completed"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "Exactly"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Open Date"
-msgstr ""
-
-#. module: survey
-#: view:survey.request:0
-msgid "Set to Draft"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,is_comment_require:0
-msgid "Add Comment Field"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:450
-#, python-format
-msgid "#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: field:survey.question,tot_resp:0
-msgid "Total Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey.tbl.column.heading,name:0
-msgid "Row Number"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_name_wiz
-msgid "survey.name.wiz"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:483
-#, python-format
-msgid "Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Choices (Only One Answers Per Row)"
-msgstr ""
-
-#. module: survey
-#: view:survey.send.invitation:0
-#: field:survey.send.invitation,send_mail_existing:0
-msgid "Send Reminder for Existing User"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:525
-#, python-format
-msgid "Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: 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
-#: view:survey.question.column.heading:0
-msgid "Use if question type is rating_scale"
-msgstr ""
-
-#. module: survey
-#: field:survey.print,page_number:0
-#: field:survey.print.answer,page_number:0
-msgid "Include Page Number"
-msgstr ""
-
-#. module: survey
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Ok"
-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.answer,comment:0
-#: field:survey.response.line,comment:0
-msgid "Notes"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-msgid "Search Survey"
-msgstr ""
-
-#. module: survey
-#: field:survey.response.answer,answer:0
-#: field:survey.tbl.column.heading,value:0
-msgid "Value"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,column_heading_ids:0
-msgid " Column heading"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_send_invitation.py:71
-#, python-format
-msgid "The following surveys are not in open state: %s"
-msgstr ""
-
-#. module: survey
-#: field:survey,tot_comp_survey:0
-msgid "Total Completed Survey"
-msgstr ""
-
-#. module: survey
-#: view:survey.response.answer:0
-msgid "(Use Only Question Type is matrix_of_drop_down_menus)"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.survey_analysis
-msgid "Survey Statistics"
-msgstr ""
-
-#. module: survey
-#: selection:survey,state:0
-#: selection:survey.request,state:0
-msgid "Cancelled"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Rating Scale"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:152
-#: code:addons/survey/survey.py:187
-#, python-format
-msgid "This survey has no question defined. Please define the questions and answers first."
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_field_type:0
-msgid "Comment Field Type"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_field_type:0
-msgid "Single Line Of Text"
-msgstr ""
-
-#. module: survey
-#: field:survey,date_open:0
-msgid "Survey Open Date"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:800
-#, python-format
-msgid "You cannot select the same answer more than one time."
-msgstr ""
-
-#. module: survey
-#: field:survey,color:0
-msgid "Color Index"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Choice (Multiple Answer)"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Edit Survey"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:766
-#: code:addons/survey/wizard/survey_answer.py:961
-#, python-format
-msgid "Please enter an integer value."
-msgstr ""
-
-#. module: survey
-#: field:survey.question.column.heading,menu_choice:0
-msgid "Menu Choice"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:493
-#, python-format
-msgid "You must enter one or more menu choices in column heading."
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "At Most"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.request:0
-msgid "My Survey(s)"
-msgstr ""
-
-#. module: survey
-#: view:survey.response.line:0
-msgid "Survey Answer Line"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_send_invitation.py:72
-#, python-format
-msgid "\n"
-"Hello %%(name)s, \n"
-"\n"
-"\n"
-"Would you please spent some of your time to fill-in our survey: \n"
-"%s\n"
-"\n"
-"You can access this survey with the following parameters:\n"
-" URL: %s\n"
-" Your login ID: %%(login)s\n"
-"\n"
-" Your password: %%(passwd)s\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"Thanks,"
-msgstr ""
-
-#. module: survey
-#: field:survey.response.line,single_text:0
-msgid "Text"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Edit..."
-msgstr ""
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "Letter (8.5\" x 11\")"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: field:survey,responsible_id:0
-msgid "Responsible"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_request
-msgid "survey.request"
-msgstr ""
-
-#. module: survey
-#: field:survey.send.invitation,mail_subject:0
-#: field:survey.send.invitation,mail_subject_existing:0
-msgid "Subject"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_maximum_float:0
-#: field:survey.question,validation_maximum_float:0
-msgid "Maximum decimal number"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_tbl_column_heading
-msgid "survey.tbl.column.heading"
-msgstr ""
-
-#. module: survey
-#: view:survey.send.invitation:0
-#: field:survey.send.invitation,send_mail:0
-msgid "Send Mail for New User"
-msgstr ""
-
-#. module: survey
-#: field:survey.send.invitation,mail_from:0
-msgid "From"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Don't Validate Comment Text."
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:532
-#, python-format
-msgid "You must enter one or more menu choices in column heading."
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Whole Number"
-msgstr ""
-
-#. module: survey
-#: field:survey.answer,question_id:0
-#: view:survey.question:0
-#: field:survey.question,question:0
-#: field:survey.question.column.heading,question_id:0
-#: field:survey.response.line,question_id:0
-msgid "Question"
-msgstr ""
-
-#. module: survey
-#: view:survey.page:0
-msgid "Search Survey Page"
-msgstr ""
-
-#. module: survey
-#: field:survey.question.wiz,name:0
-msgid "Number"
-msgstr ""
-
-#. module: survey
-#: view:survey.request:0
-msgid "Evaluation Plan Phase"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_send_invitation.py:185
-#: code:addons/survey/wizard/survey_send_invitation.py:196
-#: code:addons/survey/wizard/survey_send_invitation.py:199
-#, python-format
-msgid "Unknown"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Between"
-msgstr ""
-
-#. module: survey
-#: view:survey.print:0
-#: view:survey.print.answer:0
-#: view:survey.print.statistics:0
-msgid "Print"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "New"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,make_comment_field:0
-msgid "Make Comment Field an Answer Choice"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: field:survey,type:0
-msgid "Type"
-msgstr ""
-
-#. module: survey
-#: selection:survey.answer,type:0
-#: field:survey.request,email:0
-msgid "Email"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:96
-#: code:addons/survey/survey.py:259
-#, python-format
-msgid "%s (copy)"
-msgstr ""
-
-#. module: survey
-#: selection:survey.response,state:0
-msgid "Not Finished"
-msgstr ""
-
-#. module: survey
-#: view:survey.print:0
-msgid "Survey Print"
-msgstr ""
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Select Partner"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:527
-#, python-format
-msgid "Maximum Required Answer is greater than Minimum Required Answer."
-msgstr ""
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_reporting
-msgid "Reporting"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_answer
-msgid "Answers"
-msgstr ""
-
-#. module: survey
-#: selection:survey.response,response_type:0
-msgid "Link"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_type_form
-#: model:ir.model,name:survey.model_survey_type
-#: view:survey.type:0
-msgid "Survey Type"
-msgstr ""
-
-#. module: survey
-#: field:survey.page,sequence:0
-msgid "Page Nr"
-msgstr ""
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_print_survey_form
-msgid "Print Surveys"
-msgstr ""
-
-#. module: survey
-#: field:survey.question.column.heading,in_visible_menu_choice:0
-msgid "Is Menu Choice Invisible??"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,minimum_req_ans:0
-msgid "Minimum Required Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,req_error_msg:0
-msgid "Error Message"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:124
-#, python-format
-msgid "You cannot answer this survey more than %s times."
-msgstr ""
-
-#. module: survey
-#: field:survey.request,date_deadline:0
-msgid "Deadline date"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Date"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print
-msgid "survey.print"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: field:survey.question,page_id:0
-msgid "Survey Page"
-msgstr ""
-
-#. module: survey
-#: view:survey.question.column.heading:0
-#: field:survey.question.column.heading,title:0
-msgid "Column Heading"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,is_require_answer:0
-msgid "Require Answer to Question"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_request
-#: model:ir.actions.act_window,name:survey.action_survey_request_tree
-#: model:ir.ui.menu,name:survey.menu_survey_type_form1
-msgid "Survey Requests"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_browse_answer
-msgid "survey.browse.answer"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_field_type:0
-msgid "Paragraph of Text"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:477
-#, python-format
-msgid "Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the question is not answered, display this error message:"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Options"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:436
-#, python-format
-msgid "You must enter one or more Answers for question \"%s\" of page %s."
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Delete"
-msgstr ""
-
-#. module: survey
-#: field:survey.response.answer,comment_field:0
-#: view:survey.response.line:0
-msgid "Comment"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_answer
-#: model:ir.model,name:survey.model_survey_response_answer
-#: view:survey.answer:0
-#: view:survey.response:0
-#: view:survey.response.answer:0
-#: view:survey.response.line:0
-msgid "Survey Answer"
-msgstr ""
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Selection"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_browse_survey_response
-#: view:survey:0
-msgid "Answer Survey"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Comment Field"
-msgstr ""
-
-#. module: survey
-#: selection:survey.response,response_type:0
-msgid "Manually"
-msgstr ""
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "_Send"
-msgstr ""
-
-#. module: survey
-#: help:survey,responsible_id:0
-msgid "User responsible for survey"
-msgstr ""
-
-#. module: survey
-#: field:survey,page_ids:0
-#: view:survey.page:0
-#: view:survey.question:0
-#: field:survey.response.line,page_id:0
-msgid "Page"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_column:0
-msgid "Add comment column in matrix"
-msgstr ""
-
-#. module: survey
-#: field:survey.answer,response:0
-msgid "#Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey.print,without_pagebreak:0
-#: field:survey.print.answer,without_pagebreak:0
-msgid "Print Without Page Breaks"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the comment is an invalid format, display this error message"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_page_question
-#: model:ir.actions.act_window,name:survey.act_survey_question
-#: field:survey.page,question_ids:0
-msgid "Questions"
-msgstr ""
-
-#. module: survey
-#: help:survey,response_user:0
-msgid "Set to one if you require only one Answer per user"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:424
-#: code:addons/survey/survey.py:512
-#, python-format
-msgid "You must enter one or more column headings for question \"%s\" of page %s."
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_res_users
-#: field:survey,users:0
-msgid "Users"
-msgstr ""
-
-#. module: survey
-#: view:survey.send.invitation:0
-msgid "Message"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:497
-#, python-format
-msgid "You must enter one or more menu choices in column heading (white spaces not allowed)."
-msgstr ""
-
-#. module: survey
-#: field:survey.question,maximum_req_ans:0
-msgid "Maximum Required Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey.name.wiz,page_no:0
-msgid "Page Number"
-msgstr ""
-
-#. module: survey
-#: view:survey.print:0
-#: view:survey.print.answer:0
-msgid "Print Option"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "and"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print_statistics
-#: view:survey.print.statistics:0
-msgid "Survey Print Statistics"
-msgstr ""
-
-#. module: survey
-#: field:survey.send.invitation.log,note:0
-msgid "Log"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "When the choices do not add up correctly, display this error message"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,help:survey.action_survey_form1
-msgid "<p class=\"oe_view_nocontent_create\">\n"
-" Click to create a new survey. \n"
-" </p><p>\n"
-" You can create survey for different purposes: recruitment\n"
-" interviews, employee's periodical evaluations, marketing\n"
-" campaigns, etc.\n"
-" </p><p>\n"
-" A survey is made of pages containing questions\n"
-" of several types: text, multiple choices, etc.\n"
-" </p>\n"
-" "
-msgstr ""
-
-#. module: survey
-#: field:survey,date_close:0
-msgid "Survey Close Date"
-msgstr ""
-
-#. module: survey
-#: field:survey.question.column.heading,in_visible_rating_weight:0
-msgid "Is Rating Scale Invisible ??"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,is_validation_require:0
-msgid "Validate Text"
-msgstr ""
-
-#. module: survey
-#: view:survey.browse.answer:0
-#: view:survey.name.wiz:0
-msgid "Start"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_maximum_no:0
-#: field:survey.question,validation_maximum_no:0
-msgid "Maximum number"
-msgstr ""
-
-#. module: survey
-#: selection:survey.request,state:0
-#: selection:survey.response.line,state:0
-msgid "Draft"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print_statistics
-msgid "survey.print.statistics"
-msgstr ""
-
-#. module: survey
-#: selection:survey,state:0
-msgid "Closed"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Drop-down Menus"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: field:survey.answer,answer:0
-#: field:survey.name.wiz,response:0
-#: view:survey.page:0
-#: view:survey.print.answer:0
-#: field:survey.print.answer,response_ids:0
-#: view:survey.question:0
-#: field:survey.question,answer_choice_ids:0
-#: field:survey.request,response:0
-#: field:survey.response,question_ids:0
-#: field:survey.response.answer,answer_id:0
-#: field:survey.response.answer,response_id:0
-#: view:survey.response.line:0
-#: field:survey.response.line,response_answer_ids:0
-#: field:survey.response.line,response_id:0
-#: field:survey.response.line,response_table_ids:0
-#: field:survey.send.invitation,partner_ids:0
-#: field:survey.tbl.column.heading,response_table_id:0
-msgid "Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey,max_response_limit:0
-msgid "Maximum Answer Limit"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_act_view_survey_send_invitation
-msgid "Send Invitations"
-msgstr ""
-
-#. module: survey
-#: field:survey.name.wiz,store_ans:0
-msgid "Store Answer"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_selection.py:83
-#, python-format
-msgid "You cannot give more responses. Please contact the author of this survey for further assistance."
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Date and Time"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: field:survey,state:0
-#: view:survey.request:0
-#: field:survey.request,state:0
-#: field:survey.response,state:0
-#: field:survey.response.line,state:0
-msgid "Status"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print
-msgid "Print Survey"
-msgstr ""
-
-#. module: survey
-#: field:survey.response.answer,value_choice:0
-msgid "Value Choice"
-msgstr ""
-
-#. module: survey
-#: field:survey.response,response_type:0
-msgid "Answer Type"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Started"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_print_answer
-#: view:survey:0
-#: view:survey.print.answer:0
-msgid "Print Answer"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Textboxes"
-msgstr ""
-
-#. module: survey
-#: selection:survey.print,orientation:0
-#: selection:survey.print.answer,orientation:0
-msgid "Landscape(Horizontal)"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,no_of_rows:0
-msgid "No of Rows"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Survey Details"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Textboxes With Different Type"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Required Answer"
-msgstr ""
-
-#. module: survey
-#: model:survey.type,name:survey.survey_type2
-msgid "Customer Feeback"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Validation"
-msgstr ""
-
-#. module: survey
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Waiting Answer"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be A Decimal Number"
-msgstr ""
-
-#. module: survey
-#: field:res.users,survey_id:0
-msgid "Groups"
-msgstr ""
-
-#. module: survey
-#: selection:survey.answer,type:0
-#: selection:survey.question,type:0
-msgid "Date"
-msgstr ""
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Integer"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_send_invitation
-msgid "survey.send.invitation"
-msgstr ""
-
-#. module: survey
-#: field:survey.history,user_id:0
-#: view:survey.request:0
-#: field:survey.request,user_id:0
-#: field:survey.response,user_id:0
-msgid "User"
-msgstr ""
-
-#. module: survey
-#: field:survey.name.wiz,transfer:0
-msgid "Page Transfer"
-msgstr ""
-
-#. module: survey
-#: selection:survey.response.line,state:0
-msgid "Skiped"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:534
-#, python-format
-msgid "You must enter one or more menu choices in column heading (white spaces not allowed)."
-msgstr ""
-
-#. module: survey
-#: field:survey.print,paper_size:0
-#: field:survey.print.answer,paper_size:0
-msgid "Paper Size"
-msgstr ""
-
-#. module: survey
-#: field:survey.response.answer,column_id:0
-#: field:survey.tbl.column.heading,column_id:0
-msgid "Column"
-msgstr ""
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_browse_survey_response
-msgid "Browse Answers"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_response_line
-msgid "Survey Response Line"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:169
-#, python-format
-msgid "This survey has no pages defined. Please define pages first."
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.report_survey_form
-#: model:ir.model,name:survey.model_survey
-#: view:survey:0
-#: view:survey.browse.answer:0
-#: field:survey.browse.answer,survey_id:0
-#: field:survey.history,survey_id:0
-#: view:survey.name.wiz:0
-#: field:survey.name.wiz,survey_id:0
-#: view:survey.page:0
-#: field:survey.page,survey_id:0
-#: view:survey.print:0
-#: field:survey.print,survey_ids:0
-#: field:survey.print.statistics,survey_ids:0
-#: field:survey.question,survey:0
-#: view:survey.request:0
-#: field:survey.request,survey_id:0
-#: field:survey.response,survey_id:0
-msgid "Survey"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,in_visible_rating_weight:0
-msgid "Is Rating Scale Invisible?"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "All New Survey"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Numerical Textboxes"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_question_wiz
-msgid "survey.question.wiz"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "History"
-msgstr ""
-
-#. module: survey
-#: view:survey.request:0
-msgid "Late"
-msgstr ""
-
-#. module: survey
-#: field:survey.type,code:0
-msgid "Code"
-msgstr ""
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_print_survey_statistics
-msgid "Surveys Statistics"
-msgstr ""
-
-#. module: survey
-#: field:survey.print,orientation:0
-#: field:survey.print.answer,orientation:0
-msgid "Orientation"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.answer:0
-#: view:survey.page:0
-#: view:survey.question:0
-msgid "Seq"
-msgstr ""
-
-#. module: survey
-#: view:survey.question.column.heading:0
-msgid "Menu Choices (each choice on separate lines)"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_minimum_no:0
-#: field:survey.question,validation_minimum_no:0
-msgid "Minimum number"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,req_ans:0
-msgid "#Required Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey.answer,sequence:0
-#: field:survey.question,sequence:0
-msgid "Sequence"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_label:0
-msgid "Field Label"
-msgstr ""
-
-#. module: survey
-#: view:survey.request:0
-#: selection:survey.request,state:0
-msgid "Done"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Test Survey"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,rating_allow_one_column_require:0
-msgid "Allow Only One Answer per Column (Forced Ranking)"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: view:survey.browse.answer:0
-#: view:survey.name.wiz:0
-#: view:survey.print:0
-#: view:survey.print.answer:0
-#: view:survey.print.statistics:0
-#: view:survey.request:0
-#: view:survey.send.invitation:0
-msgid "Cancel"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "Close"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_minimum_float:0
-#: field:survey.question,validation_minimum_float:0
-msgid "Minimum decimal number"
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-#: selection:survey,state:0
-msgid "Open"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:508
-#, python-format
-msgid "You must enter one or more answers for question \"%s\" of page %s ."
-msgstr ""
-
-#. module: survey
-#: field:survey,tot_start_survey:0
-msgid "Total Started Survey"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:517
-#, python-format
-msgid "#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: help:survey,max_response_limit:0
-msgid "Set to one if survey is answerable only once"
-msgstr ""
-
-#. module: survey
-#: selection:survey.response,state:0
-msgid "Finished "
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_question_column_heading
-msgid "Survey Question Column Heading"
-msgstr ""
-
-#. module: survey
-#: field:survey.answer,average:0
-msgid "#Avg"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Matrix of Choices (Multiple Answers Per Row)"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_name
-msgid "Give Survey Answer"
-msgstr ""
-
-#. module: survey
-#: help:survey.browse.answer,response_id:0
-msgid "If this field is empty, all answers of the selected survey will be print."
-msgstr ""
-
-#. module: survey
-#: selection:survey.response.line,state:0
-msgid "Answered"
-msgstr ""
-
-#. module: survey
-#: field:survey,send_response:0
-msgid "Email Notification on Answer"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:445
-#, python-format
-msgid "Complete Survey Answer"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Comment/Essay Box"
-msgstr ""
-
-#. module: survey
-#: field:survey.answer,type:0
-msgid "Type of Answer"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,required_type:0
-msgid "Respondent must answer"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_send_invitation
-#: view:survey.send.invitation:0
-msgid "Send Invitation"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_selection.py:80
-#, python-format
-msgid "You cannot give response for this survey more than %s times."
-msgstr ""
-
-#. module: survey
-#: view:survey.question:0
-msgid "Search Question"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Single Textbox"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_question_form
-msgid "Survey Questions"
-msgstr ""
-
-#. module: survey
-#: field:survey,note:0
-#: field:survey.name.wiz,note:0
-#: view:survey.page:0
-#: field:survey.page,note:0
-#: view:survey.response.line:0
-msgid "Description"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "At Least"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_view_survey_send_invitation_log
-#: model:ir.model,name:survey.model_survey_send_invitation_log
-msgid "survey.send.invitation.log"
-msgstr ""
-
-#. module: survey
-#: selection:survey.print,orientation:0
-#: selection:survey.print.answer,orientation:0
-msgid "Portrait(Vertical)"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_send_invitation.py:67
-#: code:addons/survey/wizard/survey_send_invitation.py:68
-#, python-format
-msgid "Invitation for %s"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be Specific Length"
-msgstr ""
-
-#. module: survey
-#: model:survey.type,name:survey.survey_type3
-msgid "Supplier Selection"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:992
-#, python-format
-msgid "You cannot select same answer more than one time.'"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:685
-#, python-format
-msgid "You cannot duplicate the resource!"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:523
-#, python-format
-msgid "Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: view:survey:0
-msgid "All Open Survey"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.report.xml,name:survey.survey_browse_response
-#: field:survey.browse.answer,response_id:0
-msgid "Survey Answers"
-msgstr ""
-
-#. module: survey
-#: model:ir.ui.menu,name:survey.menu_print_survey_answer
-msgid "Surveys Answers"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.act_survey_pages
-msgid "Pages"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:455
-#, python-format
-msgid "#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: selection:survey.print,paper_size:0
-#: selection:survey.print.answer,paper_size:0
-msgid "Legal (8.5\" x 14\")"
-msgstr ""
-
-#. module: survey
-#: field:survey.type,name:0
-msgid "Name"
-msgstr ""
-
-#. module: survey
-#: view:survey.page:0
-msgid "#Questions"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,numeric_required_sum:0
-msgid "Sum of all choices"
-msgstr ""
-
-#. module: survey
-#: view:survey.request:0
-msgid "Request"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_response
-msgid "survey.response"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_valid_err_msg:0
-#: field:survey.question,make_comment_field_err_msg:0
-#: field:survey.question,numeric_required_sum_err_msg:0
-#: field:survey.question,validation_valid_err_msg:0
-msgid "Error message"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:152
-#: code:addons/survey/survey.py:169
-#: code:addons/survey/survey.py:187
-#: code:addons/survey/survey.py:424
-#: code:addons/survey/survey.py:436
-#: code:addons/survey/survey.py:450
-#: code:addons/survey/survey.py:455
-#: code:addons/survey/survey.py:465
-#: code:addons/survey/survey.py:471
-#: code:addons/survey/survey.py:477
-#: code:addons/survey/survey.py:483
-#: code:addons/survey/survey.py:487
-#: code:addons/survey/survey.py:493
-#: code:addons/survey/survey.py:497
-#: code:addons/survey/survey.py:508
-#: code:addons/survey/survey.py:512
-#: code:addons/survey/survey.py:517
-#: code:addons/survey/survey.py:523
-#: code:addons/survey/survey.py:525
-#: code:addons/survey/survey.py:527
-#: code:addons/survey/survey.py:532
-#: code:addons/survey/survey.py:534
-#: code:addons/survey/survey.py:685
-#: code:addons/survey/wizard/survey_answer.py:117
-#: code:addons/survey/wizard/survey_answer.py:124
-#: code:addons/survey/wizard/survey_answer.py:707
-#: code:addons/survey/wizard/survey_answer.py:746
-#: code:addons/survey/wizard/survey_answer.py:766
-#: code:addons/survey/wizard/survey_answer.py:795
-#: code:addons/survey/wizard/survey_answer.py:800
-#: code:addons/survey/wizard/survey_answer.py:808
-#: code:addons/survey/wizard/survey_answer.py:819
-#: code:addons/survey/wizard/survey_answer.py:828
-#: code:addons/survey/wizard/survey_answer.py:833
-#: code:addons/survey/wizard/survey_answer.py:907
-#: code:addons/survey/wizard/survey_answer.py:943
-#: code:addons/survey/wizard/survey_answer.py:961
-#: code:addons/survey/wizard/survey_answer.py:989
-#: code:addons/survey/wizard/survey_answer.py:992
-#: code:addons/survey/wizard/survey_answer.py:995
-#: code:addons/survey/wizard/survey_answer.py:1007
-#: code:addons/survey/wizard/survey_answer.py:1014
-#: code:addons/survey/wizard/survey_answer.py:1017
-#: code:addons/survey/wizard/survey_selection.py:80
-#: code:addons/survey/wizard/survey_selection.py:83
-#: code:addons/survey/wizard/survey_send_invitation.py:71
-#, python-format
-msgid "Warning!"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:465
-#, python-format
-msgid "Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d."
-msgstr ""
-
-#. module: survey
-#: field:survey.answer,menu_choice:0
-msgid "Menu Choices"
-msgstr ""
-
-#. module: survey
-#: field:survey,id:0
-msgid "ID"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/survey.py:487
-#, python-format
-msgid "Maximum Required Answer is greater than Minimum Required Answer"
-msgstr ""
-
-#. module: survey
-#: view:survey.send.invitation.log:0
-msgid "User creation"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,required_type:0
-msgid "All"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,comment_valid_type:0
-#: selection:survey.question,validation_type:0
-msgid "Must Be An Email Address"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-msgid "Multiple Choice (Only One Answer)"
-msgstr ""
-
-#. module: survey
-#: field:survey.answer,in_visible_answer_type:0
-msgid "Is Answer Type Invisible??"
-msgstr ""
-
-#. module: survey
-#: model:ir.model,name:survey.model_survey_print_answer
-msgid "survey.print.answer"
-msgstr ""
-
-#. module: survey
-#: view:survey.answer:0
-msgid "Menu Choices (each choice on separate by lines)"
-msgstr ""
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Float"
-msgstr ""
-
-#. module: survey
-#: view:survey.browse.answer:0
-#: view:survey.name.wiz:0
-#: view:survey.print:0
-#: view:survey.print.answer:0
-#: view:survey.print.statistics:0
-#: view:survey.send.invitation:0
-msgid "or"
-msgstr ""
-
-#. module: survey
-#: field:survey,title:0
-msgid "Survey Title"
-msgstr ""
-
-#. module: survey
-#: field:survey.question.column.heading,rating_weight:0
-msgid "Weight"
-msgstr ""
-
-#. module: survey
-#: selection:survey.answer,type:0
-msgid "Date & Time"
-msgstr ""
-
-#. module: survey
-#: field:survey.response,date_create:0
-#: field:survey.response.line,date_create:0
-msgid "Create Date"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,column_name:0
-msgid "Column Name"
-msgstr ""
-
-#. module: survey
-#: model:ir.actions.act_window,name:survey.action_survey_page_form
-#: model:ir.model,name:survey.model_survey_page
-#: model:ir.ui.menu,name:survey.menu_survey_page_form1
-#: view:survey.page:0
-msgid "Survey Pages"
-msgstr ""
-
-#. module: survey
-#: field:survey.question,type:0
-msgid "Question Type"
-msgstr ""
-
-#. module: survey
-#: selection:survey.question,type:0
-#: view:survey.response.line:0
-msgid "Table"
-msgstr ""
-
-#. module: survey
-#: code:addons/survey/wizard/survey_answer.py:117
-#, python-format
-msgid "You cannot answer because the survey is not open."
-msgstr ""
-
-#. module: survey
-#: field:survey.question,comment_minimum_date:0
-#: field:survey.question,validation_minimum_date:0
-msgid "Minimum date"
-msgstr ""
-
-#. module: survey
-#: field:survey,response_user:0
-msgid "Maximum Answer per User"
-msgstr ""
-
-#. module: survey
-#: field:survey.name.wiz,page:0
-msgid "Page Position"
-msgstr ""
-
diff --git a/addons/survey/report/survey_analysis_report.py b/addons/survey/report/survey_analysis_report.py
deleted file mode 100644
index f159fd6a983..00000000000
--- a/addons/survey/report/survey_analysis_report.py
+++ /dev/null
@@ -1,433 +0,0 @@
-# -*- 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 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
-
-import openerp
-from openerp import tools
-from openerp.report import report_sxw
-from openerp.report.interface import report_rml
-from openerp.tools import to_xml
-
-class survey_analysis(report_rml):
- def create(self, cr, uid, ids, datas, context):
- registry = openerp.registry(cr.dbname)
- surv_obj = registry['survey']
- user_obj = registry['res.users']
- rml_obj=report_sxw.rml_parse(cr, uid, surv_obj._name,context)
- company=user_obj.browse(cr,uid,[uid],context)[0].company_id
-
- rml ="""<document filename="Survey Analysis Report.pdf">
- <template pageSize="(595.0,842.0)" title="Survey Analysis" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
- <pageTemplate>
- <frame id="first" x1="1.3cm" y1="1.5cm" width="18.4cm" height="26.5cm"/>
- <pageGraphics>
- <fill color="black"/>
- <stroke color="black"/>
- <setFont name="DejaVuSans" size="8"/>
- <drawString x="1.3cm" y="28.3cm"> """+to_xml(rml_obj.formatLang(time.strftime("%Y-%m-%d %H:%M:%S"),date_time=True))+"""</drawString>
- <setFont name="DejaVuSans-Bold" size="10"/>
- <drawString x="9.8cm" y="28.3cm">"""+ to_xml(company.name) +"""</drawString>
- <stroke color="#000000"/>
- <lines>1.3cm 28.1cm 20cm 28.1cm</lines>
- </pageGraphics>
- </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>
- <blockTableStyle id="Table_heading">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- </blockTableStyle>
- <blockTableStyle id="Table_head_2">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEABOVE" colorName="#e6e6e6" 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="response-bold" fontName="Helvetica-Bold" fontSize="9" alignment="RIGHT" />
- <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"/>
- <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Center_heading" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="P2" fontName="Helvetica" fontSize="14.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
- </stylesheet>
- <images/>
- """
-
- if datas.has_key('form') and datas['form']['survey_ids']:
- ids = datas['form']['survey_ids']
-
- for survey in surv_obj.browse(cr, uid, ids):
- rml += """<story>
- <para style="title">Answers Summary</para>
- <para style="Standard"><font></font></para>
- <para style="P2">
- <font color="white"> </font>
- </para>
- <blockTable colWidths="280.0,100.0,120.0" style="Table_heading">
- <tr>
- <td>
- <para style="terp_tblheader_General_Centre">Survey Title </para>
- </td>
- <td>
- <para style="terp_tblheader_General_Centre">Total Started Survey </para>
- </td>
- <td>
- <para style="terp_tblheader_General_Centre">Total Completed Survey </para>
- </td>
- </tr>
- </blockTable>
- <blockTable colWidths="280.0,100.0,120.0" style="Table_head_2">
- <tr>
- <td>
- <para style="terp_default_Centre_8">""" + to_xml(tools.ustr(survey.title)) + """</para>
- </td>
- <td>
- <para style="terp_default_Centre_8">""" + str(survey.tot_start_survey) + """</para>
- </td>
- <td>
- <para style="terp_default_Centre_8">""" + str(survey.tot_comp_survey) + """</para>
- </td>
- </tr>
- </blockTable>
- <para style="P2">
- <font color="white"> </font>
- </para>"""
- for page in survey.page_ids:
- rml += """ <blockTable colWidths="500" style="Table4">
- <tr>
- <td><para style="page">Page :- """ + to_xml(tools.ustr(page.title)) + """</para></td>
- </tr>
- </blockTable>"""
- for que in page.question_ids:
- rml +="""<blockTable colWidths="500" style="Table5">
- <tr>
- <td><para style="question">""" + to_xml(tools.ustr(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 = [(0,'')]
-
- for col in que.column_heading_ids:
- if col.title not in matrix_ans:
- matrix_ans.append((col.id,col.title))
- rml += """<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
- for mat_col in range(0, len(matrix_ans)):
- rml+="""<td><para style="response">""" + to_xml(tools.ustr(matrix_ans[mat_col][1])) + """</para></td>"""
- rml += """<td><para style="response-bold">Answer Count</para></td>
- </tr>"""
- last_col = cols_widhts[-1]
-
- for ans in que.answer_choice_ids:
- rml += """<tr><td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
- cr.execute("select count(id) from survey_response_answer sra where sra.answer_id = %s", (ans.id,))
- tot_res = cr.fetchone()[0]
- cr.execute("select count(id) ,sra.column_id from survey_response_answer sra where sra.answer_id=%s group by sra.column_id", (ans.id,))
- calc_res = cr.dictfetchall()
- for mat_col in range(1, len(matrix_ans)):
- percantage = 0.0
- cal_count = 0
- for cal in calc_res:
- if cal['column_id'] == matrix_ans[mat_col][0]:
- cal_count = cal['count']
- if tot_res:
- percantage = round(float(cal_count)*100 / tot_res,2)
- 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="answer_right">""" + tools.ustr(tot_res) + """</para></td>
- </tr>"""
- rml += """</blockTable>"""
-
- if que.is_comment_require:
- cr.execute("select count(id) from survey_response_line where question_id = %s 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(tools.ustr(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','multiple_textboxes_diff_type']:
- rml += """<blockTable colWidths="240.0,210,50.0" style="Table1">"""
- rml += """ <tr>
- <td> <para style="Standard"> </para></td>
- <td> <para style="terp_default_Center_heading">Answer Percentage</para></td>
- <td> <para style="response-bold">Answer Count</para></td>
- </tr>"""
-
- for ans in que.answer_choice_ids:
- progress = ans.average * 7 / 100
- rml += """<tr><td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>
- <td>
- <illustration>
- <stroke color="lightslategray"/>
- <rect x="0.1cm" y="-0.45cm" width="7.2 cm" height="0.5cm" fill="no" stroke="yes" round="0.1cm"/>
- """
- if progress:
- rml += """<fill color="lightsteelblue"/>
- <rect x="0.2cm" y="-0.35cm" width='""" + tools.ustr(str(float(progress)) +'cm') + """' height="0.3cm" fill="yes" stroke="no" round="0.1cm"/>"""
- rml += """
- <fill color="black"/>
- <setFont name="Helvetica" size="9"/>
- <drawString x="3.2cm" y="-0.30cm">""" + tools.ustr(ans.average) + """%</drawString></illustration>
- </td>
- <td><para style="answer_right">""" + tools.ustr(ans.response) + """</para></td></tr>"""
- rml += """</blockTable>"""
-
- if que.is_comment_require:
-# if que.make_comment_field:
-# cr.execute("select count(id) from survey_response_line where question_id = %s 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(tools.ustr(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 = %s and comment != ''", (que.id,))
- tot_res = cr.fetchone()[0]
- rml += """<blockTable colWidths="450.0,50.0" style="Table1"><tr><td><para style="answer_right">""" + to_xml(tools.ustr(que.comment_label)) + """</para></td>
- <td><para style="answer_right">""" + 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 = %s 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-bold">Answer Count</para></td>
- </tr>
- <tr><td><para style="answer"></para></td>
- <td><para style="answer_right">""" + 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 = %s and comment !=''", (que.id,))
- rml += """<blockTable colWidths="400.0,100.0" style="Table1">
- <tr>
- <td> <para style="Standard"> </para></td>
- <td> <para style="response-bold">Answer Count</para></td>
- </tr>
- <tr><td><para style="answer"></para></td>
- <td><para style="answer_right">""" + 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 = [(0,'')]
-
- for col in que.column_heading_ids:
- if col.title not in matrix_ans:
- matrix_ans.append((col.id,col.title))
- rml += """<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
- for mat_col in range(0,len(matrix_ans)):
- rml += """<td><para style="response">""" + to_xml(tools.ustr(matrix_ans[mat_col][1])) + """</para></td>"""
- rml += """<td><para style="response-bold">Rating Average</para></td>
- <td><para style="response-bold">Answer Count</para></td>
- </tr>"""
-
- for ans in que.answer_choice_ids:
- rml += """<tr><td><para style="answer">""" + to_xml(tools.ustr(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 = %s and sra.column_id ='%s'", (ans.id,matrix_ans[mat_col][0]))
- 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 = %s and sqc.title ='%s'\
-+ group by sra.answer_id,sqc.rating_weight", (ans.id,matrix_ans[mat_col][1]))
- col_weight = cr.fetchone()
-
- if not col_weight:
- col_weight= (0,0)
- elif not col_weight[1]:
- col_weight = (col_weight[0],0)
- res_count = col_weight[0]
-
- if tot_res and res_count:
- rating_weight_sum += int(col_weight[1]) * tot_res
- tot_per = round((float(tot_res) * 100) / int(res_count), 2)
- else:
- 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_right">""" + tools.ustr(percantage) + """</para></td>
- <td><para style="answer_right">""" + 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(tools.ustr(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(tools.ustr(menu)) + """</para></td>"""
- rml += """<td><para style="response-bold">Answer Count</para></td></tr>"""
- cr.execute("select count(id), sra.answer_id from survey_response_answer sra \
- where sra.column_id='%s' group by sra.answer_id ", (column.id,))
- res_count = cr.dictfetchall()
- cr.execute("select count(sra.id),sra.value_choice, sra.answer_id, sra.column_id from survey_response_answer sra \
- where sra.column_id='%s' group by sra.value_choice ,sra.answer_id, sra.column_id", (column.id,))
- calc_percantage = cr.dictfetchall()
-
- for ans in que.answer_choice_ids:
- rml += """<tr><td><para style="answer_right">""" + to_xml(tools.ustr(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 = round((float(calc)* 100) / response,2)
- 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="answer_right">""" + 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">Answer Average</para></td>
- <td> <para style="response">Answer Total</para></td>
- <td> <para style="response-bold">Answer Count</para></td>
- </tr>"""
- for ans in que.answer_choice_ids:
- cr.execute("select answer from survey_response_answer where answer_id=%s 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(tools.ustr(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_right">""" + 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 += """</story>"""
-
- rml += """</document>"""
- report_type = datas.get('report_type', 'pdf')
- create_doc = self.generators[report_type]
- self.internal_header=True
- 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:
diff --git a/addons/survey/report/survey_browse_response.py b/addons/survey/report/survey_browse_response.py
deleted file mode 100644
index 7c4a5e98aa1..00000000000
--- a/addons/survey/report/survey_browse_response.py
+++ /dev/null
@@ -1,542 +0,0 @@
-# -*- 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 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
-
-import openerp
-from openerp import tools
-from openerp.report import report_sxw
-from openerp.report.interface import report_rml
-from openerp.tools import to_xml
-from openerp.tools.translate import _
-
-class survey_browse_response(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')
-
- registry = openerp.registry(cr.dbname)
-
- if datas.has_key('form') and datas['form'].get('orientation','') == 'vertical':
- if datas['form'].get('paper_size','') == 'letter':
- _pageSize = ('21.6cm','27.9cm')
- elif datas['form'].get('paper_size','') == 'legal':
- _pageSize = ('21.6cm','35.6cm')
- elif datas['form'].get('paper_size','') == 'a4':
- _pageSize = ('21.1cm','29.7cm')
-
- elif datas.has_key('form') and datas['form'].get('orientation',False) == 'horizontal':
- if datas['form'].get('paper_size','') == 'letter':
- _pageSize = ('27.9cm','21.6cm')
- elif datas['form'].get('paper_size','') == 'legal':
- _pageSize = ('35.6cm','21.6cm')
- elif datas['form'].get('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 Answer Report.pdf">
- <template pageSize="("""+_pageSize[0]+""","""+_pageSize[1]+""")" title='Survey Answer' author="OpenERP S.A.(sales@openerp.com)" 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="tbl_white">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
- </blockTableStyle>
- <blockTableStyle id="tbl_gainsboro">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
- <blockBackground colorName="gainsboro" start="0,0" stop="-1,-1"/>
- </blockTableStyle>
- <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="simple_table">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- <lineStyle kind="LINEBELOW" colorName="#e6e6e6"/>
- </blockTableStyle>
- <blockTableStyle id="note_table">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- </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>
- <blockTableStyle id="Table_heading">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- </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="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>
- <initialize>
- <paraStyle name="all" alignment="justify"/>
- </initialize>
- <paraStyle name="title" fontName="Helvetica-Bold" fontSize="18.0" leftIndent="0.0" textColor="white"/>
- <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"/>
- <paraStyle name="terp_default_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_tblheader_General_Centre_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_right_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_right" fontName="Helvetica-Bold" fontSize="10.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="descriptive_text" fontName="Helvetica-Bold" fontSize="18.0" leftIndent="0.0" textColor="white"/>
- <paraStyle name="descriptive_text_heading" fontName="Helvetica-Bold" fontSize="18.0" alignment="RIGHT" leftIndent="0.0" textColor="white"/>
- </stylesheet>
- <images/>
- <story>"""
- surv_resp_obj = registry['survey.response']
- rml_obj=report_sxw.rml_parse(cr, uid, surv_resp_obj._name,context)
- if datas.has_key('form') and datas['form'].has_key('response_ids'):
- response_id = datas['form']['response_ids']
- elif context.has_key('response_id') and context['response_id']:
- response_id = [int(context['response_id'][0])]
- else:
- response_id = surv_resp_obj.search(cr, uid, [('survey_id', 'in', ids)])
-
- surv_resp_line_obj = registry['survey.response.line']
- surv_obj = registry['survey']
-
- for response in surv_resp_obj.browse(cr, uid, response_id):
- for survey in surv_obj.browse(cr, uid, [response.survey_id.id]):
- tbl_width = float(_tbl_widths.replace('cm', ''))
- colwidth = "2.5cm,4.8cm," + str(tbl_width - 15.0) +"cm,3.2cm,4.5cm"
- resp_create = tools.ustr(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S')))
- rml += """<blockTable colWidths='""" + colwidth + """' style="Table_heading">
- <tr>
- <td><para style="terp_default_9_Bold">""" + _('Print Date : ') + """</para></td>
- <td><para style="terp_default_9">""" + to_xml(rml_obj.formatLang(time.strftime("%Y-%m-%d %H:%M:%S"),date_time=True)) + """</para></td>
- <td><para style="terp_default_9"></para></td>
- <td><para style="terp_default_9_Bold">""" +_('Answered by : ') + """</para></td>
- <td><para style="terp_default_9">""" + to_xml(response.user_id.login or '') + """</para></td>
- </tr>
- <tr>
- <td><para style="terp_default_9"></para></td>
- <td><para style="terp_default_9"></para></td>
- <td><para style="terp_default_9"></para></td>
- <td><para style="terp_default_9_Bold">""" +_('Answer Date : ') + """</para></td>
- <td><para style="terp_default_9">""" + to_xml(resp_create) + """</para></td>
- </tr>
- </blockTable><para style="P2"></para>"""
-
- status = _("Not Finished")
- if response.state == "done": status = _("Finished")
- colwidth = str(tbl_width - 7) + "cm,"
- colwidth += "7cm"
- rml += """<blockTable colWidths='""" + str(colwidth) + """' style="title_tbl">
- <tr>
- <td><para style="title">""" + to_xml(tools.ustr(survey.title)) + """</para><para style="P2"><font></font></para></td>
- <td><para style="descriptive_text_heading">"""+_('Status :- ')+ to_xml(tools.ustr(status)) + """</para><para style="P2"><font></font></para></td>
- </tr>
- </blockTable>"""
-
- if survey.note:
- rml += """<blockTable colWidths='""" + _tbl_widths + """' style="note_table">
- <tr><td><para style="response">""" + to_xml(tools.ustr(survey.note or '')) + """</para><para style="P2"><font></font></para></td></tr>
- </blockTable>"""
-
- for page in survey.page_ids:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="page_tbl">
- <tr><td><para style="page">"""+_('Page :- ') + to_xml(tools.ustr(page.title or '')) + """</para></td></tr>
- </blockTable>"""
- if page.note:
- rml += """<para style="P2"></para>
- <blockTable colWidths='""" + str(_tbl_widths) + """' style="note_table">
- <tr><td><para style="response">""" + to_xml(tools.ustr(page.note or '')) + """</para></td></tr>
- </blockTable>"""
-
- for que in page.question_ids:
- rml += """<para style="P2"></para>
- <blockTable colWidths='""" + str(_tbl_widths) + """' style="Table5">
- <tr><td><para style="question">""" + to_xml(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 ['descriptive_text']:
- rml +="""<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr><td> <para style="response">""" + to_xml(tools.ustr(que.descriptive_text)) + """</para></td> </tr>
- </blockTable>"""
-
- elif que.type in ['table']:
- if len(answer) and answer[0].state == "done":
- col_heading = registry['survey.tbl.column.heading']
- cols_widhts = []
- 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'
- 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">""" + to_xml(tools.ustr(col.title)) +"""</para></td>"""
- rml += """</tr></blockTable>"""
- i = 0
-
- for row in range(0, que.no_of_rows):
- if i%2 != 0:
- style = 'tbl_white'
- else:
- style = 'tbl_gainsboro'
- i +=1
- rml += """<blockTable colWidths=" """ + str(colWidths) + """ " style='"""+style+"""'><tr>"""
- table_data = col_heading.browse(cr, uid, col_heading.search(cr, uid, [('response_table_id', '=', answer[0].id), ('name', '=', row)]))
- for column in matrix_ans:
- value = False
- for col in table_data:
- if column == col.column_id.title:
- value = col.value
- if value:
- rml += """<td> <para style="terp_default_9">""" + to_xml(tools.ustr(value)) +"""</para></td>"""
- else:
- rml += """<td><para style="terp_default_9"><font color ="white"> </font></para></td>"""
- rml += """</tr></blockTable>"""
-
- else:
- rml +="""<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr><td> <para style="response">"""+ _('No Answer') + """</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":
- ans_list = []
- for ans in answer[0].response_answer_ids:
- ans_list.append(to_xml(tools.ustr(ans.answer_id.answer)))
- answer_choice=[]
-
- for ans in que['answer_choice_ids']:
- answer_choice.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_choice,_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_choice)) / _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="simple_table"><tr>"""
-
- for div in range(0, len(divide)):
- if divide[div] != '':
- if que.type == 'multiple_choice_multiple_ans':
- if divide[div] in ans_list:
- rml += """<td><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></td>
- <td><para style="answer">""" + divide[div] + """</para></td>"""
- else:
- rml+="""<td><illustration>
- <rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="no" stroke="yes" round="0.1cm"/>
- </illustration></td>
- <td><para style="answer">""" + divide[div] + """</para></td>"""
- else:
- if divide[div] in ans_list:
- rml += """<td><illustration><fill color="white"/>
- <circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes" round="0.1cm"/>
- <fill color="gray"/>
- <circle x="0.3cm" y="-0.18cm" radius="0.10 cm" fill="yes" stroke="no" round="0.1cm"/>
- </illustration></td>
- <td><para style="answer">""" + divide[div] + """</para></td>"""
- else:
- rml += """<td>
- <illustration>
- <circle x="0.3cm" y="-0.18cm" radius="0.23 cm" fill="no" stroke="yes" round="0.1cm"/>
- </illustration>
- </td>
- <td><para style="answer">""" + divide[div] + """</para></td>"""
- else:
- rml += """<td></td><td></td>"""
- rml += """</tr></blockTable>"""
-
- if que.is_comment_require and answer[0].comment:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table"><tr>
- <td><para style="answer">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr></blockTable>"""
- else:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr><td> <para style="response">No Answer</para></td> </tr>
- </blockTable>"""
-
- elif que.type in ['multiple_textboxes_diff_type','multiple_textboxes','date','date_and_time','numerical_textboxes','multiple_textboxes_diff_type']:
- if len(answer) and answer[0].state == "done":
- cols_widhts = []
- cols_widhts.append(float(_tbl_widths.replace('cm',''))/2)
- cols_widhts.append(float(_tbl_widths.replace('cm',''))/2)
- colWidths = "cm,".join(map(tools.ustr, cols_widhts))
- colWidths = tools.ustr(colWidths) + 'cm'
- answer_list = {}
-
- for ans in answer[0].response_answer_ids:
- answer_list[ans.answer_id.answer] = ans.answer
- for que_ans in que['answer_choice_ids']:
- if que_ans.answer in answer_list:
- rml += """<blockTable colWidths='""" + str(colWidths) + """' style="simple_table">
- <tr> <td> <para style="response">""" + to_xml(tools.ustr(que_ans.answer)) + """</para></td>
- <td> <para style="response">""" + to_xml(tools.ustr(answer_list[que_ans.answer])) + """</para></td></tr>
- </blockTable>"""
- else:
- rml += """<blockTable colWidths='""" + str(colWidths) + """' style="simple_table">
- <tr> <td> <para style="response">""" + to_xml(tools.ustr(que_ans.answer)) + """</para></td>
- <td> <para style="response"></para></td></tr>
- </blockTable>"""
- else:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr> <td> <para style="response">No Answer</para></td> </tr>
- </blockTable>"""
-
- elif que.type in ['single_textbox']:
- if len(answer) and answer[0].state == "done":
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].single_text)) + """</para></td></tr>
- </blockTable>"""
- else:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr> <td> <para style="response">No Answer</para></td> </tr>
- </blockTable>"""
-
- elif que.type in ['comment']:
- if len(answer) and answer[0].state == "done":
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr>
- </blockTable>"""
- else:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr> <td> <para style="response">No Answer</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.type in ['matrix_of_choices_only_one_ans', 'rating_scale'] and que.comment_column:
- pass
- cols_widhts = []
- 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.type in ['matrix_of_choices_only_one_ans','rating_scale'] and 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 = [(0, ''),]
-
- for col in que.column_heading_ids:
- if col.title not in matrix_ans:
- matrix_ans.append((col.id, col.title))
- len_matrix = len(matrix_ans)
- if que.type in ['matrix_of_choices_only_one_ans', 'rating_scale'] and que.comment_column:
- matrix_ans.append((0,que.column_name))
- rml += """<blockTable colWidths=" """ + colWidths + """ " style="simple_table"><tr>"""
-
- for mat_col in range(0, len(matrix_ans)):
- rml += """<td><para style="response">""" + to_xml(tools.ustr(matrix_ans[mat_col][1])) + """</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(tools.ustr(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.column_id.id == matrix_ans[mat_col][0]:
- comment_value = to_xml(tools.ustr(res_ans.comment_field))
- 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.type in ['matrix_of_choices_only_one_ans','rating_scale'] and que.comment_column:
- if comment_value == 'False':
- comment_value = ''
- rml += """<td><para style="response">""" + to_xml(tools.ustr(comment_value)) + """</para></td>"""
- rml += """</tr></blockTable>"""
-
- if que.is_comment_require:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table"><tr>
- <td><para style="answer">""" + to_xml(tools.ustr(answer[0].comment or '')) + """</para></td></tr></blockTable>"""
- else:
- rml += """<blockTable colWidths='""" + str(_tbl_widths) + """' style="simple_table">
- <tr><td> <para style="response">No Answer</para></td> </tr>
- </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_browse_response('report.survey.browse.response', 'survey','','')
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/report/survey_form.py b/addons/survey/report/survey_form.py
deleted file mode 100644
index 6a4f5fa4795..00000000000
--- a/addons/survey/report/survey_form.py
+++ /dev/null
@@ -1,397 +0,0 @@
-# -*- 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 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 openerp
-from openerp import tools
-from openerp.report.interface import report_rml
-from openerp.tools import to_xml
-
-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'].get('orientation','') == 'vertical':
- if datas['form'].get('paper_size','') == 'letter':
- _pageSize = ('21.6cm','27.9cm')
- elif datas['form'].get('paper_size','') == 'legal':
- _pageSize = ('21.6cm','35.6cm')
- elif datas['form'].get('paper_size','') == 'a4':
- _pageSize = ('21.1cm','29.7cm')
- elif datas.has_key('form') and datas['form'].get('orientation','') == 'horizontal':
- if datas['form'].get('paper_size','') == 'letter':
- _pageSize = ('27.9cm','21.6cm')
- elif datas['form'].get('paper_size','') == 'legal':
- _pageSize = ('35.6cm','21.6cm')
- elif datas['form'].get('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' author="OpenERP S.A.(sales@openerp.com)" 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="tbl_white">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
- </blockTableStyle>
- <blockTableStyle id="tbl_gainsboro">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEBEFORE" colorName="#777777" start="0,0" stop="-1,-1"/>
- <lineStyle kind="LINEAFTER" colorName="#777777" start="0,0" stop="-1,-1"/>
- <blockBackground colorName="gainsboro" start="0,0" stop="-1,-1"/>
- </blockTableStyle>
- <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="note_table">
- <blockAlignment value="LEFT"/>
- <blockValign value="TOP"/>
- </blockTableStyle>
- <blockTableStyle id="tbl">
- <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>
- <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" leading="15" 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 = openerp.registry(cr.dbname)['survey']
- for survey in surv_obj.browse(cr,uid,ids):
- rml += """
- <blockTable colWidths='"""+_tbl_widths+"""' style="title_tbl">
- <tr><td><para style="title">""" + to_xml(tools.ustr(survey.title)) + """</para><para style="P2"><font></font></para></td></tr>
- </blockTable>"""
- if survey.note:
- rml += """
- <para style="P2"></para>
- <blockTable colWidths='"""+_tbl_widths+"""' style="note_table">
- <tr><td><para style="descriptive_text">""" + to_xml(tools.ustr(survey.note)) + """</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) + """. """ + to_xml(tools.ustr(page.title)) + """</para><para style="P2"><font></font></para></td></tr>
- </blockTable>"""
- if page.note:
- rml += """<para style="P2"></para><blockTable colWidths='"""+_tbl_widths+"""' style="note_table">
- <tr><td><para style="descriptive_text">""" + to_xml(tools.ustr(page.note or '')) + """</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">""" + to_xml(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','rating_scale','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(to_xml(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(tools.ustr(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','rating_scale']:
- value = """ <fill color="white"/>
- <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','multiple_textboxes_diff_type']:
- 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'
- 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(str(cols_widhts[0] - 0.3) + "cm") + """' 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))
- rml += """<blockTable colWidths=" """ + colWidths + """cm " style="ans_tbl">
- <tr>
- <td><para style="comment"><font color="white"> </font></para>
- <illustration>
- <rect x="0.1cm" y="0.3cm" width='""" + tools.ustr(str(float(colWidths) - 0.6) +'cm') + """' 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))
- rml += """<para style="P2"><font color="white"> </font></para>
- <blockTable colWidths=" """ + colWidths + """cm " style="ans_tbl">
- <tr>
- <td>
- <illustration>
- <rect x="0.2cm" y="0.3cm" width='""" + tools.ustr(str(float(colWidths) - 0.7) +'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="tbl"><tr>"""
- for col in que.column_heading_ids:
- rml+="""<td><para style="terp_tblheader_Details">""" + to_xml(tools.ustr(col.title)) + """</para></td>"""
- rml += """</tr></blockTable>"""
- i = 0
- for r in range(0,que.no_of_rows):
- if i%2 != 0:
- style = 'tbl_white'
- else:
- style = 'tbl_gainsboro'
- i += 1
- rml += """<blockTable colWidths=" """ + colWidths + """ " style='"""+style+"""'><tr>"""
- for c in que.column_heading_ids:
- rml += """
- <td><para style="terp_default_9"><font color="white"> </font></para></td>"""
- rml += """</tr></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:
diff --git a/addons/survey/security/ir.model.access.csv b/addons/survey/security/ir.model.access.csv
index b613e223afa..89c001ce44e 100644
--- a/addons/survey/security/ir.model.access.csv
+++ b/addons/survey/security/ir.model.access.csv
@@ -1,24 +1,22 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_survey_type_manager,survey.type.manager,model_survey_type,base.group_tool_manager,1,1,1,1
-access_survey_request_manager,survey.request manager,model_survey_request,base.group_tool_manager,1,1,1,1
-access_survey_tbl_column_heading_manager,survey.tbl.column.heading manager,model_survey_tbl_column_heading,base.group_tool_manager,1,1,1,1
-access_survey_res_partner_user,survey.res.partner.user,base.model_res_partner,base.group_tool_user,1,1,1,1
-access_survey_user,survey.user,model_survey,base.group_tool_user,1,1,1,1
-access_survey_page_user,survey.page user,model_survey_page,base.group_tool_user,1,1,1,1
-access_survey_question_user,survey.question user,model_survey_question,base.group_tool_user,1,1,1,1
-access_survey_answer_user,survey.answer user,model_survey_answer,base.group_tool_user,1,1,1,1
-access_survey_response_user,survey.response user,model_survey_response,base.group_tool_user,1,1,1,1
-access_survey_response_answer_user,survey.response.answer user,model_survey_response_answer,base.group_tool_user,1,1,1,1
-access_survey_history_user,survey.history.user,model_survey_history,base.group_tool_user,1,1,1,1
-access_survey_response_line_user,survey.response.line user,model_survey_response_line,base.group_tool_user,1,1,1,1
-access_survey_res_partner_user,survey.res.partner.user,base.model_res_partner,base.group_tool_user,1,1,1,1
-access_survey_survey_user,survey.survey.user,model_survey,base.group_survey_user,1,1,1,1
-access_survey_page_survey_user,survey.page.survey.user,model_survey_page,base.group_survey_user,1,1,1,1
-access_survey_question_survey_user,survey.question.survey.user,model_survey_question,base.group_survey_user,1,1,1,1
-access_survey_answer_survey_user,survey.answer.survey.user,model_survey_answer,base.group_survey_user,1,1,1,1
-access_survey_response_survey_user,survey.response.survey.user,model_survey_response,base.group_survey_user,1,1,1,1
-access_survey_response_answer_survey_user,survey.response.answer.survey.user,model_survey_response_answer,base.group_survey_user,1,1,1,1
-access_survey_history_survey_user,survey.history.survey.user,model_survey_history,base.group_survey_user,1,1,1,1
-access_survey_response_line_survey_user,survey.response.line.survey.user,model_survey_response_line,base.group_survey_user,1,1,1,1
-access_survey_question_column_heading_survey_user,survey.question.column.heading.survey.user,model_survey_question_column_heading,base.group_survey_user,1,0,0,0
-access_survey_question_column_heading_user,survey.question.column.heading user,model_survey_question_column_heading,base.group_tool_user,1,1,1,1
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_survey_public,survey.survey public,model_survey_survey,base.group_public,1,0,0,0
+access_survey_page_public,survey.page public,model_survey_page,base.group_public,1,0,0,0
+access_survey_question_public,survey.question public,model_survey_question,base.group_public,1,0,0,0
+access_survey_label_public,survey.label public,model_survey_label,base.group_public,1,0,0,0
+access_survey_user_input_public,survey.user_input public,model_survey_user_input,base.group_public,1,1,1,0
+access_survey_user_input_line_public,survey.user_input_line public,model_survey_user_input_line,base.group_public,1,1,1,0
+access_survey_stage_public,survey.stage public,model_survey_stage,base.group_public,1,0,0,0
+access_survey_user,survey.survey user,model_survey_survey,base.group_survey_user,1,0,0,0
+access_survey_page_user,survey.page user,model_survey_page,base.group_survey_user,1,0,0,0
+access_survey_question_user,survey.question user,model_survey_question,base.group_survey_user,1,0,0,0
+access_survey_label_user,survey.label user,model_survey_label,base.group_survey_user,1,0,0,0
+access_survey_user_input_user,survey.user_input user,model_survey_user_input,base.group_survey_user,1,1,1,0
+access_survey_user_input_line_user,survey.user_input_line user,model_survey_user_input_line,base.group_survey_user,1,1,1,0
+access_survey_stage_user,survey.stage user,model_survey_stage,base.group_survey_user,1,0,0,0
+access_survey_manager,survey.survey manager,model_survey_survey,base.group_survey_manager,1,1,1,1
+access_survey_page_manager,survey.page manager,model_survey_page,base.group_survey_manager,1,1,1,1
+access_survey_question_manager,survey.question manager,model_survey_question,base.group_survey_manager,1,1,1,1
+access_survey_label_manager,survey.label manager,model_survey_label,base.group_survey_manager,1,1,1,1
+access_survey_user_input_manager,survey.user_input manager,model_survey_user_input,base.group_survey_manager,1,1,1,1
+access_survey_user_input_line_manager,survey.user_input_line manager,model_survey_user_input_line,base.group_survey_manager,1,1,1,1
+access_survey_stage_manager,survey.stage manager,model_survey_stage,base.group_survey_manager,1,1,1,1 \ No newline at end of file
diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml
index 3b0cf5844ce..872e1049bcd 100644
--- a/addons/survey/security/survey_security.xml
+++ b/addons/survey/security/survey_security.xml
@@ -1,19 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
- <data noupdate="0">
- <record model="res.groups" id="base.group_tool_user">
- <field name="name">User</field>
- <field name="category_id" ref="base.module_category_tools"/>
- </record>
- <record model="res.groups" id="base.group_tool_manager">
- <field name="name">Manager</field>
- <field name="category_id" ref="base.module_category_tools"/>
- <field name="implied_ids" eval="[(4, ref('base.group_tool_user'))]"/>
- <field name="users" eval="[(4, ref('base.user_root'))]"/>
- </record>
+ <data>
+ <!-- Survey users -->
<record model="res.groups" id="base.group_survey_user">
<field name="name">Survey / User</field>
+ </record>
+
+ <!-- Survey managers -->
+ <record model="res.groups" id="base.group_survey_manager">
+ <field name="name">Survey / Manager</field>
+ <field name="implied_ids" eval="[(4, ref('base.group_survey_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
+
+ <!-- Record rules -->
+ <record id="survey_public_access" model="ir.rule">
+ <field name="name">Public access to surveys</field>
+ <field name="model_id" ref="survey.model_survey_survey"/>
+ <field name="domain_force">[('state', '=', 'open'), ('auth_required', '=', False)]</field>
+ <field name="groups" eval="[(4, ref('base.group_public'))]"/>
+ <field eval="0" name="perm_unlink"/>
+ <field eval="0" name="perm_write"/>
+ <field eval="1" name="perm_read"/>
+ <field eval="0" name="perm_create"/>
+ </record>
+
+ <record id="survey_rule" model="ir.rule">
+ <field name="name">Access to survey for regular users</field>
+ <field name="model_id" ref="survey.model_survey_survey"/>
+ <field name="domain_force">[('stage_id.closed', '=', False)]</field>
+ <field name="groups" eval="[(4, ref('base.group_survey_user'))]"/>
+ <field eval="0" name="perm_unlink"/>
+ <field eval="0" name="perm_write"/>
+ <field eval="1" name="perm_read"/>
+ <field eval="0" name="perm_create"/>
+ </record>
+
+ <record id="survey_rule_manager" model="ir.rule">
+ <field name="name">Survey Manager access rights</field>
+ <field name="model_id" ref="survey.model_survey_survey"/>
+ <field name="domain_force">[(1, '=', 1)]</field>
+ <field name="groups" eval="[(4, ref('base.group_survey_manager'))]"/>
+ <field eval="1" name="perm_unlink"/>
+ <field eval="1" name="perm_write"/>
+ <field eval="1" name="perm_read"/>
+ <field eval="1" name="perm_create"/>
+ </record>
+
+ <record id="survey_public_access" model="ir.rule">
+ <field name="name">Public access to user_input</field>
+ <field name="model_id" ref="survey.model_survey_user_input"/>
+ <field name="domain_force">[('create_uid', '=', user.id)]</field>
+ <field name="groups" eval="[(4, ref('base.group_public'))]"/>
+ <field eval="0" name="perm_unlink"/>
+ <field eval="1" name="perm_write"/>
+ <field eval="1" name="perm_read"/>
+ <field eval="1" name="perm_create"/>
+ </record>
+
+ <record id="survey_rule" model="ir.rule">
+ <field name="name">Access to user_input for regular users</field>
+ <field name="model_id" ref="survey.model_survey_user_input"/>
+ <field name="domain_force">[('create_uid', '=', user.id)]</field>
+ <field name="groups" eval="[(4, ref('base.group_survey_user'))]"/>
+ <field eval="0" name="perm_unlink"/>
+ <field eval="1" name="perm_write"/>
+ <field eval="1" name="perm_read"/>
+ <field eval="1" name="perm_create"/>
+ </record>
+
+ <record id="survey_rule_manager" model="ir.rule">
+ <field name="name">Survey Manager access rights</field>
+ <field name="model_id" ref="survey.model_survey_user_input"/>
+ <field name="domain_force">[(1, '=', 1)]</field>
+ <field name="groups" eval="[(4, ref('base.group_survey_manager'))]"/>
+ <field eval="1" name="perm_unlink"/>
+ <field eval="1" name="perm_write"/>
+ <field eval="1" name="perm_read"/>
+ <field eval="1" name="perm_create"/>
+ </record>
+
</data>
</openerp>
diff --git a/addons/survey/specification/specification.txt b/addons/survey/specification/specification.txt
deleted file mode 100644
index 673ca5bad17..00000000000
--- a/addons/survey/specification/specification.txt
+++ /dev/null
@@ -1,157 +0,0 @@
-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/
-
diff --git a/addons/survey/specification/survey.png b/addons/survey/specification/survey.png
deleted file mode 100644
index 52acff391d0..00000000000
--- a/addons/survey/specification/survey.png
+++ /dev/null
Binary files differ
diff --git a/addons/survey/specification/survey_page.png b/addons/survey/specification/survey_page.png
deleted file mode 100644
index 4fceac4b81b..00000000000
--- a/addons/survey/specification/survey_page.png
+++ /dev/null
Binary files differ
diff --git a/addons/survey/specification/survey_question.png b/addons/survey/specification/survey_question.png
deleted file mode 100644
index 516606902cb..00000000000
--- a/addons/survey/specification/survey_question.png
+++ /dev/null
Binary files differ
diff --git a/addons/survey/specification/survey_response.png b/addons/survey/specification/survey_response.png
deleted file mode 100644
index af78bd1977d..00000000000
--- a/addons/survey/specification/survey_response.png
+++ /dev/null
Binary files differ
diff --git a/addons/survey/static/src/css/survey.css b/addons/survey/static/src/css/survey.css
deleted file mode 100644
index 15899533213..00000000000
--- a/addons/survey/static/src/css/survey.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.openerp .oe_survey_title {
- font-weight: bold;
- font-size: 19px;
- margin: 8px 0px 8px 0px;
- color: #5B5B5B;
-}
-
-.openerp .oe_kanban_survey {
- /* Customize height and width according bootstrap3 */
- width: 212px;
- min-height: 86px !important;
- /* End of customize */
-}
diff --git a/addons/survey/static/src/css/survey_result.css b/addons/survey/static/src/css/survey_result.css
new file mode 100644
index 00000000000..9762bc3866f
--- /dev/null
+++ b/addons/survey/static/src/css/survey_result.css
@@ -0,0 +1,53 @@
+.only_right_radius {
+ border-top-right-radius: 2em;
+ border-bottom-right-radius: 2em;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.only_left_radius {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-top-left-radius: 2em;
+ border-bottom-left-radius: 2em;
+}
+
+.no_radius {
+ border-radius: 0;
+}
+
+.clear_survey_filter, .filter-all, .filter-finished{
+ cursor: pointer;
+}
+
+.nvtooltip h5 {
+ margin: 0;
+ line-height: 18px;
+ font-weight: bold;
+ background-color: rgba(247,247,247,0.75);
+ text-align: center;
+ border-bottom: 1px solid #ebebeb;
+ -webkit-border-radius: 5px 5px 0 0;
+ -moz-border-radius: 5px 5px 0 0;
+ border-radius: 5px 5px 0 0;
+}
+
+
+.survey_answer i {
+ padding:3px;
+ cursor:pointer;
+}
+
+.survey_answer i.invisible {
+ visibility: hidden!important;
+}
+
+@media print {
+ .tab-content > .tab-pane {
+ display: block;
+ }
+
+ .tab-content > .survey_graph > svg {
+ width: 1150px;
+ }
+}
diff --git a/addons/survey/static/src/js/survey.js b/addons/survey/static/src/js/survey.js
new file mode 100644
index 00000000000..2d97250b0ce
--- /dev/null
+++ b/addons/survey/static/src/js/survey.js
@@ -0,0 +1,131 @@
+/*
+ * OpenERP, Open Source Management Solution
+ * Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
+ *
+ * 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/>.
+ */
+
+/*
+ * This file is intended to add interactivity to survey forms rendered by
+ * the website engine.
+ */
+
+$(document).ready(function () {
+ 'use strict';
+
+ console.debug("[survey] Custom JS for survey is loading...");
+
+ var the_form = $('.js_surveyform');
+ var prefill_controller = the_form.attr("data-prefill");
+ var validate_controller = the_form.attr("data-validate");
+ var submit_controller = the_form.attr("data-submit");
+ var print_mode = false;
+
+ // Printing mode: will disable all the controls in the form
+ if (_.isUndefined(submit_controller)) {
+ $('.js_surveyform :input').prop('disabled', true);
+ print_mode = true;
+ }
+
+ // Custom code for right behavior of radio buttons with comments box
+ $('.js_comments>input[type="text"]').focusin(function(){
+ $(this).prev().find('>input').attr("checked","checked");
+ });
+ $('.js_radio input[type="radio"][data-oe-survey-otherr!="1"]').click(function(){
+ $(this).closest('.js_radio').find('.js_comments>input[type="text"]').val("");
+ });
+ $('.js_comments input[type="radio"]').click(function(){
+ $(this).closest('.js_comments').find('>input[data-oe-survey-othert="1"]').focus();
+ });
+ // Custom code for right behavior of dropdown menu with comments
+ $('.js_drop input[data-oe-survey-othert="1"]').hide();
+ $('.js_drop select').change(function(){
+ var other_val = $(this).find('.js_other_option').val();
+ if($(this).val() === other_val){
+ $(this).parent().removeClass('col-md-12').addClass('col-md-6');
+ $(this).closest('.js_drop').find('input[data-oe-survey-othert="1"]').show().focus();
+ }
+ else{
+ $(this).parent().removeClass('col-md-6').addClass('col-md-12');
+ $(this).closest('.js_drop').find('input[data-oe-survey-othert="1"]').val("").hide();
+ }
+ });
+ // Custom code for right behavior of checkboxes with comments box
+ $('.js_ck_comments>input[type="text"]').focusin(function(){
+ $(this).prev().find('>input').attr("checked","checked");
+ });
+ $('.js_ck_comments input[type="checkbox"]').change(function(){
+ if (! $(this).prop("checked")){
+ $(this).closest('.js_ck_comments').find('input[type="text"]').val("");
+ }
+ });
+
+ // Pre-filling of the form with previous answers
+ function prefill(){
+ var prefill_def = $.ajax(prefill_controller, {dataType: "json"})
+ .done(function(json_data){
+ _.each(json_data, function(value, key){
+ the_form.find(".form-control[name=" + key + "]").val(value);
+ the_form.find("input[name^=" + key + "]").each(function(){
+ $(this).val(value);
+ });
+ });
+ })
+ .fail(function(){
+ console.warn("[survey] Unable to load prefill data");
+ });
+ return prefill_def;
+ }
+
+ // Parameters for form submission
+ $('.js_surveyform').ajaxForm({
+ url: submit_controller,
+ type: 'POST', // submission type
+ dataType: 'json', // answer expected type
+ beforeSubmit: function(){ // hide previous errmsg before resubmitting
+ $('.js_errzone').html("").hide();
+ },
+ success: function(response, status, xhr, wfe){ // submission attempt
+ if(_.has(response, 'errors')){ // some questions have errors
+ _.each(_.keys(response.errors), function(key){
+ $("#" + key + '>.js_errzone').append('<p>' + response.errors[key] + '</p>').show();
+ });
+ return false;
+ }
+ else if (_.has(response, 'redirect')){ // form is ok
+ window.location.replace(response.redirect);
+ return true;
+ }
+ else { // server sends bad data
+ console.error("Incorrect answer sent by server");
+ return false;
+ }
+ },
+ timeout: 5000,
+ error: function(jqXHR, textStatus, errorThrown){ // failure of AJAX request
+ $('#AJAXErrorModal').modal('show');
+ }
+ });
+
+ // // Handles the event when a question is focused out
+ // $('.js_question-wrapper').focusout(
+ // function(){
+ // console.debug("[survey] Focus lost on question " + $(this).attr("id"));
+ // });
+
+ // Launch prefilling
+ prefill();
+
+ console.debug("[survey] Custom JS for survey loaded!");
+});
diff --git a/addons/survey/static/src/js/survey_result.js b/addons/survey/static/src/js/survey_result.js
new file mode 100644
index 00000000000..7c9b935582a
--- /dev/null
+++ b/addons/survey/static/src/js/survey_result.js
@@ -0,0 +1,177 @@
+/*
+ * OpenERP, Open Source Management Solution
+ * Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
+ *
+ * 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/>.
+ */
+
+$(document).ready(function () {
+ 'use strict';
+ console.debug("[survey] Survey Result JS is loading...");
+
+ //Script For Pagination
+ var survey_pagination = $('.pagination');
+ $.each(survey_pagination, function(index, pagination){
+ var question_id = $(pagination).attr("data-question_id");
+ var limit = $(pagination).attr("data-record_limit"); //Number of Record Par Page. If you want to change number of record per page, change record_limit in pagination template.
+ $('#table_question_'+ question_id +' tbody tr:lt('+limit+')').removeClass('hidden');
+ $('#pagination_'+question_id+' li:first').addClass('active');
+ $('#pagination_'+question_id+' li a').click(function(event){
+ event.preventDefault();
+ $('#pagination_'+question_id+' li').removeClass('active');
+ $(this).parent('li').addClass('active');
+ $('#table_question_'+ question_id +' tbody tr').addClass('hidden');
+ var num = $(this).text();
+ var min = (limit * (num-1))-1;
+ if (min == -1){
+ $('#table_question_'+ question_id +' tbody tr:lt('+ limit * num +')').removeClass('hidden');
+ }
+ else{
+ $('#table_question_'+question_id+' tbody tr:lt('+ limit * num +'):gt('+min+')').removeClass('hidden');
+ }
+ });
+ });
+
+ //initialize MultiBar Chart
+ function init_multibar_chart(){
+ var chart = nv.models.multiBarChart()
+ .x(function(d) { return d.text; })
+ .y(function(d) { return d.count; })
+ .staggerLabels(true);
+
+ // Replacing Library's Default Tooltip with our Custom One
+ chart.tooltip(function(key, x, y, e, graph) {
+ return '<h5 class="panel-primary"><div class="panel-heading">' + x + '</div></h5>' +
+ '<p>' + '<b>Responses : </b>' + key + '</p>' +
+ '<p>' + "<b>Total Vote : </b>" + y + '</p>';
+ });
+ return chart;
+ }
+
+ //initialize discreteBar Chart
+ function init_bar_chart(){
+ return nv.models.discreteBarChart()
+ .x(function(d) { return d.text; })
+ .y(function(d) { return d.count; })
+ .staggerLabels(true)
+ .tooltips(false)
+ .showValues(true);
+ }
+
+ //initialize Pie Chart
+ function init_pie_chart(){
+ return nv.models.pieChart()
+ .x(function(d) { return d.text; })
+ .y(function(d) { return d.count; })
+ .showLabels(false);
+ }
+
+ //load chart to svg element chart:initialized chart, response:AJAX response, quistion_id:if of survey question, tick_limit:text length limit
+ function load_chart(chart, response, question_id, tick_limit, graph_type){
+ // Custom Tick fuction for replacing long text with '...'
+ var customtick_function = function(d){
+ if(! this || d.length <= tick_limit){
+ return d;
+ }
+ else{
+ return d.slice(0,tick_limit) + '...';
+ }
+ };
+ if (graph_type != 'pie'){
+ chart.xAxis
+ .tickFormat(customtick_function);
+ chart.yAxis
+ .tickFormat(d3.format('d'));
+ }
+ d3.select('#graph_question_' + question_id + ' svg')
+ .datum(response)
+ .transition().duration(500).call(chart);
+ nv.utils.windowResize(chart.update);
+ return chart;
+ }
+ //Script For Graph
+ var survey_graphs = $('.survey_graph');
+ $.each(survey_graphs, function(index, graph){
+ var question_id = $(graph).attr("data-question_id");
+ var graph_type = $(graph).attr("data-graph_type");
+ var graph_data = JSON.parse($(graph).attr("graph-data"));
+ if(graph_type == 'multi_bar'){
+ nv.addGraph(function(){
+ var chart = init_multibar_chart();
+ return load_chart(chart, graph_data, question_id, 25);
+ });
+ }
+ else if(graph_type == 'bar'){
+ nv.addGraph(function() {
+ var chart = init_bar_chart();
+ return load_chart(chart, graph_data, question_id, 35);
+ });
+ }
+ else if(graph_type == 'pie'){
+ nv.addGraph(function() {
+ var chart = init_pie_chart();
+ return load_chart(chart, graph_data, question_id, 25, 'pie');
+ });
+ }
+ });
+
+ // Script for filter
+ $('td.survey_answer').hover(function(){
+ $(this).find('i.fa-filter').removeClass('invisible');
+ }, function(){
+ $(this).find('i.fa-filter').addClass('invisible');
+ });
+ $('td.survey_answer i.fa-filter').click(function(){
+ var cell = $(this);
+ var row_id = cell.attr('data-row_id') | 0;
+ var answer_id = cell.attr('data-answer_id');
+ if(document.URL.indexOf("?") == -1){
+ window.location.href = document.URL + '?' + encodeURI(row_id + ',' + answer_id);
+ }
+ else {
+ window.location.href = document.URL + '&' + encodeURI(row_id + ',' + answer_id);
+ }
+ });
+
+ // for clear all filters
+ $('.clear_survey_filter').click(function(){
+ window.location.href = document.URL.substring(0,document.URL.indexOf("?"));
+ });
+ $('span.filter-all').click(function(){
+ event.preventDefault();
+ if(document.URL.indexOf("finished") != -1){
+ window.location.href = document.URL.replace('?finished&','?').replace('&finished&','&').replace('?finished','').replace('&finished','');
+ }
+ }).hover(function(){
+ if(document.URL.indexOf("finished") == -1){
+ $(this)[0].style.cursor = 'default';
+ }
+ });
+ // toggle finished/all surveys filter
+ $('span.filter-finished').click(function(){
+ event.preventDefault();
+ if(document.URL.indexOf("?") == -1){
+ window.location.href = document.URL + '?' + encodeURI('finished');
+ }
+ else if(document.URL.indexOf("finished") == -1){
+ window.location.href = document.URL + '&' + encodeURI('finished');
+ }
+ }).hover(function(){
+ if(document.URL.indexOf("finished") != -1){
+ $(this)[0].style.cursor = 'default';
+ }
+ });
+
+ console.debug("[survey] Survey Result JS loaded!");
+}); \ No newline at end of file
diff --git a/addons/survey/survey.py b/addons/survey/survey.py
index 37a0c6ed773..eaf7a898df5 100644
--- a/addons/survey/survey.py
+++ b/addons/survey/survey.py
@@ -4,7 +4,7 @@
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
-# This program is free software: you can redistribute it and/or modify
+# 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.
@@ -19,760 +19,1204 @@
#
##############################################################################
-import copy
-from datetime import datetime
-from dateutil.relativedelta import relativedelta
-from time import strftime
-import os
-
-from openerp import tools
from openerp.osv import fields, osv
from openerp.tools.translate import _
+from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DF
+from openerp.addons.website.models.website import slug
+from urlparse import urljoin
+from itertools import product
+from collections import Counter
-class survey_type(osv.osv):
- _name = 'survey.type'
- _description = 'Survey Type'
- _columns = {
- 'name': fields.char("Name", size=128, required=1, translate=True),
- 'code': fields.char("Code", size=64),
- }
+import datetime
+import logging
+import re
+import uuid
+
+_logger = logging.getLogger(__name__)
+
+
+class survey_survey(osv.Model):
+ '''Settings for a multi-page/multi-question survey.
+ Each survey can have one or more attached pages, and each page can display
+ one or more questions.
+ '''
-class survey(osv.osv):
- _name = 'survey'
+ _name = 'survey.survey'
_description = 'Survey'
_rec_name = 'title'
+ _inherit = ['mail.thread', 'ir.needaction_mixin']
+
+ # Protected methods #
+
+ def _has_questions(self, cr, uid, ids, context=None):
+ """ Ensure that this survey has at least one page with at least one
+ question. """
+ for survey in self.browse(cr, uid, ids, context=context):
+ if not survey.page_ids or not [page.question_ids
+ for page in survey.page_ids if page.question_ids]:
+ return False
+ return True
+
+ ## Function fields ##
+
+ def _is_designed(self, cr, uid, ids, name, arg, context=None):
+ res = dict()
+ for survey in self.browse(cr, uid, ids, context=context):
+ if not survey.page_ids or not [page.question_ids
+ for page in survey.page_ids if page.question_ids]:
+ res[survey.id] = False
+ else:
+ res[survey.id] = True
+ return res
+
+ def _get_tot_sent_survey(self, cr, uid, ids, name, arg, context=None):
+ """ Returns the number of invitations sent for this survey, be they
+ (partially) completed or not """
+ res = dict((id, 0) for id in ids)
+ sur_res_obj = self.pool.get('survey.user_input')
+ for id in ids:
+ res[id] = sur_res_obj.search(cr, uid, # SUPERUSER_ID,
+ [('survey_id', '=', id), ('type', '=', 'link')],
+ context=context, count=True)
+ return res
+
+ def _get_tot_start_survey(self, cr, uid, ids, name, arg, context=None):
+ """ Returns the number of started instances of this survey, be they
+ completed or not """
+ res = dict((id, 0) for id in ids)
+ sur_res_obj = self.pool.get('survey.user_input')
+ for id in ids:
+ res[id] = sur_res_obj.search(cr, uid, # SUPERUSER_ID,
+ ['&', ('survey_id', '=', id), '|', ('state', '=', 'skip'), ('state', '=', 'done')],
+ context=context, count=True)
+ return res
+
+ def _get_tot_comp_survey(self, cr, uid, ids, name, arg, context=None):
+ """ Returns the number of completed instances of this survey """
+ res = dict((id, 0) for id in ids)
+ sur_res_obj = self.pool.get('survey.user_input')
+ for id in ids:
+ res[id] = sur_res_obj.search(cr, uid, # SUPERUSER_ID,
+ [('survey_id', '=', id), ('state', '=', 'done')],
+ context=context, count=True)
+ return res
+
+ def _get_public_url(self, cr, uid, ids, name, arg, context=None):
+ """ Computes a public URL for the survey """
+ base_url = self.pool.get('ir.config_parameter').get_param(cr, uid,
+ 'web.base.url')
+ res = {}
+ for survey in self.browse(cr, uid, ids, context=context):
+ res[survey.id] = urljoin(base_url, "survey/start/%s" % slug(survey))
+ return res
+
+ def _get_public_url_html(self, cr, uid, ids, name, arg, context=None):
+ """ Computes a public URL for the survey (html-embeddable version)"""
+ urls = self._get_public_url(cr, uid, ids, name, arg, context=context)
+ for id, url in urls.iteritems():
+ urls[id] = '<a href="%s">%s</a>' % (url, _("Click here to start survey"))
+ return urls
+
+ def _get_print_url(self, cr, uid, ids, name, arg, context=None):
+ """ Computes a printing URL for the survey """
+ base_url = self.pool.get('ir.config_parameter').get_param(cr, uid,
+ 'web.base.url')
+ res = {}
+ for survey in self.browse(cr, uid, ids, context=context):
+ res[survey.id] = urljoin(base_url, "survey/print/%s" % slug(survey))
+ return res
+
+ def _get_result_url(self, cr, uid, ids, name, arg, context=None):
+ """ Computes an URL for the survey results """
+ base_url = self.pool.get('ir.config_parameter').get_param(cr, uid,
+ 'web.base.url')
+ res = {}
+ for survey in self.browse(cr, uid, ids, context=context):
+ res[survey.id] = urljoin(base_url, "survey/results/%s" % slug(survey))
+ return res
- def default_get(self, cr, uid, fields, context=None):
- data = super(survey, self).default_get(cr, uid, fields, context)
- return data
+ # Model fields #
_columns = {
- 'id': fields.integer('ID'),
- 'title': fields.char('Survey Title', size=128, required=1),
- 'page_ids': fields.one2many('survey.page', 'survey_id', 'Page'),
- 'date_open': fields.datetime('Survey Open Date', readonly=1),
- 'date_close': fields.datetime('Survey Close Date', readonly=1),
- 'max_response_limit': fields.integer('Maximum Answer Limit',
- help="Set to one if survey is answerable only once"),
- 'response_user': fields.integer('Maximum Answer per User',
- help="Set to one if you require only one Answer per user"),
- 'state': fields.selection([('open', 'Open'), ('cancel', 'Cancelled'),('close', 'Closed') ], 'Status', readonly=True),
- 'responsible_id': fields.many2one('res.users', 'Responsible', help="User responsible for survey"),
- 'tot_start_survey': fields.integer("Total Started Survey", readonly=1),
- 'tot_comp_survey': fields.integer("Total Completed Survey", readonly=1),
- 'note': fields.text('Description', size=128),
- 'history': fields.one2many('survey.history', 'survey_id', 'History Lines', readonly=True),
- 'users': fields.many2many('res.users', 'survey_users_rel', 'sid', 'uid', 'Users'),
- 'send_response': fields.boolean('Email Notification on Answer'),
- 'type': fields.many2one('survey.type', 'Type'),
+ 'title': fields.char('Title', required=1, translate=True),
+ 'res_model': fields.char('Category'),
+ 'page_ids': fields.one2many('survey.page', 'survey_id', 'Pages'),
+ 'stage_id': fields.many2one('survey.stage', string="Stage", ondelete="set null"),
+ 'auth_required': fields.boolean('Login required',
+ help="Users with a public link will be requested to login before taking part to the survey",
+ oldname="authenticate"),
+ 'users_can_go_back': fields.boolean('Users can go back',
+ help="If checked, users can go back to previous pages."),
+ 'tot_sent_survey': fields.function(_get_tot_sent_survey,
+ string="Number of sent surveys", type="integer"),
+ 'tot_start_survey': fields.function(_get_tot_start_survey,
+ string="Number of started surveys", type="integer"),
+ 'tot_comp_survey': fields.function(_get_tot_comp_survey,
+ string="Number of completed surveys", type="integer"),
+ 'description': fields.html('Description', translate=True,
+ oldname="description", help="A long description of the purpose of the survey"),
'color': fields.integer('Color Index'),
- 'invited_user_ids': fields.many2many('res.users', 'survey_invited_user_rel', 'sid', 'uid', 'Invited User'),
+ 'user_input_ids': fields.one2many('survey.user_input', 'survey_id',
+ 'User responses', readonly=1),
+ 'designed': fields.function(_is_designed, string="Is designed?",
+ type="boolean"),
+ 'public_url': fields.function(_get_public_url,
+ string="Public link", type="char"),
+ 'public_url_html': fields.function(_get_public_url_html,
+ string="Public link (html version)", type="char"),
+ 'print_url': fields.function(_get_print_url,
+ string="Print link", type="char"),
+ 'result_url': fields.function(_get_result_url,
+ string="Results link", type="char"),
+ 'email_template_id': fields.many2one('email.template',
+ 'Email Template', ondelete='set null'),
+ 'thank_you_message': fields.html('Thank you message', translate=True,
+ help="This message will be displayed when survey is completed"),
+ 'quizz_mode': fields.boolean(string='Quizz mode')
}
+
_defaults = {
- 'state': lambda * a: "open",
- 'tot_start_survey': lambda * a: 0,
- 'tot_comp_survey': lambda * a: 0,
- 'send_response': lambda * a: 1,
- 'response_user': lambda * a:1,
- 'date_open': fields.datetime.now,
+ 'color': 0,
+ 'stage_id': lambda self, cr, uid, context: self.pool.get('survey.stage').search_read(cr, uid, fields=['id'], order='sequence asc', limit=1, context=context)[0]['id']
}
- def survey_open(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, {'state': 'open', 'date_open': strftime("%Y-%m-%d %H:%M:%S")})
- return True
+ def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
+ """ Read group customization in order to display all the stages in the
+ kanban view, even if they are empty """
+ stage_obj = self.pool.get('survey.stage')
+ order = stage_obj._order
+ access_rights_uid = access_rights_uid or uid
- def survey_close(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, {'state': 'close', 'date_close': strftime("%Y-%m-%d %H:%M:%S") })
- return True
+ if read_group_order == 'stage_id desc':
+ order = '%s desc' % order
- def survey_cancel(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, {'state': 'cancel' })
- return True
+ stage_ids = stage_obj._search(cr, uid, [], order=order, access_rights_uid=access_rights_uid, context=context)
+ result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
- def copy(self, cr, uid, ids, default=None, context=None):
- vals = {}
- current_rec = self.read(cr, uid, ids, context=context)
- title = _("%s (copy)") % (current_rec.get('title'))
- vals.update({'title':title})
- vals.update({'history':[],'tot_start_survey':0,'tot_comp_survey':0})
- return super(survey, self).copy(cr, uid, ids, vals, context=context)
+ # restore order of the search
+ result.sort(lambda x, y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
- def action_print_survey(self, cr, uid, ids, context=None):
- """
- If response is available then print this response otherwise print survey form(print template of the survey).
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Survey IDs
- @param context: A standard dictionary for contextual values
- @return : Dictionary value for print survey form.
- """
+ fold = {}
+ for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
+ fold[stage.id] = stage.fold or False
+ return result, fold
+
+ _group_by_full = {
+ 'stage_id': _read_group_stage_ids
+ }
+
+ # Public methods #
+
+ def copy_data(self, cr, uid, id, default=None, context=None):
+ vals = dict()
+ current_rec = self.read(cr, uid, id, fields=['title'], context=context)
+ title = _("%s (copy)") % (current_rec.get('title'))
+ vals['title'] = title
+ vals['user_input_ids'] = []
+ return super(survey_survey, self).copy_data(cr, uid, id, default=vals,
+ context=context)
+
+ def next_page(self, cr, uid, user_input, page_id, go_back=False, context=None):
+ '''The next page to display to the user, knowing that page_id is the id
+ of the last displayed page.
+
+ If page_id == 0, it will always return the first page of the survey.
+
+ If all the pages have been displayed and go_back == False, it will
+ return None
+
+ If go_back == True, it will return the *previous* page instead of the
+ next page.
+
+ .. note::
+ It is assumed here that a careful user will not try to set go_back
+ to True if she knows that the page to display is the first one!
+ (doing this will probably cause a giant worm to eat her house)'''
+ survey = user_input.survey_id
+ pages = list(enumerate(survey.page_ids))
+
+ # First page
+ if page_id == 0:
+ return (pages[0][1], 0, len(pages) == 1)
+
+ current_page_index = pages.index((filter(lambda p: p[1].id == page_id, pages))[0])
+
+ # All the pages have been displayed
+ if current_page_index == len(pages) - 1 and not go_back:
+ return (None, -1, False)
+ # Let's get back, baby!
+ elif go_back and survey.users_can_go_back:
+ return (pages[current_page_index - 1][1], current_page_index - 1, False)
+ else:
+ # This will show the last page
+ if current_page_index == len(pages) - 2:
+ return (pages[current_page_index + 1][1], current_page_index + 1, True)
+ # This will show a regular page
+ else:
+ return (pages[current_page_index + 1][1], current_page_index + 1, False)
+
+ def filter_input_ids(self, cr, uid, filters, finished=False, context=None):
+ '''If user applies any filters, then this function returns list of
+ filtered user_input_id and label's strings for display data in web.
+ :param filters: list of dictionary (having: row_id, ansewr_id)
+ :param finished: True for completely filled survey,Falser otherwise.
+ :returns list of filtered user_input_ids.
+ '''
if context is None:
context = {}
- datas = {}
- if 'response_id' in context:
- response_id = context.get('response_id', 0)
- datas['ids'] = [context.get('survey_id', 0)]
- else:
- response_id = self.pool.get('survey.response').search(cr, uid, [('survey_id','=', ids)], context=context)
- datas['ids'] = ids
- page_setting = {'orientation': 'vertical', 'without_pagebreak': 0, 'paper_size': 'letter', 'page_number': 1, 'survey_title': 1}
- report = {}
- if response_id and response_id[0]:
- context.update({'survey_id': datas['ids']})
- datas['form'] = page_setting
- datas['model'] = 'survey.print.answer'
- report = {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'survey.browse.response',
- 'datas': datas,
- 'context' : context,
- 'nodestroy':True,
- }
+ if filters:
+ input_line_obj = self.pool.get('survey.user_input_line')
+ domain_filter, choice, filter_display_data = [], [], []
+ for filter in filters:
+ row_id, answer_id = filter['row_id'], filter['answer_id']
+ if row_id == 0:
+ choice.append(answer_id)
+ else:
+ domain_filter.extend(['|', ('value_suggested_row.id', '=', row_id), ('value_suggested.id', '=', answer_id)])
+ if choice:
+ domain_filter.insert(0, ('value_suggested.id', 'in', choice))
+ else:
+ domain_filter = domain_filter[1:]
+ line_ids = input_line_obj.search(cr, uid, domain_filter, context=context)
+ filtered_input_ids = [input.user_input_id.id for input in input_line_obj.browse(cr, uid, line_ids, context=context)]
else:
+ filtered_input_ids, filter_display_data = [], []
+ if finished:
+ user_input = self.pool.get('survey.user_input')
+ if not filtered_input_ids:
+ current_filters = user_input.search(cr, uid, [], context=context)
+ user_input_objs = user_input.browse(cr, uid, current_filters, context=context)
+ else:
+ user_input_objs = user_input.browse(cr, uid, filtered_input_ids, context=context)
+ return [input.id for input in user_input_objs if input.state == 'done']
+ return filtered_input_ids
+
+ def get_filter_display_data(self, cr, uid, filters, context):
+ '''Returns data to display current filters
+ :param filters: list of dictionary (having: row_id, answer_id)
+ :param finished: True for completely filled survey, False otherwise.
+ :returns list of dict having data to display filters.
+ '''
+ filter_display_data = []
+ if filters:
+ question_obj = self.pool.get('survey.question')
+ label_obj = self.pool.get('survey.label')
+ for filter in filters:
+ row_id, answer_id = filter['row_id'], filter['answer_id']
+ question_id = label_obj.browse(cr, uid, answer_id, context=context).question_id.id
+ question = question_obj.browse(cr, uid, question_id, context=context)
+ if row_id == 0:
+ labels = label_obj.browse(cr, uid, [answer_id], context=context)
+ else:
+ labels = label_obj.browse(cr, uid, [row_id, answer_id], context=context)
+ filter_display_data.append({'question_text': question.question, 'labels': [label.value for label in labels]})
+ return filter_display_data
+
+ def prepare_result(self, cr, uid, question, current_filters=[], context=None):
+ ''' Compute statistical data for questions by counting number of vote per choice on basis of filter '''
+ if context is None:
+ context = {}
+ #Calculate and return statistics for choice
+ if question.type in ['simple_choice', 'multiple_choice']:
+ result_summary = {}
+ [result_summary.update({label.id: {'text': label.value, 'count': 0, 'answer_id': label.id}}) for label in question.labels_ids]
+ for input_line in question.user_input_line_ids:
+ if input_line.answer_type == 'suggestion' and result_summary.get(input_line.value_suggested.id) and (not(current_filters) or input_line.user_input_id.id in current_filters):
+ result_summary[input_line.value_suggested.id]['count'] += 1
+ result_summary = result_summary.values()
+
+ #Calculate and return statistics for matrix
+ if question.type == 'matrix':
+ rows, answers, res = {}, {}, {}
+ [rows.update({label.id: label.value}) for label in question.labels_ids_2]
+ [answers.update({label.id: label.value}) for label in question.labels_ids]
+ for cell in product(rows.keys(), answers.keys()):
+ res[cell] = 0
+ for input_line in question.user_input_line_ids:
+ if input_line.answer_type == 'suggestion' and not(current_filters) or input_line.user_input_id.id in current_filters:
+ res[(input_line.value_suggested_row.id, input_line.value_suggested.id)] += 1
+ result_summary = {'answers': answers, 'rows': rows, 'result': res}
+
+ #Calculate and return statistics for free_text, textbox, datetime
+ if question.type in ['free_text', 'textbox', 'datetime']:
+ result_summary = []
+ for input_line in question.user_input_line_ids:
+ if not(current_filters) or input_line.user_input_id.id in current_filters:
+ result_summary.append(input_line)
+
+ #Calculate and return statistics for numerical_box
+ if question.type == 'numerical_box':
+ result_summary = {'input_lines': []}
+ all_inputs = []
+ for input_line in question.user_input_line_ids:
+ if not(current_filters) or input_line.user_input_id.id in current_filters:
+ all_inputs.append(input_line.value_number)
+ result_summary['input_lines'].append(input_line)
+ if all_inputs:
+ result_summary.update({'average': round(sum(all_inputs) / len(all_inputs), 2),
+ 'max': round(max(all_inputs), 2),
+ 'min': round(min(all_inputs), 2),
+ 'most_comman': Counter(all_inputs).most_common(5)})
+ return result_summary
+
+ def get_input_summary(self, cr, uid, question, current_filters=[], context=None):
+ ''' Returns overall summary of question e.g. answered, skipped, total_inputs on basis of filter '''
+ if context is None:
+ context = {}
+ result = {}
+ if question.survey_id.user_input_ids:
+ total_input_ids = current_filters or [input_id.id for input_id in question.survey_id.user_input_ids if input_id.state != 'new']
+ result['total_inputs'] = len(total_input_ids)
+ question_input_ids = []
+ for user_input in question.user_input_line_ids:
+ if not user_input.skipped:
+ question_input_ids.append(user_input.user_input_id.id)
+ result['answered'] = len(set(question_input_ids) & set(total_input_ids))
+ result['skipped'] = result['total_inputs'] - result['answered']
+ return result
+
+ # Actions
+
+ def action_start_survey(self, cr, uid, ids, context=None):
+ ''' Open the website page with the survey form '''
+ trail = ""
+ if context and 'survey_token' in context:
+ trail = "/" + context['survey_token']
+ return {
+ 'type': 'ir.actions.act_url',
+ 'name': "Start Survey",
+ 'target': 'self',
+ 'url': self.read(cr, uid, ids, ['public_url'], context=context)[0]['public_url'] + trail
+ }
- datas['form'] = page_setting
- datas['model'] = 'survey.print'
- report = {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'survey.form',
- 'datas': datas,
- 'context' : context,
- 'nodestroy':True,
- }
- return report
-
- def fill_survey(self, cr, uid, ids, context=None):
- sur_obj = self.read(cr, uid, ids,['title', 'page_ids'], context=context)
- for sur in sur_obj:
- name = sur['title']
- pages = sur['page_ids']
- if not pages:
- raise osv.except_osv(_('Warning!'), _('This survey has no question defined. Please define the questions and answers first.'))
- context.update({'active':False,'survey_id': ids[0]})
+ def action_send_survey(self, cr, uid, ids, context=None):
+ ''' Open a window to compose an email, pre-filled with the survey
+ message '''
+ if not self._has_questions(cr, uid, ids, context=None):
+ raise osv.except_osv(_('Error!'), _('You cannot send an invitation for a survey that has no questions.'))
+
+ survey_browse = self.pool.get('survey.survey').browse(cr, uid, ids,
+ context=context)[0]
+ if survey_browse.stage_id.closed:
+ raise osv.except_osv(_('Warning!'),
+ _("You cannot send invitations for closed surveys."))
+
+ assert len(ids) == 1, 'This option should only be used for a single \
+ survey at a time.'
+ ir_model_data = self.pool.get('ir.model.data')
+ templates = ir_model_data.get_object_reference(cr, uid,
+ 'survey', 'email_template_survey')
+ template_id = templates[1] if len(templates) > 0 else False
+ ctx = dict(context)
+
+ ctx.update({'default_model': 'survey.survey',
+ 'default_res_id': ids[0],
+ 'default_survey_id': ids[0],
+ 'default_use_template': bool(template_id),
+ 'default_template_id': template_id,
+ 'default_composition_mode': 'comment'}
+ )
return {
+ 'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
+ 'res_model': 'survey.mail.compose.message',
'target': 'new',
- 'name': name,
- 'context': context
+ 'context': ctx,
}
- def test_survey(self, cr, uid, ids, context=None):
- sur_obj = self.read(cr, uid, ids,['title','page_ids'], context=context)
- for sur in sur_obj:
- name = sur['title']
- pages = sur['page_ids']
- if not pages:
- raise osv.except_osv(_('Warning!'), _('This survey has no pages defined. Please define pages first.'))
- context.update({'active':False,'survey_id': ids[0]})
+
+ def action_print_survey(self, cr, uid, ids, context=None):
+ ''' Open the website page with the survey printable view '''
+ trail = ""
+ if context and 'survey_token' in context:
+ trail = "/" + context['survey_token']
return {
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'name': name,
- 'context': context
+ 'type': 'ir.actions.act_url',
+ 'name': "Print Survey",
+ 'target': 'self',
+ 'url': self.read(cr, uid, ids, ['print_url'], context=context)[0]['print_url'] + trail
}
- def edit_survey(self, cr, uid, ids, context=None):
- sur_obj = self.read(cr, uid, ids,['title','page_ids'], context=context)
- for sur in sur_obj:
- name = sur['title']
- pages = sur['page_ids']
- if not pages:
- raise osv.except_osv(_('Warning!'), _('This survey has no question defined. Please define the questions and answers first.'))
- context.update({'survey_id': ids[0]})
+ def action_result_survey(self, cr, uid, ids, context=None):
+ ''' Open the website page with the survey results view '''
return {
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'name': name,
- 'context': context
+ 'type': 'ir.actions.act_url',
+ 'name': "Results of the Survey",
+ 'target': 'self',
+ 'url': self.read(cr, uid, ids, ['result_url'], context=context)[0]['result_url']
}
+ def action_test_survey(self, cr, uid, ids, context=None):
+ ''' Open the website page with the survey form into test mode'''
+ return {
+ 'type': 'ir.actions.act_url',
+ 'name': "Results of the Survey",
+ 'target': 'self',
+ 'url': self.read(cr, uid, ids, ['public_url'], context=context)[0]['public_url'] + "/phantom"
+ }
+
+
+class survey_stage(osv.Model):
+ """Stages for Kanban view of surveys"""
+
+ _name = 'survey.stage'
+ _description = 'Survey Stage'
+ _order = 'sequence asc'
-class survey_history(osv.osv):
- _name = 'survey.history'
- _description = 'Survey History'
- _rec_name = 'date'
_columns = {
- 'survey_id': fields.many2one('survey', 'Survey'),
- 'user_id': fields.many2one('res.users', 'User', readonly=True),
- 'date': fields.datetime('Date started', readonly=1),
+ 'name': fields.char(string="Name", required=True, translate=True),
+ 'sequence': fields.integer(string="Sequence"),
+ 'closed': fields.boolean(string="Closed", help="If closed, people won't be able to answer to surveys in this column."),
+ 'fold': fields.boolean(string="Folded in kanban view")
}
_defaults = {
- 'date': lambda * a: datetime.datetime.now()
+ 'sequence': 1,
+ 'closed': False
}
+ _sql_constraints = [
+ ('positive_sequence', 'CHECK(sequence >= 0)', 'Sequence number MUST be a natural')
+ ]
+
+
+class survey_page(osv.Model):
+ '''A page for a survey.
+
+ Pages are essentially containers, allowing to group questions by ordered
+ screens.
+
+ .. note::
+ A page should be deleted if the survey it belongs to is deleted. '''
-class survey_page(osv.osv):
_name = 'survey.page'
- _description = 'Survey Pages'
+ _description = 'Survey Page'
_rec_name = 'title'
_order = 'sequence'
+
+ # Model Fields #
+
_columns = {
- 'title': fields.char('Page Title', size=128, required=1),
- 'survey_id': fields.many2one('survey', 'Survey', ondelete='cascade'),
- 'question_ids': fields.one2many('survey.question', 'page_id', 'Questions'),
- 'sequence': fields.integer('Page Nr'),
- 'note': fields.text('Description'),
+ 'title': fields.char('Page Title', required=1,
+ translate=True),
+ 'survey_id': fields.many2one('survey.survey', 'Survey',
+ ondelete='cascade', required=True),
+ 'question_ids': fields.one2many('survey.question', 'page_id',
+ 'Questions'),
+ 'sequence': fields.integer('Page number'),
+ 'description': fields.html('Description',
+ help="An introductory text to your page", translate=True,
+ oldname="note"),
}
_defaults = {
- 'sequence': lambda * a: 1
+ 'sequence': 10
}
- def default_get(self, cr, uid, fields, context=None):
- if context is None:
- context = {}
- data = super(survey_page, self).default_get(cr, uid, fields, context)
- if context.has_key('survey_id'):
- data['survey_id'] = context.get('survey_id', False)
- return data
+ # Public methods #
- def survey_save(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
- search_obj = self.pool.get('ir.ui.view')
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
- surv_name_wiz = self.pool.get('survey.name.wiz')
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'transfer':True, 'page_no' : context.get('page_number',0) })
- return {
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
- def copy(self, cr, uid, ids, default=None, context=None):
+ def copy_data(self, cr, uid, ids, default=None, context=None):
vals = {}
- current_rec = self.read(cr, uid, ids, context=context)
+ current_rec = self.read(cr, uid, ids, fields=['title'], context=context)
title = _("%s (copy)") % (current_rec.get('title'))
- vals.update({'title':title})
- return super(survey_page, self).copy(cr, uid, ids, vals, context=context)
+ vals.update({'title': title})
+ return super(survey_page, self).copy_data(cr, uid, ids, default=vals,
+ context=context)
+
+class survey_question(osv.Model):
+ ''' Questions that will be asked in a survey.
-class survey_question(osv.osv):
+ Each question can have one of more suggested answers (eg. in case of
+ dropdown choices, multi-answer checkboxes, radio buttons...).'''
_name = 'survey.question'
_description = 'Survey Question'
_rec_name = 'question'
_order = 'sequence'
- def _calc_response(self, cr, uid, ids, field_name, arg, context=None):
- if len(ids) == 0:
- return {}
- val = {}
- cr.execute("select question_id, count(id) as Total_response from \
- survey_response_line where state='done' and question_id IN %s\
- group by question_id" ,(tuple(ids),))
- ids1 = copy.deepcopy(ids)
- for rec in cr.fetchall():
- ids1.remove(rec[0])
- val[rec[0]] = int(rec[1])
- for id in ids1:
- val[id] = 0
- return val
+ # Model fields #
_columns = {
- 'page_id': fields.many2one('survey.page', 'Survey Page', ondelete='cascade', required=1),
- 'question': fields.char('Question', size=128, required=1),
- 'answer_choice_ids': fields.one2many('survey.answer', 'question_id', 'Answer'),
- 'is_require_answer': fields.boolean('Require Answer to Question'),
- 'required_type': fields.selection([('all','All'), ('at least','At Least'), ('at most','At Most'), ('exactly','Exactly'), ('a range','A Range')], 'Respondent must answer'),
- 'req_ans': fields.integer('#Required Answer'),
- 'maximum_req_ans': fields.integer('Maximum Required Answer'),
- 'minimum_req_ans': fields.integer('Minimum Required Answer'),
- 'req_error_msg': fields.text('Error Message'),
- 'allow_comment': fields.boolean('Allow Comment Field'),
- 'sequence': fields.integer('Sequence'),
- 'tot_resp': fields.function(_calc_response, string="Total Answer"),
- 'survey': fields.related('page_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
- 'descriptive_text': fields.text('Descriptive Text', size=255),
- 'column_heading_ids': fields.one2many('survey.question.column.heading', 'question_id',' Column heading'),
- 'type': fields.selection([('multiple_choice_only_one_ans','Multiple Choice (Only One Answer)'),
- ('multiple_choice_multiple_ans','Multiple Choice (Multiple Answer)'),
- ('matrix_of_choices_only_one_ans','Matrix of Choices (Only One Answers Per Row)'),
- ('matrix_of_choices_only_multi_ans','Matrix of Choices (Multiple Answers Per Row)'),
- ('matrix_of_drop_down_menus','Matrix of Drop-down Menus'),
- ('rating_scale','Rating Scale'),('single_textbox','Single Textbox'),
- ('multiple_textboxes','Multiple Textboxes'),
- ('multiple_textboxes_diff_type','Multiple Textboxes With Different Type'),
- ('comment','Comment/Essay Box'),
- ('numerical_textboxes','Numerical Textboxes'),('date','Date'),
- ('date_and_time','Date and Time'),('descriptive_text','Descriptive Text'),
- ('table','Table'),
- ], 'Question Type', required=1,),
- 'is_comment_require': fields.boolean('Add Comment Field'),
- 'comment_label': fields.char('Field Label', size = 255),
- 'comment_field_type': fields.selection([('char', 'Single Line Of Text'), ('text', 'Paragraph of Text')], 'Comment Field Type'),
- 'comment_valid_type': fields.selection([('do_not_validate', '''Don't Validate Comment Text.'''),
- ('must_be_specific_length', 'Must Be Specific Length'),
- ('must_be_whole_number', 'Must Be A Whole Number'),
- ('must_be_decimal_number', 'Must Be A Decimal Number'),
- ('must_be_date', 'Must Be A Date'),
- ('must_be_email_address', 'Must Be An Email Address'),
- ], 'Text Validation'),
- 'comment_minimum_no': fields.integer('Minimum number'),
- 'comment_maximum_no': fields.integer('Maximum number'),
- 'comment_minimum_float': fields.float('Minimum decimal number'),
- 'comment_maximum_float': fields.float('Maximum decimal number'),
- 'comment_minimum_date': fields.date('Minimum date'),
- 'comment_maximum_date': fields.date('Maximum date'),
- 'comment_valid_err_msg': fields.text('Error message'),
- 'make_comment_field': fields.boolean('Make Comment Field an Answer Choice'),
- 'make_comment_field_err_msg': fields.text('Error message'),
- 'is_validation_require': fields.boolean('Validate Text'),
- 'validation_type': fields.selection([('do_not_validate', '''Don't Validate Comment Text.'''),\
- ('must_be_specific_length', 'Must Be Specific Length'),\
- ('must_be_whole_number', 'Must Be A Whole Number'),\
- ('must_be_decimal_number', 'Must Be A Decimal Number'),\
- ('must_be_date', 'Must Be A Date'),\
- ('must_be_email_address', 'Must Be An Email Address')\
- ], 'Text Validation'),
- 'validation_minimum_no': fields.integer('Minimum number'),
- 'validation_maximum_no': fields.integer('Maximum number'),
- 'validation_minimum_float': fields.float('Minimum decimal number'),
- 'validation_maximum_float': fields.float('Maximum decimal number'),
- 'validation_minimum_date': fields.date('Minimum date'),
- 'validation_maximum_date': fields.date('Maximum date'),
- 'validation_valid_err_msg': fields.text('Error message'),
- 'numeric_required_sum': fields.integer('Sum of all choices'),
- 'numeric_required_sum_err_msg': fields.text('Error message'),
- 'rating_allow_one_column_require': fields.boolean('Allow Only One Answer per Column (Forced Ranking)'),
- 'in_visible_rating_weight': fields.boolean('Is Rating Scale Invisible?'),
- 'in_visible_menu_choice': fields.boolean('Is Menu Choice Invisible?'),
- 'in_visible_answer_type': fields.boolean('Is Answer Type Invisible?'),
- 'comment_column': fields.boolean('Add comment column in matrix'),
- 'column_name': fields.char('Column Name',size=256),
- 'no_of_rows': fields.integer('No of Rows'),
+ # Question metadata
+ 'page_id': fields.many2one('survey.page', 'Survey page',
+ ondelete='cascade', required=1),
+ 'survey_id': fields.related('page_id', 'survey_id', type='many2one',
+ relation='survey.survey', string='Survey'),
+ 'sequence': fields.integer(string='Sequence'),
+
+ # Question
+ 'question': fields.char('Question Name', required=1, translate=True),
+ 'description': fields.html('Description', help="Use this field to add \
+ additional explanations about your question", translate=True,
+ oldname='descriptive_text'),
+
+ # Answer
+ 'type': fields.selection([('free_text', 'Long Text Zone'),
+ ('textbox', 'Text Input'),
+ ('numerical_box', 'Numerical Value'),
+ ('datetime', 'Date and Time'),
+ ('simple_choice', 'Multiple choice: only one answer'),
+ ('multiple_choice', 'Multiple choice: multiple answers allowed'),
+ ('matrix', 'Matrix')], 'Type of Question', required=1),
+ 'matrix_subtype': fields.selection([('simple', 'One choice per row'),
+ ('multiple', 'Multiple choices per row')], 'Matrix Type'),
+ 'labels_ids': fields.one2many('survey.label',
+ 'question_id', 'Types of answers', oldname='answer_choice_ids'),
+ 'labels_ids_2': fields.one2many('survey.label',
+ 'question_id_2', 'Rows of the Matrix'),
+ # labels are used for proposed choices
+ # if question.type == simple choice | multiple choice
+ # -> only labels_ids is used
+ # if question.type == matrix
+ # -> labels_ids are the columns of the matrix
+ # -> labels_ids_2 are the rows of the matrix
+
+ # Display options
+ 'column_nb': fields.selection([('12', '1'),
+ ('6', '2'),
+ ('4', '3'),
+ ('3', '4'),
+ ('2', '6')],
+ 'Number of columns'),
+ # These options refer to col-xx-[12|6|4|3|2] classes in Bootstrap
+ 'display_mode': fields.selection([('columns', 'Radio Buttons/Checkboxes'),
+ ('dropdown', 'Selection Box')],
+ 'Display mode'),
+
+ # Comments
+ 'comments_allowed': fields.boolean('Show Comments Field',
+ oldname="allow_comment"),
+ 'comments_message': fields.char('Comment Message', translate=True),
+ 'comment_count_as_answer': fields.boolean('Comment Field is an Answer Choice',
+ oldname='make_comment_field'),
+
+ # Validation
+ 'validation_required': fields.boolean('Validate entry',
+ oldname='is_validation_require'),
+ 'validation_email': fields.boolean('Input must be an email'),
+ 'validation_length_min': fields.integer('Minimum Text Length'),
+ 'validation_length_max': fields.integer('Maximum Text Length'),
+ 'validation_min_float_value': fields.float('Minimum value'),
+ 'validation_max_float_value': fields.float('Maximum value'),
+ 'validation_min_date': fields.datetime('Minimum Date'),
+ 'validation_max_date': fields.datetime('Maximum Date'),
+ 'validation_error_msg': fields.char('Error message',
+ oldname='validation_valid_err_msg',
+ translate=True),
+
+ # Constraints on number of answers (matrices)
+ 'constr_mandatory': fields.boolean('Mandatory Answer',
+ oldname="is_require_answer"),
+ 'constr_error_msg': fields.char("Error message",
+ oldname='req_error_msg', translate=True),
+ 'user_input_line_ids': fields.one2many('survey.user_input_line',
+ 'question_id', 'Answers',
+ domain=[('skipped', '=', False)]),
}
+
_defaults = {
- 'sequence': lambda * a: 1,
- 'type': lambda * a: 'multiple_choice_multiple_ans',
- 'req_error_msg': lambda * a: 'This question requires an answer.',
- 'required_type': lambda * a: 'at least',
- 'req_ans': lambda * a: 1,
- 'comment_field_type': lambda * a: 'char',
- 'comment_label': lambda * a: 'Other (please specify)',
- 'comment_valid_type': lambda * a: 'do_not_validate',
- 'comment_valid_err_msg': lambda * a : 'The comment you entered is in an invalid format.',
- 'validation_type': lambda * a: 'do_not_validate',
- 'validation_valid_err_msg': lambda * a : 'The comment you entered is in an invalid format.',
- 'numeric_required_sum_err_msg': lambda * a :'The choices need to add up to [enter sum here].',
- 'make_comment_field_err_msg': lambda * a : 'Please enter a comment.',
- 'in_visible_answer_type': lambda * a: 1
+ 'page_id': lambda self, cr, uid, context: context.get('page_id'),
+ 'sequence': 10,
+ 'type': 'free_text',
+ 'matrix_subtype': 'simple',
+ 'column_nb': '12',
+ 'display_mode': 'columns',
+ 'constr_error_msg': lambda s, cr, uid, c: _('This question requires an answer.'),
+ 'validation_error_msg': lambda s, cr, uid, c: _('The answer you entered has an invalid format.'),
+ 'validation_required': False,
+ 'comments_message': lambda s, cr, uid, c: _('If other, precise:'),
}
- def on_change_type(self, cr, uid, ids, type, context=None):
- val = {}
- val['is_require_answer'] = False
- val['is_comment_require'] = False
- val['is_validation_require'] = False
- val['comment_column'] = False
-
- if type in ['multiple_textboxes_diff_type']:
- val['in_visible_answer_type'] = False
- return {'value': val}
-
- if type in ['rating_scale']:
- val.update({'in_visible_rating_weight':False, 'in_visible_menu_choice':True})
- return {'value': val}
+ _sql_constraints = [
+ ('positive_len_min', 'CHECK (validation_length_min >= 0)', 'A length must be positive!'),
+ ('positive_len_max', 'CHECK (validation_length_max >= 0)', 'A length must be positive!'),
+ ('validation_length', 'CHECK (validation_length_min <= validation_length_max)', 'Max length cannot be smaller than min length!'),
+ ('validation_float', 'CHECK (validation_min_float_value <= validation_max_float_value)', 'Max value cannot be smaller than min value!'),
+ ('validation_date', 'CHECK (validation_min_date <= validation_max_date)', 'Max date cannot be smaller than min date!')
+ ]
+
+ def copy_data(self, cr, uid, ids, default=None, context=None):
+ # This will prevent duplication of user input lines in case of question duplication
+ # (in cascade, this will also allow to duplicate surveys without duplicating bad user input
+ # lines)
+ vals = {'user_input_line_ids': []}
+
+ # Updating question title
+ current_rec = self.read(cr, uid, ids, context=context)
+ question = _("%s (copy)") % (current_rec.get('question'))
+ vals['question'] = question
- elif type in ['matrix_of_drop_down_menus']:
- val.update({'in_visible_rating_weight':True, 'in_visible_menu_choice':False})
- return {'value': val}
+ return super(survey_question, self).copy_data(cr, uid, ids, default=vals,
+ context=context)
- elif type in ['single_textbox']:
- val.update({'in_visible_rating_weight':True, 'in_visible_menu_choice':True})
- return {'value': val}
+ # Validation methods
+ def validate_question(self, cr, uid, question, post, answer_tag, context=None):
+ ''' Validate question, depending on question type and parameters '''
+ try:
+ checker = getattr(self, 'validate_' + question.type)
+ except AttributeError:
+ _logger.warning(question.type + ": This type of question has no validation method")
+ return {}
else:
- val.update({'in_visible_rating_weight':True, 'in_visible_menu_choice':True,\
- 'in_visible_answer_type':True})
- return {'value': val}
-
- def write(self, cr, uid, ids, vals, context=None):
- questions = self.read(cr,uid, ids, ['answer_choice_ids', 'type', 'required_type',\
- 'req_ans', 'minimum_req_ans', 'maximum_req_ans', 'column_heading_ids', 'page_id', 'question'])
- for question in questions:
- col_len = len(question['column_heading_ids'])
- if vals.has_key('column_heading_ids'):
- for col in vals['column_heading_ids']:
- if type(col[2]) == type({}):
- col_len += 1
- else:
- col_len -= 1
-
- if vals.has_key('type'):
- que_type = vals['type']
+ return checker(cr, uid, question, post, answer_tag, context=context)
+
+ def validate_free_text(self, cr, uid, question, post, answer_tag, context=None):
+ errors = {}
+ answer = post[answer_tag].strip()
+ # Empty answer to mandatory question
+ if question.constr_mandatory and not answer:
+ errors.update({answer_tag: question.constr_error_msg})
+ return errors
+
+ def validate_textbox(self, cr, uid, question, post, answer_tag, context=None):
+ errors = {}
+ answer = post[answer_tag].strip()
+ # Empty answer to mandatory question
+ if question.constr_mandatory and not answer:
+ errors.update({answer_tag: question.constr_error_msg})
+ # Email format validation
+ # Note: this validation is very basic:
+ # all the strings of the form
+ # <something>@<anything>.<extension>
+ # will be accepted
+ if answer and question.validation_email:
+ if not re.match(r"[^@]+@[^@]+\.[^@]+", answer):
+ errors.update({answer_tag: _('This answer must be an email address')})
+ # Answer validation (if properly defined)
+ # Length of the answer must be in a range
+ if answer and question.validation_required:
+ if not (question.validation_length_min <= len(answer) <= question.validation_length_max):
+ errors.update({answer_tag: question.validation_error_msg})
+ return errors
+
+ def validate_numerical_box(self, cr, uid, question, post, answer_tag, context=None):
+ errors = {}
+ answer = post[answer_tag].strip()
+ # Empty answer to mandatory question
+ if question.constr_mandatory and not answer:
+ errors.update({answer_tag: question.constr_error_msg})
+ # Checks if user input is a number
+ if answer:
+ try:
+ floatanswer = float(answer)
+ except ValueError:
+ errors.update({answer_tag: _('This is not a number')})
+ # Answer validation (if properly defined)
+ if answer and question.validation_required:
+ # Answer is not in the right range
+ try:
+ floatanswer = float(answer) # check that it is a float has been done hereunder
+ if not (question.validation_min_float_value <= floatanswer <= question.validation_max_float_value):
+ errors.update({answer_tag: question.validation_error_msg})
+ except ValueError:
+ pass
+ return errors
+
+ def validate_datetime(self, cr, uid, question, post, answer_tag, context=None):
+ errors = {}
+ answer = post[answer_tag].strip()
+ # Empty answer to mandatory question
+ if question.constr_mandatory and not answer:
+ errors.update({answer_tag: question.constr_error_msg})
+ # Checks if user input is a datetime
+ if answer:
+ try:
+ dateanswer = datetime.datetime.strptime(answer, DF)
+ except ValueError:
+ errors.update({answer_tag: _('This is not a date/time')})
+ return errors
+ # Answer validation (if properly defined)
+ if answer and question.validation_required:
+ # Answer is not in the right range
+ try:
+ dateanswer = datetime.datetime.strptime(answer, DF)
+ if not (datetime.datetime.strptime(question.validation_min_date, DF) <= dateanswer <= datetime.datetime.strptime(question.validation_max_date, DF)):
+ errors.update({answer_tag: question.validation_error_msg})
+ except ValueError: # check that it is a datetime has been done hereunder
+ pass
+ return errors
+
+ def validate_simple_choice(self, cr, uid, question, post, answer_tag, context=None):
+ errors = {}
+ if question.comments_allowed:
+ comment_tag = "%s_%s" % (answer_tag, 'comment')
+ # Empty answer to mandatory question
+ if question.constr_mandatory and not answer_tag in post:
+ errors.update({answer_tag: question.constr_error_msg})
+ if question.constr_mandatory and answer_tag in post and post[answer_tag].strip() == '':
+ errors.update({answer_tag: question.constr_error_msg})
+ # Answer is a comment and is empty
+ if question.constr_mandatory and answer_tag in post and post[answer_tag] == "-1" and question.comment_count_as_answer and comment_tag in post and not post[comment_tag].strip():
+ errors.update({answer_tag: question.constr_error_msg})
+ return errors
+
+ def validate_multiple_choice(self, cr, uid, question, post, answer_tag, context=None):
+ errors = {}
+ if question.constr_mandatory:
+ answer_candidates = dict_keys_startswith(post, answer_tag)
+ comment_flag = answer_candidates.pop(("%s_%s" % (answer_tag, -1)), None)
+ if question.comments_allowed:
+ comment_answer = answer_candidates.pop(("%s_%s" % (answer_tag, 'comment')), '').strip()
+ # There is no answer neither comments (if comments count as answer)
+ if not answer_candidates and question.comment_count_as_answer and (not comment_flag or not comment_answer):
+ errors.update({answer_tag: question.constr_error_msg})
+ # There is no answer at all
+ if not answer_candidates and not question.comment_count_as_answer:
+ errors.update({answer_tag: question.constr_error_msg})
+ return errors
+
+ def validate_matrix(self, cr, uid, question, post, answer_tag, context=None):
+ errors = {}
+ if question.constr_mandatory:
+ lines_number = len(question.labels_ids_2)
+ answer_candidates = dict_keys_startswith(post, answer_tag)
+ comment_answer = answer_candidates.pop(("%s_%s" % (answer_tag, 'comment')), '').strip()
+ # Number of lines that have been answered
+ if question.matrix_subtype == 'simple':
+ answer_number = len(answer_candidates)
+ elif question.matrix_subtype == 'multiple':
+ answer_number = len(set([sk.rsplit('_', 1)[0] for sk in answer_candidates.keys()]))
else:
- que_type = question['type']
-
- if que_type in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans',\
- 'matrix_of_drop_down_menus', 'rating_scale']:
- if not col_len:
- raise osv.except_osv(_('Warning!'),_('You must enter one or more column headings for question "%s" of page %s.') % (question['question'], question['page_id'][1]))
- ans_len = len(question['answer_choice_ids'])
-
- if vals.has_key('answer_choice_ids'):
- for ans in vals['answer_choice_ids']:
- if type(ans[2]) == type({}):
- ans_len += 1
- else:
- ans_len -= 1
-
- if que_type not in ['descriptive_text', 'single_textbox', 'comment','table']:
- if not ans_len:
- raise osv.except_osv(_('Warning!'),_('You must enter one or more Answers for question "%s" of page %s.') % (question['question'], question['page_id'][1]))
- req_type = ""
-
- if vals.has_key('required_type'):
- req_type = vals['required_type']
- else:
- req_type = question['required_type']
-
- if que_type in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans', \
- 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus',\
- 'rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time']:
- if req_type in ['at least', 'at most', 'exactly']:
- if vals.has_key('req_ans'):
- if not vals['req_ans'] or vals['req_ans'] > ans_len:
- raise osv.except_osv(_('Warning!'),_("#Required Answer you entered \
- is greater than the number of answer. \
- Please use a number that is smaller than %d.") % (ans_len + 1))
- else:
- if not question['req_ans'] or question['req_ans'] > ans_len:
- raise osv.except_osv(_('Warning!'),_("#Required Answer you entered is \
- greater than the number of answer.\
- Please use a number that is smaller than %d.") % (ans_len + 1))
-
- if req_type == 'a range':
- minimum_ans = 0
- maximum_ans = 0
- if vals.has_key('minimum_req_ans'):
- minimum_ans = vals['minimum_req_ans']
- if not vals['minimum_req_ans'] or vals['minimum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning!'),_("Minimum Required Answer\
- you entered is greater than the number of answer.\
- Please use a number that is smaller than %d.") % (ans_len + 1))
- else:
- minimum_ans = question['minimum_req_ans']
- if not question['minimum_req_ans'] or question['minimum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning!'),_("Minimum Required Answer you\
- entered is greater than the number of answer. \
- Please use a number that is smaller than %d.") % (ans_len + 1))
- if vals.has_key('maximum_req_ans'):
- maximum_ans = vals['maximum_req_ans']
- if not vals['maximum_req_ans'] or vals['maximum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you \
- entered for your maximum is greater than the number of answer.\
- Please use a number that is smaller than %d.") % (ans_len + 1))
- else:
- maximum_ans = question['maximum_req_ans']
- if not question['maximum_req_ans'] or question['maximum_req_ans'] > ans_len:
- raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you\
- entered for your maximum is greater than the number of answer.\
- Please use a number that is smaller than %d.") % (ans_len + 1))
- if maximum_ans <= minimum_ans:
- raise osv.except_osv(_('Warning!'),_("Maximum Required Answer is greater \
- than Minimum Required Answer"))
-
- if question['type'] == 'matrix_of_drop_down_menus' and vals.has_key('column_heading_ids'):
- for col in vals['column_heading_ids']:
- if not col[2] or not col[2].has_key('menu_choice') or not col[2]['menu_choice']:
- raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices\
- in column heading."))
- elif not col[2] or not col[2].has_key('menu_choice') or\
- col[2]['menu_choice'].strip() == '':
- raise osv.except_osv(_('Warning!'),_("You must enter one or more menu \
- choices in column heading (white spaces not allowed)."))
-
- return super(survey_question, self).write(cr, uid, ids, vals, context=context)
-
- def create(self, cr, uid, vals, context=None):
- minimum_ans = 0
- maximum_ans = 0
- page = self.pool.get('survey.page').browse(cr, uid, int(vals.get('page_id', 0)), context=context).title
- if vals.has_key('answer_choice_ids') and not len(vals['answer_choice_ids']):
- if vals.has_key('type') and vals['type'] not in ['descriptive_text', 'single_textbox', 'comment','table']:
- raise osv.except_osv(_('Warning!'),_('You must enter one or more answers for question "%s" of page %s .') % (vals['question'], page))
-
- if vals.has_key('column_heading_ids') and not len(vals['column_heading_ids']):
- if vals.has_key('type') and vals['type'] in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale']:
- raise osv.except_osv(_('Warning!'),_('You must enter one or more column headings for question "%s" of page %s.')% (vals['question'], page))
-
- if vals['type'] in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time']:
- if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] in ['at least', 'at most', 'exactly']:
- if vals.has_key('answer_choice_ids') and vals['req_ans'] > len(vals['answer_choice_ids']) or not vals['req_ans']:
- raise osv.except_osv(_('Warning!'),_("#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
-
- if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] == 'a range':
- minimum_ans = vals['minimum_req_ans']
- maximum_ans = vals['maximum_req_ans']
- if vals.has_key('answer_choice_ids') or vals['minimum_req_ans'] > len(vals['answer_choice_ids']) or not vals['minimum_req_ans']:
- raise osv.except_osv(_('Warning!'),_("Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
- if vals.has_key('answer_choice_ids') or vals['maximum_req_ans'] > len(vals['answer_choice_ids']) or not vals['maximum_req_ans']:
- raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
- if maximum_ans <= minimum_ans:
- raise osv.except_osv(_('Warning!'),_("Maximum Required Answer is greater than Minimum Required Answer."))
-
- if vals['type'] == 'matrix_of_drop_down_menus':
- for col in vals['column_heading_ids']:
- if not col[2] or not col[2].has_key('menu_choice') or not col[2]['menu_choice']:
- raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices in column heading."))
- elif not col[2] or not col[2].has_key('menu_choice') or col[2]['menu_choice'].strip() == '':
- raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices in column heading (white spaces not allowed)."))
-
- res = super(survey_question, self).create(cr, uid, vals, context)
- return res
-
- def survey_save(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
- search_obj = self.pool.get('ir.ui.view')
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
- surv_name_wiz = self.pool.get('survey.name.wiz')
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'transfer':True, 'page_no' : context.get('page_number',False) })
- return {
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
- def default_get(self, cr, uid, fields, context=None):
- if context is None:
- context = {}
- data = super(survey_question, self).default_get(cr, uid, fields, context)
- if context.has_key('page_id'):
- data['page_id']= context.get('page_id', False)
- return data
+ raise RuntimeError("Invalid matrix subtype")
+ # Validate that each line has been answered
+ if answer_number != lines_number:
+ errors.update({answer_tag: question.constr_error_msg})
+ return errors
-
-class survey_question_column_heading(osv.osv):
- _name = 'survey.question.column.heading'
- _description = 'Survey Question Column Heading'
- _rec_name = 'title'
-
- def _get_in_visible_rating_weight(self, cr, uid, context=None):
- if context is None:
- context = {}
- if context.get('in_visible_rating_weight', False):
- return context['in_visible_rating_weight']
- return False
- def _get_in_visible_menu_choice(self,cr, uid, context=None):
- if context is None:
- context = {}
- if context.get('in_visible_menu_choice', False):
- return context['in_visible_menu_choice']
- return False
-
- _columns = {
- 'title': fields.char('Column Heading', size=128, required=1),
- 'menu_choice': fields.text('Menu Choice'),
- 'rating_weight': fields.integer('Weight'),
- 'question_id': fields.many2one('survey.question', 'Question', ondelete='cascade'),
- 'in_visible_rating_weight': fields.boolean('Is Rating Scale Invisible ??'),
- 'in_visible_menu_choice': fields.boolean('Is Menu Choice Invisible??')
- }
- _defaults={
- 'in_visible_rating_weight': _get_in_visible_rating_weight,
- 'in_visible_menu_choice': _get_in_visible_menu_choice,
- }
-
-class survey_answer(osv.osv):
- _name = 'survey.answer'
- _description = 'Survey Answer'
- _rec_name = 'answer'
+class survey_label(osv.Model):
+ ''' A suggested answer for a question '''
+ _name = 'survey.label'
+ _rec_name = 'value'
_order = 'sequence'
+ _description = 'Survey Label'
- def _calc_response_avg(self, cr, uid, ids, field_name, arg, context=None):
- val = {}
- for rec in self.browse(cr, uid, ids, context=context):
- cr.execute("select count(question_id) ,(select count(answer_id) \
- from survey_response_answer sra, survey_response_line sa \
- where sra.response_id = sa.id and sra.answer_id = %d \
- and sa.state='done') as tot_ans from survey_response_line \
- where question_id = %d and state = 'done'"\
- % (rec.id, rec.question_id.id))
- res = cr.fetchone()
- if res[0]:
- avg = float(res[1]) * 100 / res[0]
- else:
- avg = 0.0
- val[rec.id] = {
- 'response': res[1],
- 'average': round(avg, 2),
- }
- return val
-
- def _get_in_visible_answer_type(self, cr, uid, context=None):
- if context is None:
- context = {}
- return context.get('in_visible_answer_type', False)
+ def _check_question_not_empty(self, cr, uid, ids, context=None):
+ '''Ensure that field question_id XOR field question_id_2 is not null'''
+ for label in self.browse(cr, uid, ids, context=context):
+ # 'bool()' is required in order to make '!=' act as XOR with objects
+ return bool(label.question_id) != bool(label.question_id_2)
_columns = {
- 'question_id': fields.many2one('survey.question', 'Question', ondelete='cascade'),
- 'answer': fields.char('Answer', size=128, required=1),
- 'sequence': fields.integer('Sequence'),
- 'response': fields.function(_calc_response_avg, string="#Answer", multi='sums'),
- 'average': fields.function(_calc_response_avg, string="#Avg", multi='sums'),
- 'type': fields.selection([('char','Character'),('date','Date'),('datetime','Date & Time'),\
- ('integer','Integer'),('float','Float'),('selection','Selection'),\
- ('email','Email')], "Type of Answer",required=1),
- 'menu_choice': fields.text('Menu Choices'),
- 'in_visible_answer_type': fields.boolean('Is Answer Type Invisible??')
+ 'question_id': fields.many2one('survey.question', 'Question',
+ ondelete='cascade'),
+ 'question_id_2': fields.many2one('survey.question', 'Question',
+ ondelete='cascade'),
+ 'sequence': fields.integer('Label Sequence order'),
+ 'value': fields.char("Suggested value", translate=True,
+ required=True),
+ 'quizz_mark': fields.float('Score for this answer'),
}
- _defaults = {
-# 'sequence' : lambda * a: 1,
- 'type' : lambda * a: 'char',
- 'in_visible_answer_type':_get_in_visible_answer_type,
+ defaults = {
+ 'sequence': 100,
}
-
- def default_get(self, cr, uid, fields, context=None):
- if context is None:
- context = {}
- data = super(survey_answer, self).default_get(cr, uid, fields, context)
- return data
+ _constraints = [
+ (_check_question_not_empty, "A label must be attached to one and only one question", ['question_id', 'question_id_2'])
+ ]
-class survey_response(osv.osv):
- _name = "survey.response"
+class survey_user_input(osv.Model):
+ ''' Metadata for a set of one user's answers to a particular survey '''
+ _name = "survey.user_input"
_rec_name = 'date_create'
+ _description = 'Survey User Input'
+
+ def _quizz_get_score(self, cr, uid, ids, name, args, context=None):
+ ret = dict()
+ for user_input in self.browse(cr, uid, ids, context=context):
+ ret[user_input.id] = sum([uil.quizz_mark for uil in user_input.user_input_line_ids] or [0.0])
+ return ret
+
_columns = {
- 'survey_id' : fields.many2one('survey', 'Survey', required=1, ondelete='cascade'),
- 'date_create' : fields.datetime('Create Date', required=1),
- 'user_id' : fields.many2one('res.users', 'User'),
- 'response_type' : fields.selection([('manually', 'Manually'), ('link', 'Link')], \
- 'Answer Type', required=1, readonly=1),
- 'question_ids' : fields.one2many('survey.response.line', 'response_id', 'Answer'),
- 'state' : fields.selection([('done', 'Finished '),('skip', 'Not Finished')], \
- 'Status', readonly=True),
+ 'survey_id': fields.many2one('survey.survey', 'Survey', required=True,
+ readonly=1, ondelete='restrict'),
+ 'date_create': fields.datetime('Creation Date', required=True,
+ readonly=1),
+ 'deadline': fields.datetime("Deadline",
+ help="Date by which the person can open the survey and submit answers",
+ oldname="date_deadline"),
+ 'type': fields.selection([('manually', 'Manually'), ('link', 'Link')],
+ 'Answer Type', required=1, readonly=1,
+ oldname="response_type"),
+ 'state': fields.selection([('new', 'Not started yet'),
+ ('skip', 'Partially completed'),
+ ('done', 'Completed')],
+ 'Status',
+ readonly=True),
+ 'test_entry': fields.boolean('Test entry', readonly=1),
+ 'token': fields.char("Identification token", readonly=1, required=1),
+
+ # Optional Identification data
+ 'partner_id': fields.many2one('res.partner', 'Partner', readonly=1),
+ 'email': fields.char("E-mail", readonly=1),
+
+ # Displaying data
+ 'last_displayed_page_id': fields.many2one('survey.page',
+ 'Last displayed page'),
+ # The answers !
+ 'user_input_line_ids': fields.one2many('survey.user_input_line',
+ 'user_input_id', 'Answers'),
+
+ # URLs used to display the answers
+ 'result_url': fields.related('survey_id', 'result_url', string="Public link to the survey results"),
+ 'print_url': fields.related('survey_id', 'print_url', string="Public link to the empty survey"),
+
+ 'quizz_score': fields.function(_quizz_get_score, type="float", string="Score for the quiz")
}
_defaults = {
- 'state' : lambda * a: "skip",
- 'response_type' : lambda * a: "manually",
+ 'date_create': fields.datetime.now,
+ 'type': 'manually',
+ 'state': 'new',
+ 'token': lambda s, cr, uid, c: uuid.uuid4().__str__(),
+ 'quizz_score': 0.0,
}
- def name_get(self, cr, uid, ids, context=None):
- if not len(ids):
- return []
- reads = self.read(cr, uid, ids, ['user_id','date_create'], context=context)
- res = []
- for record in reads:
- name = (record['user_id'] and record['user_id'][1] or '' )+ ' (' + record['date_create'].split('.')[0] + ')'
- res.append((record['id'], name))
- return res
+ _sql_constraints = [
+ ('unique_token', 'UNIQUE (token)', 'A token must be unique!'),
+ ('deadline_in_the_past', 'CHECK (deadline >= date_create)', 'The deadline cannot be in the past')
+ ]
+
+ def copy_data(self, cr, uid, id, default=None, context=None):
+ raise osv.except_osv(_('Warning!'), _('You cannot duplicate this \
+ element!'))
+
+ def do_clean_emptys(self, cr, uid, automatic=False, context=None):
+ ''' Remove empty user inputs that have been created manually
+ (used as a cronjob declared in data/survey_cron.xml) '''
+ empty_user_input_ids = self.search(cr, uid, [('type', '=', 'manually'),
+ ('state', '=', 'new'),
+ ('date_create', '<', (datetime.datetime.now() - datetime.timedelta(hours=1)).strftime(DF))],
+ context=context)
+ if empty_user_input_ids:
+ self.unlink(cr, uid, empty_user_input_ids, context=context)
+
+ def action_survey_resent(self, cr, uid, ids, context=None):
+ ''' Sent again the invitation '''
+ record = self.browse(cr, uid, ids[0], context=context)
+ context = context or {}
+ context.update({
+ 'survey_resent_token': True,
+ 'default_partner_ids': record.partner_id and [record.partner_id.id] or [],
+ 'default_multi_email': record.email or "",
+ 'default_public': 'email_private',
+ })
+ return self.pool.get('survey.survey').action_send_survey(cr, uid,
+ [record.survey_id.id], context=context)
+
+ def action_view_answers(self, cr, uid, ids, context=None):
+ ''' Open the website page with the survey form '''
+ user_input = self.read(cr, uid, ids, ['print_url', 'token'], context=context)[0]
+ return {
+ 'type': 'ir.actions.act_url',
+ 'name': "View Answers",
+ 'target': 'self',
+ 'url': '%s/%s' % (user_input['print_url'], user_input['token'])
+ }
- def copy(self, cr, uid, id, default=None, context=None):
- raise osv.except_osv(_('Warning!'),_('You cannot duplicate the resource!'))
+ def action_survey_results(self, cr, uid, ids, context=None):
+ ''' Open the website page with the survey results '''
+ return {
+ 'type': 'ir.actions.act_url',
+ 'name': "Survey Results",
+ 'target': 'self',
+ 'url': self.read(cr, uid, ids, ['result_url'], context=context)[0]['result_url']
+ }
-class survey_response_line(osv.osv):
- _name = 'survey.response.line'
- _description = 'Survey Response Line'
+class survey_user_input_line(osv.Model):
+ _name = 'survey.user_input_line'
+ _description = 'Survey User Input Line'
_rec_name = 'date_create'
+
+ def _answered_or_skipped(self, cr, uid, ids, context=None):
+ for uil in self.browse(cr, uid, ids, context=context):
+ # 'bool()' is required in order to make '!=' act as XOR with objects
+ return uil.skipped != bool(uil.answer_type)
+
+ def _check_answer_type(self, cr, uid, ids, context=None):
+ for uil in self.browse(cr, uid, ids, context=None):
+ if uil.answer_type:
+ if uil.answer_type == 'text':
+ # 'bool()' is required in order to make '!=' act as XOR with objects
+ return bool(uil.value_text)
+ elif uil.answer_type == 'number':
+ return (uil.value_number == 0) or (uil.value_number != False)
+ elif uil.answer_type == 'date':
+ return bool(uil.value_date)
+ elif uil.answer_type == 'free_text':
+ return bool(uil.value_free_text)
+ elif uil.answer_type == 'suggestion':
+ return bool(uil.value_suggested)
+ return True
+
_columns = {
- 'response_id': fields.many2one('survey.response', 'Answer', ondelete='cascade'),
+ 'user_input_id': fields.many2one('survey.user_input', 'User Input',
+ ondelete='cascade', required=1),
+ 'question_id': fields.many2one('survey.question', 'Question',
+ ondelete='restrict', required=1),
+ 'page_id': fields.related('question_id', 'page_id', type='many2one',
+ relation='survey.page', string="Page"),
+ 'survey_id': fields.related('user_input_id', 'survey_id',
+ type="many2one", relation="survey.survey",
+ string='Survey', store=True),
'date_create': fields.datetime('Create Date', required=1),
- 'state': fields.selection([('draft', 'Draft'), ('done', 'Answered'),('skip', 'Skiped')],\
- 'Status', readonly=True),
- 'question_id': fields.many2one('survey.question', 'Question'),
- 'page_id': fields.related('question_id', 'page_id', type='many2one', \
- relation='survey.page', string='Page'),
- 'response_answer_ids': fields.one2many('survey.response.answer', 'response_id', 'Answer'),
- 'response_table_ids': fields.one2many('survey.tbl.column.heading', \
- 'response_table_id', 'Answer'),
- 'comment': fields.text('Notes'),
- 'single_text': fields.char('Text', size=255),
+ 'skipped': fields.boolean('Skipped'),
+ 'answer_type': fields.selection([('text', 'Text'),
+ ('number', 'Number'),
+ ('date', 'Date'),
+ ('free_text', 'Free Text'),
+ ('suggestion', 'Suggestion')],
+ 'Answer Type'),
+ 'value_text': fields.char("Text answer"),
+ 'value_number': fields.float("Numerical answer"),
+ 'value_date': fields.datetime("Date answer"),
+ 'value_free_text': fields.text("Free Text answer"),
+ 'value_suggested': fields.many2one('survey.label', "Suggested answer"),
+ 'value_suggested_row': fields.many2one('survey.label', "Row answer"),
+ 'quizz_mark': fields.float("Score given for this answer")
}
+
_defaults = {
- 'state' : lambda * a: "draft",
+ 'skipped': False,
+ 'date_create': fields.datetime.now()
}
+ _constraints = [
+ (_answered_or_skipped, "A question cannot be unanswered and skipped", ['skipped', 'answer_type']),
+ (_check_answer_type, "The answer must be in the right type", ['answer_type', 'text', 'number', 'date', 'free_text', 'suggestion'])
+ ]
+
+ def __get_mark(self, cr, uid, value_suggested, context=None):
+ try:
+ mark = self.pool.get('survey.label').browse(cr, uid, int(value_suggested), context=context).quizz_mark
+ except KeyError:
+ mark = 0.0
+ except ValueError:
+ mark = 0.0
+ return mark
+ def create(self, cr, uid, vals, context=None):
+ value_suggested = vals.get('value_suggested')
+ if value_suggested:
+ vals.update({'quizz_mark': self.__get_mark(cr, uid, value_suggested)})
+ return super(survey_user_input_line, self).create(cr, uid, vals, context=context)
-class survey_tbl_column_heading(osv.osv):
- _name = 'survey.tbl.column.heading'
- _order = 'name'
- _columns = {
- 'name': fields.integer('Row Number'),
- 'column_id': fields.many2one('survey.question.column.heading', 'Column'),
- 'value': fields.char('Value', size = 255),
- 'response_table_id': fields.many2one('survey.response.line', 'Answer', ondelete='cascade'),
- }
-
+ def write(self, cr, uid, ids, vals, context=None):
+ value_suggested = vals.get('value_suggested')
+ if value_suggested:
+ vals.update({'quizz_mark': self.__get_mark(cr, uid, value_suggested)})
+ return super(survey_user_input_line, self).write(cr, uid, ids, vals, context=context)
+
+ def copy_data(self, cr, uid, id, default=None, context=None):
+ raise osv.except_osv(_('Warning!'), _('You cannot duplicate this \
+ element!'))
+
+ def save_lines(self, cr, uid, user_input_id, question, post, answer_tag,
+ context=None):
+ ''' Save answers to questions, depending on question type
+
+ If an answer already exists for question and user_input_id, it will be
+ overwritten (in order to maintain data consistency). '''
+ try:
+ saver = getattr(self, 'save_line_' + question.type)
+ except AttributeError:
+ _logger.error(question.type + ": This type of question has no saving function")
+ return False
+ else:
+ saver(cr, uid, user_input_id, question, post, answer_tag, context=context)
+
+ def save_line_free_text(self, cr, uid, user_input_id, question, post, answer_tag, context=None):
+ vals = {
+ 'user_input_id': user_input_id,
+ 'question_id': question.id,
+ 'page_id': question.page_id.id,
+ 'survey_id': question.survey_id.id,
+ 'skipped': False,
+ }
+ if answer_tag in post and post[answer_tag].strip() != '':
+ vals.update({'answer_type': 'free_text', 'value_free_text': post[answer_tag]})
+ else:
+ vals.update({'answer_type': None, 'skipped': True})
+ old_uil = self.search(cr, uid, [('user_input_id', '=', user_input_id),
+ ('survey_id', '=', question.survey_id.id),
+ ('question_id', '=', question.id)],
+ context=context)
+ if old_uil:
+ self.write(cr, uid, old_uil[0], vals, context=context)
+ else:
+ self.create(cr, uid, vals, context=context)
+ return True
-class survey_response_answer(osv.osv):
- _name = 'survey.response.answer'
- _description = 'Survey Answer'
- _rec_name = 'response_id'
- _columns = {
- 'response_id': fields.many2one('survey.response.line', 'Answer', ondelete='cascade'),
- 'answer_id': fields.many2one('survey.answer', 'Answer', required=1, ondelete='cascade'),
- 'column_id': fields.many2one('survey.question.column.heading','Column'),
- 'answer': fields.char('Value', size =255),
- 'value_choice': fields.char('Value Choice', size =255),
- 'comment': fields.text('Notes'),
- 'comment_field': fields.char('Comment', size = 255)
- }
+ def save_line_textbox(self, cr, uid, user_input_id, question, post, answer_tag, context=None):
+ vals = {
+ 'user_input_id': user_input_id,
+ 'question_id': question.id,
+ 'page_id': question.page_id.id,
+ 'survey_id': question.survey_id.id,
+ 'skipped': False
+ }
+ if answer_tag in post and post[answer_tag].strip() != '':
+ vals.update({'answer_type': 'text', 'value_text': post[answer_tag]})
+ else:
+ vals.update({'answer_type': None, 'skipped': True})
+ old_uil = self.search(cr, uid, [('user_input_id', '=', user_input_id),
+ ('survey_id', '=', question.survey_id.id),
+ ('question_id', '=', question.id)],
+ context=context)
+ if old_uil:
+ self.write(cr, uid, old_uil[0], vals, context=context)
+ else:
+ self.create(cr, uid, vals, context=context)
+ return True
+ def save_line_numerical_box(self, cr, uid, user_input_id, question, post, answer_tag, context=None):
+ vals = {
+ 'user_input_id': user_input_id,
+ 'question_id': question.id,
+ 'page_id': question.page_id.id,
+ 'survey_id': question.survey_id.id,
+ 'skipped': False
+ }
+ if answer_tag in post and post[answer_tag].strip() != '':
+ vals.update({'answer_type': 'number', 'value_number': float(post[answer_tag])})
+ else:
+ vals.update({'answer_type': None, 'skipped': True})
+ old_uil = self.search(cr, uid, [('user_input_id', '=', user_input_id),
+ ('survey_id', '=', question.survey_id.id),
+ ('question_id', '=', question.id)],
+ context=context)
+ if old_uil:
+ self.write(cr, uid, old_uil[0], vals, context=context)
+ else:
+ self.create(cr, uid, vals, context=context)
+ return True
-class res_users(osv.osv):
- _inherit = "res.users"
- _name = "res.users"
- _columns = {
- 'survey_id': fields.many2many('survey', 'survey_users_rel', 'uid', 'sid', 'Groups'),
- }
+ def save_line_datetime(self, cr, uid, user_input_id, question, post, answer_tag, context=None):
+ vals = {
+ 'user_input_id': user_input_id,
+ 'question_id': question.id,
+ 'page_id': question.page_id.id,
+ 'survey_id': question.survey_id.id,
+ 'skipped': False
+ }
+ if answer_tag in post and post[answer_tag].strip() != '':
+ vals.update({'answer_type': 'date', 'value_date': post[answer_tag]})
+ else:
+ vals.update({'answer_type': None, 'skipped': True})
+ old_uil = self.search(cr, uid, [('user_input_id', '=', user_input_id),
+ ('survey_id', '=', question.survey_id.id),
+ ('question_id', '=', question.id)],
+ context=context)
+ if old_uil:
+ self.write(cr, uid, old_uil[0], vals, context=context)
+ else:
+ self.create(cr, uid, vals, context=context)
+ return True
+ def save_line_simple_choice(self, cr, uid, user_input_id, question, post, answer_tag, context=None):
+ vals = {
+ 'user_input_id': user_input_id,
+ 'question_id': question.id,
+ 'page_id': question.page_id.id,
+ 'survey_id': question.survey_id.id,
+ 'skipped': False
+ }
+ old_uil = self.search(cr, uid, [('user_input_id', '=', user_input_id),
+ ('survey_id', '=', question.survey_id.id),
+ ('question_id', '=', question.id)],
+ context=context)
+ if old_uil:
+ self.unlink(cr, uid, old_uil, context=context)
+
+ if answer_tag in post and post[answer_tag].strip() != '':
+ vals.update({'answer_type': 'suggestion', 'value_suggested': post[answer_tag]})
+ else:
+ vals.update({'answer_type': None, 'skipped': True})
+ self.create(cr, uid, vals, context=context)
-class survey_request(osv.osv):
- _name = "survey.request"
- _order = 'date_deadline'
- _rec_name = 'date_deadline'
- _columns = {
- 'date_deadline': fields.date("Deadline date"),
- 'user_id': fields.many2one("res.users", "User"),
- 'email': fields.char("Email", size=64),
- 'survey_id': fields.many2one("survey", "Survey", required=1, ondelete='cascade'),
- 'response': fields.many2one('survey.response', 'Answer'),
- 'state': fields.selection([('draft','Draft'),('cancel', 'Cancelled'),('waiting_answer', 'Waiting Answer'),('done', 'Done')], 'Status', readonly=1)
- }
- _defaults = {
- 'state': lambda * a: 'draft',
-# 'date_deadline': lambda * a : (datetime.now() + relativedelta(months=+1)).strftime("%Y-%m-%d %H:%M:%S")
- }
- def survey_req_waiting_answer(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, { 'state' : 'waiting_answer'})
- return True
+ comment_answer = post.pop(("%s_%s" % (answer_tag, 'comment')), '').strip()
+ if comment_answer:
+ vals.update({'answer_type': 'text', 'value_text': comment_answer})
+ self.create(cr, uid, vals, context=context)
- def survey_req_draft(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, { 'state' : 'draft'})
return True
- def survey_req_done(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, { 'state' : 'done'})
+ def save_line_multiple_choice(self, cr, uid, user_input_id, question, post, answer_tag, context=None):
+ vals = {
+ 'user_input_id': user_input_id,
+ 'question_id': question.id,
+ 'page_id': question.page_id.id,
+ 'survey_id': question.survey_id.id,
+ 'skipped': False
+ }
+ old_uil = self.search(cr, uid, [('user_input_id', '=', user_input_id),
+ ('survey_id', '=', question.survey_id.id),
+ ('question_id', '=', question.id)],
+ context=context)
+ if old_uil:
+ self.unlink(cr, uid, old_uil, context=context)
+
+ ca = dict_keys_startswith(post, answer_tag)
+ comment_answer = ca.pop(("%s_%s" % (answer_tag, 'comment')), '').strip()
+ if len(ca) > 0:
+ for a in ca:
+ vals.update({'answer_type': 'suggestion', 'value_suggested': ca[a]})
+ self.create(cr, uid, vals, context=context)
+ if comment_answer:
+ vals.update({'answer_type': 'text', 'value_text': comment_answer})
+ self.create(cr, uid, vals, context=context)
+ if not ca and not comment_answer:
+ vals.update({'answer_type': None, 'skipped': True})
+ self.create(cr, uid, vals, context=context)
return True
- def survey_req_cancel(self, cr, uid, ids, arg):
- self.write(cr, uid, ids, { 'state' : 'cancel'})
+ def save_line_matrix(self, cr, uid, user_input_id, question, post, answer_tag, context=None):
+ vals = {
+ 'user_input_id': user_input_id,
+ 'question_id': question.id,
+ 'page_id': question.page_id.id,
+ 'survey_id': question.survey_id.id,
+ 'skipped': False
+ }
+ old_uil = self.search(cr, uid, [('user_input_id', '=', user_input_id),
+ ('survey_id', '=', question.survey_id.id),
+ ('question_id', '=', question.id)],
+ context=context)
+ if old_uil:
+ self.unlink(cr, uid, old_uil, context=context)
+
+ no_answers = True
+ ca = dict_keys_startswith(post, answer_tag)
+
+ comment_answer = ca.pop(("%s_%s" % (answer_tag, 'comment')), '').strip()
+ if comment_answer:
+ vals.update({'answer_type': 'text', 'value_text': comment_answer})
+ self.create(cr, uid, vals, context=context)
+ no_answers = False
+
+ if question.matrix_subtype == 'simple':
+ for row in question.labels_ids_2:
+ a_tag = "%s_%s" % (answer_tag, row.id)
+ if a_tag in ca:
+ no_answers = False
+ vals.update({'answer_type': 'suggestion', 'value_suggested': ca[a_tag], 'value_suggested_row': row.id})
+ self.create(cr, uid, vals, context=context)
+
+ elif question.matrix_subtype == 'multiple':
+ for col in question.labels_ids:
+ for row in question.labels_ids_2:
+ a_tag = "%s_%s_%s" % (answer_tag, row.id, col.id)
+ if a_tag in ca:
+ no_answers = False
+ vals.update({'answer_type': 'suggestion', 'value_suggested': col.id, 'value_suggested_row': row.id})
+ self.create(cr, uid, vals, context=context)
+ if no_answers:
+ vals.update({'answer_type': None, 'skipped': True})
+ self.create(cr, uid, vals, context=context)
return True
- def on_change_user(self, cr, uid, ids, user_id, context=None):
- if user_id:
- user_obj = self.pool.get('res.users')
- user = user_obj.browse(cr, uid, user_id, context=context)
- return {'value': {'email': user.email}}
- return {}
+def dict_keys_startswith(dictionary, string):
+ '''Returns a dictionary containing the elements of <dict> whose keys start
+ with <string>.
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+ .. note::
+ This function uses dictionary comprehensions (Python >= 2.7)'''
+ return {k: dictionary[k] for k in filter(lambda key: key.startswith(string), dictionary.keys())}
diff --git a/addons/survey/survey_data.xml b/addons/survey/survey_data.xml
deleted file mode 100644
index 7627c5d54b0..00000000000
--- a/addons/survey/survey_data.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<openerp>
- <data>
- <record model="survey.type" id="survey_type1">
- <field name="name">Human Resources</field>
- <field name="code">Human Resources</field>
- </record>
- <record model="survey.type" id="survey_type2">
- <field name="name">Customer Feeback</field>
- <field name="code">Customer Feeback</field>
- </record>
- <record model="survey.type" id="survey_type3">
- <field name="name">Supplier Selection</field>
- <field name="code">Supplier Selection</field>
- </record>
- </data>
-</openerp>
diff --git a/addons/survey/survey_demo.xml b/addons/survey/survey_demo.xml
deleted file mode 100644
index 6f89095c699..00000000000
--- a/addons/survey/survey_demo.xml
+++ /dev/null
@@ -1,3531 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data noupdate="1">
-
- <record id="base.user_demo" model="res.users">
- <field eval="[(4, ref('base.group_tool_user')),(4, ref('base.group_survey_user'))]" name="groups_id"/>
- </record>
-
- <!-- Initial Partner Feedback Demo data -->
- <record model="survey" id="survey_Initial_partner_feedback">
- <field name="title">Initial Partner Feedback</field>
- <field name="responsible_id" ref="base.user_root"/>
- <field name="max_response_limit">20</field>
- <field name="type" ref="survey_type2"/>
- <field name="state">open</field>
- <field name="color">5</field>
- <field name="tot_comp_survey">1</field>
- <field name="tot_start_survey">1</field>
- <field name="response_user">5</field>
- <field name="date_open" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
- </record>
-
- <record id="survey_page_initial_who_are_you" model="survey.page">
- <field name="title">Who are you?</field>
- <field name="survey_id" ref="survey_Initial_partner_feedback" />
- <field eval="1" name="sequence"/>
- </record>
-
- <record id="survey_initial_question_company_name" model="survey.question">
- <field name="question">What is your company's name?</field>
- <field name="page_id" ref="survey_page_initial_who_are_you" />
- <field name="type">single_textbox</field>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- <field eval="1" name="sequence"/>
- <field name="in_visible_answer_type">1</field>
- </record>
-
- <record id="survey_initial_question_company_size" model="survey.question">
- <field name="question">What is your company's size?</field>
- <field name="page_id" ref="survey_page_initial_who_are_you" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field eval="2" name="sequence"/>
- <field name="in_visible_answer_type">1</field>
- </record>
-
- <record id="survey_initial_question_company_size_1" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">1 - 10</field>
- <field name="question_id" ref="survey_initial_question_company_size" />
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_initial_question_company_size_11" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">11 - 50</field>
- <field name="question_id" ref="survey_initial_question_company_size" />
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_initial_question_company_size_51" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">51 - 100</field>
- <field name="question_id" ref="survey_initial_question_company_size" />
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_initial_question_company_size_101" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">101 - 250</field>
- <field name="question_id" ref="survey_initial_question_company_size" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_initial_question_company_size_251" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">251 - 500</field>
- <field name="question_id" ref="survey_initial_question_company_size" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_initial_question_company_size_501" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">501 - 1000</field>
- <field name="question_id" ref="survey_initial_question_company_size" />
- <field name="sequence" eval="6"/>
- </record>
- <record id="survey_initial_question_company_size_1000" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">> 1000</field>
- <field name="question_id" ref="survey_initial_question_company_size" />
- <field name="sequence" eval="7"/>
- </record>
- <record id="survey_initial_question_company_size" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_initial_page_Contracts" model="survey.page">
- <field name="title">Contracts</field>
- <field name="survey_id" ref="survey_Initial_partner_feedback" />
- <field name="sequence" eval="2"/>
- </record>
-
- <record id="survey_initial_question_sell_to_your_customers" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Which maintenance contract do you sell to your customers?</field>
- <field name="page_id" ref="survey_initial_page_Contracts" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field eval="1" name="sequence"/>
- </record>
-
- <record id="survey_initial_answer_maintenance_contract" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">OpenERP maintenance contract</field>
- <field name="question_id" ref="survey_initial_question_sell_to_your_customers" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_initial_answer_buy_an_openerp_one" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Your own contract, but you buy an OpenERP one</field>
- <field name="question_id" ref="survey_initial_question_sell_to_your_customers" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_initial_answer_buying_an_openerp" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Your own contract without buying an OpenERP one</field>
- <field name="question_id" ref="survey_initial_question_sell_to_your_customers" />
- <field name="sequence" eval="3"/>
- </record>
-
- <record id="survey_initial_question_contract_customers" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">When do you propose a maintenance contract to your customers?</field>
- <field name="page_id" ref="survey_initial_page_Contracts" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="comment_field_type">text</field>
- <field name="comment_label">Why?</field>
- <field eval="2" name="sequence"/>
- <field name="is_comment_require">True</field>
- </record>
-
- <record id="survey_initial_answer_very_integration" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">With each integration</field>
- <field name="question_id" ref="survey_initial_question_contract_customers" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_initial_answer_sometimes" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Sometimes</field>
- <field name="question_id" ref="survey_initial_question_contract_customers" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_initial_answer_never" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Never... </field>
- <field name="question_id" ref="survey_initial_question_contract_customers" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_initial_question_contract_customers" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <!-- Partner Feedback Demo data -->
- <record model="survey" id="survey_partner_feedback">
- <field name="title">OpenERP Partner Feedback</field>
- <field name="responsible_id" ref="base.user_root"/>
- <field name="max_response_limit">20</field>
- <field name="type" ref="survey_type2"/>
- <field name="state">open</field>
- <field name="tot_comp_survey">1</field>
- <field name="tot_start_survey">1</field>
- <field name="response_user">5</field>
- <field name="date_open" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
- </record>
-
- <record id="survey_page_who_are_you" model="survey.page">
- <field name="title">Who are you?</field>
- <field name="survey_id" ref="survey_partner_feedback" />
- <field eval="1" name="sequence"/>
- </record>
-
- <record id="survey_question_company_name" model="survey.question">
- <field name="question">What is your company's name?</field>
- <field name="page_id" ref="survey_page_who_are_you" />
- <field name="type">single_textbox</field>
- <field name="in_visible_rating_weight">1</field>
- <field eval="1" name="sequence"/>
- <field name="in_visible_answer_type">1</field>
- </record>
-
- <record id="survey_question_company_size" model="survey.question">
- <field name="question">What is your company's size?</field>
- <field name="page_id" ref="survey_page_who_are_you" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field eval="2" name="sequence"/>
- <field name="in_visible_answer_type">1</field>
- </record>
-
- <record id="survey_question_company_size_1" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">1 - 10</field>
- <field name="question_id" ref="survey_question_company_size" />
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_question_company_size_11" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">11 - 50</field>
- <field name="question_id" ref="survey_question_company_size" />
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_question_company_size_51" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">51 - 100</field>
- <field name="question_id" ref="survey_question_company_size" />
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_question_company_size_101" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">101 - 250</field>
- <field name="question_id" ref="survey_question_company_size" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_company_size_251" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">251 - 500</field>
- <field name="question_id" ref="survey_question_company_size" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_question_company_size_501" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">501 - 1000</field>
- <field name="question_id" ref="survey_question_company_size" />
- <field name="sequence" eval="6"/>
- </record>
- <record id="survey_question_company_size_1000" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">> 1000</field>
- <field name="question_id" ref="survey_question_company_size" />
- <field name="sequence" eval="7"/>
- </record>
- <record id="survey_question_company_size" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_question_located" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Where are you located?</field>
- <field name="page_id" ref="survey_page_who_are_you" />
- <field name="type">multiple_choice_multiple_ans</field>
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_question_company_size_Europ" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Europe</field>
- <field name="question_id" ref="survey_question_located" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_question_company_size_North_America" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">North America</field>
- <field name="question_id" ref="survey_question_located" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_company_size_Asia" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Asia</field>
- <field name="question_id" ref="survey_question_located" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_company_size_South_America" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">South America</field>
- <field name="question_id" ref="survey_question_located" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_company_size_Australia" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Australia</field>
- <field name="question_id" ref="survey_question_located" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_question_located" model="survey.question">
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_offical_partner" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">When did you become an OpenERP official partner?</field>
- <field name="page_id" ref="survey_page_who_are_you" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field eval="4" name="sequence"/>
- </record>
- <record id="survey_question_company_size_2009" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">in 2009</field>
- <field name="question_id" ref="survey_question_offical_partner" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_question_company_size_2008" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">in 2008</field>
- <field name="question_id" ref="survey_question_offical_partner" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_company_size_2007" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">in 2007</field>
- <field name="question_id" ref="survey_question_offical_partner" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_company_size_2006" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">in 2006</field>
- <field name="question_id" ref="survey_question_offical_partner" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_company_size_before_2006" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">before 2006</field>
- <field name="question_id" ref="survey_question_offical_partner" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_question_offical_partner" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_question_your_customers" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">What kind of solutions do you sell to your customers? </field>
- <field name="page_id" ref="survey_page_who_are_you" />
- <field name="type">multiple_choice_multiple_ans</field>
- <field eval="5" name="sequence"/>
- </record>
- <record id="survey_answer_specific_devlopments" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Integrations without specific developments</field>
- <field name="question_id" ref="survey_question_your_customers" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_with_specific_devlopments" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Integrations with specific developments</field>
- <field name="question_id" ref="survey_question_your_customers" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_saas_services" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Odoo Saas Offer</field>
- <field name="question_id" ref="survey_question_your_customers" />
- <field name="sequence" eval="3"/>
- </record>
-
-
- <record id="survey_page_Contracts" model="survey.page">
- <field name="title">Contracts</field>
- <field name="survey_id" ref="survey_partner_feedback" />
- <field name="sequence" eval="2"/>
- </record>
-
- <record id="survey_question_partnership_contract" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">What do you think about the partnership contract?</field>
- <field name="page_id" ref="survey_page_Contracts" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field eval="1" name="sequence"/>
- </record>
- <record id="survey_answer_Ambiguous" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Ambiguous</field>
- <field name="question_id" ref="survey_question_partnership_contract" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_enough" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Not clear enough</field>
- <field name="question_id" ref="survey_question_partnership_contract" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_Clear" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Clear</field>
- <field name="question_id" ref="survey_question_partnership_contract" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_answer_very_clear" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Very Clear</field>
- <field name="question_id" ref="survey_question_partnership_contract" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_partnership_contract" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_question_contract_customers" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">When do you propose a maintenance contract to your customers?</field>
- <field name="page_id" ref="survey_page_Contracts" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="comment_field_type">text</field>
- <field name="comment_label">Why?</field>
- <field eval="2" name="sequence"/>
- <field name="is_comment_require">True</field>
- </record>
- <record id="survey_answer_very_integration" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">With each integration</field>
- <field name="question_id" ref="survey_question_contract_customers" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_sometimes" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Sometimes</field>
- <field name="question_id" ref="survey_question_contract_customers" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_never" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Never... </field>
- <field name="question_id" ref="survey_question_contract_customers" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_contract_customers" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_question_sell_to_your_customers" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Which maintenance contract do you sell to your customers.</field>
- <field name="page_id" ref="survey_page_Contracts" />
- <field name="type">multiple_choice_only_one_ans</field>
-
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_maintenance_contract" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">OpenERP maintenance contract</field>
- <field name="question_id" ref="survey_question_sell_to_your_customers" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_buy_an_openerp_one" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Your own contract, but you buy an OpenERP one</field>
- <field name="question_id" ref="survey_question_sell_to_your_customers" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_buying_an_openerp" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Your own contract without buying an OpenERP one</field>
- <field name="question_id" ref="survey_question_sell_to_your_customers" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_sell_to_your_customers" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_page_communication" model="survey.page">
- <field name="title">Communication</field>
- <field name="survey_id" ref="survey_partner_feedback" />
- <field name="sequence" eval="3"/>
- </record>
-
- <record id="survey_question_launchpad_reporting" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Give your opinion about Launchpad reporting :</field>
- <field name="page_id" ref="survey_page_communication" />
- <field name="type">matrix_of_choices_only_one_ans</field>
-
- <field eval="2" name="sequence"/>
- </record>
- <record id="survey_answer_find_openobject_website1" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Is Launchpad easy to find in OpenObject website?</field>
- <field name="question_id" ref="survey_question_launchpad_reporting" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_bug_or_blueprint" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Is it easy to report a bug or a blueprint?</field>
- <field name="question_id" ref="survey_question_launchpad_reporting" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_modify_a_translation" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Is it easy to add or modify a translation?</field>
- <field name="question_id" ref="survey_question_launchpad_reporting" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_column_not_at_all" model="survey.question.column.heading">
- <field name="title">Not at all</field>
- <field name="question_id" ref="survey_question_launchpad_reporting" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_No" model="survey.question.column.heading">
- <field name="title">No</field>
- <field name="question_id" ref="survey_question_launchpad_reporting" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_yes_but_could_better" model="survey.question.column.heading">
- <field name="title">Yes, but could be better</field>
- <field name="question_id" ref="survey_question_launchpad_reporting" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Absolutely" model="survey.question.column.heading">
- <field name="title">Absolutely</field>
- <field name="question_id" ref="survey_question_launchpad_reporting" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_question_Leads" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Leads</field>
- <field name="page_id" ref="survey_page_communication" />
- <field name="type">matrix_of_choices_only_one_ans</field>
-
- </record>
- <record id="survey_answer_find_openobject_website" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Is Launchpad easy to find in OpenObject website?</field>
- <field name="question_id" ref="survey_question_Leads" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_converted_in_customers" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">How are the leads that you find thanks to OpenERP SA be converted in customers?</field>
- <field name="question_id" ref="survey_question_Leads" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_column_need_new_leads" model="survey.question.column.heading">
- <field name="title">I didn't try, I don't need new leads</field>
- <field name="question_id" ref="survey_question_Leads" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Hard" model="survey.question.column.heading">
- <field name="title">Hard</field>
- <field name="question_id" ref="survey_question_Leads" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Difficult" model="survey.question.column.heading">
- <field name="title">Difficult</field>
- <field name="question_id" ref="survey_question_Leads" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Easy" model="survey.question.column.heading">
- <field name="title">Easy</field>
- <field name="question_id" ref="survey_question_Leads" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Very_Easy" model="survey.question.column.heading">
- <field name="title">Very Easy</field>
- <field name="question_id" ref="survey_question_Leads" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
-
- <record id="survey_question_partners_about" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">How is OpenERP SA's communication with partners about...</field>
- <field name="page_id" ref="survey_page_communication" />
- <field name="type">matrix_of_choices_only_one_ans</field>
-
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_answer_Maintenance_contracts" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Maintenance contracts</field>
- <field name="question_id" ref="survey_question_partners_about" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_partner_Leads" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Leads</field>
- <field name="question_id" ref="survey_question_partners_about" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_Training_sessions" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Training sessions</field>
- <field name="question_id" ref="survey_question_partners_about" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_column_very_bad" model="survey.question.column.heading">
- <field name="title">Very Bad</field>
- <field name="question_id" ref="survey_question_partners_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Bad" model="survey.question.column.heading">
- <field name="title">Bad</field>
- <field name="question_id" ref="survey_question_partners_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Good" model="survey.question.column.heading">
- <field name="title">Good</field>
- <field name="question_id" ref="survey_question_partners_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Very_Good" model="survey.question.column.heading">
- <field name="title">Very Good</field>
- <field name="question_id" ref="survey_question_partners_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_question_partners_about" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_partners_on_which_subjects" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">In your opinion, how could OpenERP SA better communicate with partners and on which subjects?</field>
- <field name="page_id" ref="survey_page_communication" />
- <field name="type">comment</field>
- <field eval="4" name="sequence"/>
- </record>
-
- <!-- Partner Feedback Demo data -->
- <record model="survey" id="survey_odoo_feedback">
- <field name="title">Odoo Feedback</field>
- <field name="responsible_id" ref="base.user_demo"/>
- <field name="max_response_limit">20</field>
- <field name="type" ref="survey_type2"/>
- <field name="state">open</field>
- <field name="tot_comp_survey">1</field>
- <field name="tot_start_survey">1</field>
- <field name="response_user">5</field>
- <field name="date_open" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
- </record>
-
- <record id="survey_page_odoo_who_are_you" model="survey.page">
- <field name="title">Who are you?</field>
- <field name="survey_id" ref="survey_odoo_feedback" />
- <field eval="1" name="sequence"/>
- </record>
-
- <record id="survey_question_odoo_company_name" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">What is your company's name?</field>
- <field name="page_id" ref="survey_page_odoo_who_are_you" />
- <field name="type">single_textbox</field>
- <field name="sequence" eval="1"/>
- </record>
-
- <record id="survey_question_odoo_company_sector" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">What is your company's sector?</field>
- <field name="page_id" ref="survey_page_odoo_who_are_you" />
- <field name="type">multiple_choice_multiple_ans</field>
-
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_Agriculture" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Agriculture</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_question_Bank_Finance" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Bank &amp; Finance</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_Engineering" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Engineering</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_Chemical_Pharmaceutical" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Chemical &amp; Pharmaceutical</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_HR" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">HR</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_question_Construction" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Construction</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="6"/>
- </record>
- <record id="survey_question_Retail" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Retail</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="7"/>
- </record>
- <record id="survey_question_Electronics" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Electronics</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="8"/>
- </record>
- <record id="survey_question_Energy" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Energy</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="9"/>
- </record>
- <record id="survey_question_Education" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Education</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="10"/>
- </record>
- <record id="survey_question_Industry" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Industry</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="11"/>
- </record>
- <record id="survey_question_Logistics" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Logistics</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="12"/>
- </record>
- <record id="survey_question_Media_Entertainment" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Media &amp; Entertainment</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="13"/>
- </record>
- <record id="survey_question_Public_Nonprofit" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Public &amp; Nonprofit</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="14"/>
- </record>
- <record id="survey_question_Services" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Services</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="15"/>
- </record>
- <record id="survey_question_Healthcare" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Healthcare</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="16"/>
- </record>
- <record id="survey_question_Telecommunication" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Telecommunication And ICT</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="17"/>
- </record>
- <record id="survey_question_Tourism_Catering" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Tourism &amp; Catering</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="18"/>
- </record>
- <record id="survey_question_Other_sector" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Other sector</field>
- <field name="question_id" ref="survey_question_odoo_company_sector" />
- <field name="sequence" eval="19"/>
- </record>
- <record id="survey_question_odoo_company_sector" model="survey.question">
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_odoo_mange_with_odoo" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Which activities do you plan to manage with Odoo ?</field>
- <field name="page_id" ref="survey_page_odoo_who_are_you" />
- <field name="type">multiple_choice_multiple_ans</field>
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_Customer_Relationship_Management" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Customer Relationship Management</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_question_Customer_Accounting_Finance" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Accounting &amp; Finance</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_Customer_inventory_Management" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Inventory Management</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_Customer_Manufacturing" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Manufacturing</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_Customer_Human_Resources" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Human Resources</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_question_Project_Management" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Project Management</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="6"/>
- </record>
- <record id="survey_question_Sales_Purchases" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Sales &amp; Purchases</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="7"/>
- </record>
- <record id="survey_question_Other_odoo_mange_with_odoo" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Other</field>
- <field name="question_id" ref="survey_question_odoo_mange_with_odoo" />
- <field name="sequence" eval="8"/>
- </record>
- <record id="survey_question_odoo_mange_with_odoo" model="survey.question">
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_odoo_discover_odoo" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">How did you discover Odoo ?</field>
- <field name="page_id" ref="survey_page_odoo_who_are_you" />
- <field name="type">multiple_choice_multiple_ans</field>
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_OpenERP_website" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">OpenERP website</field>
- <field name="question_id" ref="survey_question_odoo_discover_odoo" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_question_Search_Engine" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Search Engine</field>
- <field name="question_id" ref="survey_question_odoo_discover_odoo" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_Word_of_mouth" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Word of mouth</field>
- <field name="question_id" ref="survey_question_odoo_discover_odoo" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_Trade_show" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Trade show</field>
- <field name="question_id" ref="survey_question_odoo_discover_odoo" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_question_Press" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Press</field>
- <field name="question_id" ref="survey_question_odoo_discover_odoo" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_question_Other" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Other</field>
- <field name="question_id" ref="survey_question_odoo_discover_odoo" />
- <field name="sequence" eval="6"/>
- </record>
- <record id="survey_question_odoo_discover_odoo" model="survey.question">
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_page_odoo_Subscription_and_configuration" model="survey.page">
- <field name="title">Subscription and configuration</field>
- <field name="survey_id" ref="survey_odoo_feedback" />
- <field name="sequence" eval="2"/>
- </record>
-
- <record id="survey_question_odoo_subscribe_to_odoo" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Why did you subscribe to Odoo?</field>
- <field name="page_id" ref="survey_page_odoo_Subscription_and_configuration" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_switch_to_online_offer1" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I was already using OpenERP and wanted to switch to an online offer</field>
- <field name="question_id" ref="survey_question_odoo_subscribe_to_odoo" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_maintaining_by_myself" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">It's easier and cheaper than maintaining by myself</field>
- <field name="question_id" ref="survey_question_odoo_subscribe_to_odoo" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_saas_offr_my_customers" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">I am looking for a SaaS offer for my customers</field>
- <field name="question_id" ref="survey_question_odoo_subscribe_to_odoo" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_answer_download_install_later_use" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">After having tested it, I plan to download and install it by myself for later use</field>
- <field name="question_id" ref="survey_question_odoo_subscribe_to_odoo" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_answer_tested_planto_use_it" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">After having tested it, I don't plan to use it</field>
- <field name="question_id" ref="survey_question_odoo_subscribe_to_odoo" />
- <field name="sequence" eval="5"/>
- </record>
-
- <record id="survey_question_odoo_configure_the_application" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">How much time did you spend to configure the application?</field>
- <field name="page_id" ref="survey_page_odoo_Subscription_and_configuration" />
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_switch_to_online_offer" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Creating users and access rights</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_adding_modules_need" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Adding the modules I need</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_configuring_the_modules" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Configuring the modules</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_answer_importing_my_data" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Importing my data</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_answer_initial_data" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Creating the initial data</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_column_i_didnot_try" model="survey.question.column.heading">
- <field name="title">I didn't try</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_couple_of_weeks" model="survey.question.column.heading">
- <field name="title">A couple of weeks</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_couple_of_days" model="survey.question.column.heading">
- <field name="title">A couple of days</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_couple_of_hours" model="survey.question.column.heading">
- <field name="title">A couple of hours</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_couple_of_minutes" model="survey.question.column.heading">
- <field name="title">A couple of minutes</field>
- <field name="question_id" ref="survey_question_odoo_configure_the_application" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
-
- <record id="survey_question_odoo_continue_using_odoo" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Do you plan to continue using Odoo?</field>
- <field name="page_id" ref="survey_page_odoo_Subscription_and_configuration" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="comment_field_type">text</field>
- <field name="comment_label">No...Why?</field>
- <field name="sequence" eval="3"/>
- <field name="is_comment_require">True</field>
- </record>
- <record id="survey_answer_yes" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Yes</field>
- <field name="question_id" ref="survey_question_odoo_continue_using_odoo" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_no" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">No</field>
- <field name="question_id" ref="survey_question_odoo_continue_using_odoo" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_odoo_continue_using_odoo" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_page_odoo_using_odoo" model="survey.page">
- <field name="title">Using Odoo</field>
- <field name="survey_id" ref="survey_odoo_feedback" />
- <field eval="3" name="sequence"/>
- </record>
- <record id="survey_question_odoo_would_you_prefer_use" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Which interface would you prefer to use?</field>
- <field name="page_id" ref="survey_page_odoo_using_odoo" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_web_interface" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">The web interface</field>
- <field name="question_id" ref="survey_question_odoo_would_you_prefer_use" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_KDE_interface" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">The rich interface (GTK or KDE)</field>
- <field name="question_id" ref="survey_question_odoo_would_you_prefer_use" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_both_interface" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Both</field>
- <field name="question_id" ref="survey_question_odoo_would_you_prefer_use" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_odoo_would_you_prefer_use" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_question_odoo_give_your_opinion" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Give your opinion :</field>
- <field name="page_id" ref="survey_page_odoo_using_odoo" />
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_appropriately_structured" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Is Odoo Website appropriately structured?</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_faq_clear_and_choicese" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Are Odoo Website FAQ clear and concise?</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_webclient_simple_and_useful" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Is OpenERP Web Client simple and useful?</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_answer_control_center_user_friendly" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Is the Control Center user-friendly?</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_column_no_opinion" model="survey.question.column.heading">
- <field name="title">No Opinion</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_not_at_all" model="survey.question.column.heading">
- <field name="title">Not at all</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_not_enough" model="survey.question.column.heading">
- <field name="title">Not enough</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_yes_but_be_better" model="survey.question.column.heading">
- <field name="title">Yes, but could be better</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Absolutely" model="survey.question.column.heading">
- <field name="title">Absolutely</field>
- <field name="question_id" ref="survey_question_odoo_give_your_opinion" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_question_odoo_give_your_opinion" model="survey.question">
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_odoo_you_think_about" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">What do you think about ... </field>
- <field name="page_id" ref="survey_page_odoo_using_odoo" />
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="in_visible_rating_weight">1</field>
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_database_new_version" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Migrating a database to a new version</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_downloadin_your_backups" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Browsing and downloading your backups</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_duplicating_database" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Duplicating a database</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_answer_monthly_hours_statistics" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Checking your monthly hours statistics</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="sequence" eval="4"/>
- </record>
- <record id="survey_answer_support_ticket" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Creating a support ticket</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="sequence" eval="5"/>
- </record>
- <record id="survey_column_think_need_new_leads" model="survey.question.column.heading">
- <field name="title">I didn't try</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_think_Hard" model="survey.question.column.heading">
- <field name="title">Hard</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_think_Difficult" model="survey.question.column.heading">
- <field name="title">Difficult</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_think_Easy" model="survey.question.column.heading">
- <field name="title">Easy</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_Very_think_Easy" model="survey.question.column.heading">
- <field name="title">Very Easy</field>
- <field name="question_id" ref="survey_question_odoo_you_think_about" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_question_odoo_you_think_about" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_odoo_modules_are_missing_in_odoo" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">In your opinion, which modules are missing in Odoo? Give examples :</field>
- <field name="page_id" ref="survey_page_odoo_using_odoo" />
- <field name="type">single_textbox</field>
- <field name="in_visible_rating_weight">1</field>
- <field name="sequence" eval="2"/>
- </record>
-
-
- <record id="survey_page_odoo_the_offer" model="survey.page">
- <field name="title">The offer</field>
- <field name="survey_id" ref="survey_odoo_feedback" />
- <field eval="4" name="sequence"/>
- </record>
-
- <record id="survey_question_odoo_would_you_prefer_receive_your_prepaid_bill" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">How often would you prefer to receive your prepaid bill?</field>
- <field name="page_id" ref="survey_page_odoo_the_offer" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_Monthly" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Monthly</field>
- <field name="question_id" ref="survey_question_odoo_would_you_prefer_receive_your_prepaid_bill" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_annually_with_discount" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Annually with 20% discount</field>
- <field name="question_id" ref="survey_question_odoo_would_you_prefer_receive_your_prepaid_bill" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_with_25_discount" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Every 2 years with 25% discount</field>
- <field name="question_id" ref="survey_question_odoo_would_you_prefer_receive_your_prepaid_bill" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_question_odoo_would_you_prefer_receive_your_prepaid_bill" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_question_odoo_dms" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Do you plan to use the document management system?</field>
- <field name="page_id" ref="survey_page_odoo_the_offer" />
- <field name="type">multiple_choice_only_one_ans</field>
- <field name="comment_field_type">text</field>
- <field name="comment_label">Comment</field>
- <field name="sequence" eval="2"/>
- <field name="is_comment_require">True</field>
- </record>
- <record id="survey_answer_YES" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Yes, I plan to use (GB)</field>
- <field name="question_id" ref="survey_question_odoo_dms" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_No" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">No</field>
- <field name="question_id" ref="survey_question_odoo_dms" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_question_odoo_dms" model="survey.question">
- <field eval="True" name="is_require_answer"/>
- </record>
-
- <record id="survey_question_odoo_support_services" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">How satisfied are you with Odoo's support services :</field>
- <field name="page_id" ref="survey_page_odoo_the_offer" />
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_answer_our_answer_is" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">The time between your question and our answer is</field>
- <field name="question_id" ref="survey_question_odoo_support_services" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_pertinence_our_answer" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">The pertinence of our answers is</field>
- <field name="question_id" ref="survey_question_odoo_support_services" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_column_offer_No_Opinion" model="survey.question.column.heading">
- <field name="title">No Opinion</field>
- <field name="question_id" ref="survey_question_odoo_support_services" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_offer_very_bad" model="survey.question.column.heading">
- <field name="title">Very Bad</field>
- <field name="question_id" ref="survey_question_odoo_support_services" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_offer_Bad" model="survey.question.column.heading">
- <field name="title">Bad</field>
- <field name="question_id" ref="survey_question_odoo_support_services" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_offer_Good" model="survey.question.column.heading">
- <field name="title">Good</field>
- <field name="question_id" ref="survey_question_odoo_support_services" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_offer_Very_Good" model="survey.question.column.heading">
- <field name="title">Very Good</field>
- <field name="question_id" ref="survey_question_odoo_support_services" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_question_odoo_support_services" model="survey.question">
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_offer_opinion_about_odoo" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">Give your opinion about Odoo's</field>
- <field name="page_id" ref="survey_page_odoo_the_offer" />
- <field name="type">matrix_of_choices_only_one_ans</field>
-
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_pricing_criteria" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Pricing criteria</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="sequence" eval="1"/>
- </record>
- <record id="survey_answer_pricing_understanding" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Pricing understanding</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="sequence" eval="2"/>
- </record>
- <record id="survey_answer_pricing_available_modules" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field name="answer">Range of available modules</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="sequence" eval="3"/>
- </record>
- <record id="survey_column_pricing_No_Opinion" model="survey.question.column.heading">
- <field name="title">No Opinion</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_pricing_very_bad" model="survey.question.column.heading">
- <field name="title">Very Bad</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_pricing_Bad" model="survey.question.column.heading">
- <field name="title">Bad</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_pricing_Good" model="survey.question.column.heading">
- <field name="title">Good</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_column_pricing_Very_Good" model="survey.question.column.heading">
- <field name="title">Very Good</field>
- <field name="question_id" ref="survey_question_offer_opinion_about_odoo" />
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- <record id="survey_question_offer_opinion_about_odoo" model="survey.question">
- <field name="required_type">at least</field>
- <field eval="1" name="req_ans"/>
- <field name="req_error_msg">This question requires an answer.</field>
- </record>
-
- <record id="survey_question_offer_comments_them_here" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field name="question">If you have any additional comments, write them here :</field>
- <field name="page_id" ref="survey_page_odoo_the_offer" />
- <field name="type">comment</field>
-
- <field name="sequence" eval="2"/>
- </record>
- </data>
- <data>
- <record id="survey_0" model="survey">
- <field eval="&quot;&quot;&quot;OpenERP Feedback&quot;&quot;&quot;" name="title"/>
- <field name="responsible_id" ref="base.user_demo"/>
- <field name="color">4</field>
- <field name="max_response_limit">20</field>
- <field name="type" ref="survey_type2"/>
- <field name="state">open</field>
- <field name="response_user">5</field>
- </record>
- </data>
- <data>
- <record id="survey_page_0" model="survey.page">
- <field eval="&quot;&quot;&quot;About your OpenERP usage&quot;&quot;&quot;" name="title"/>
- <field name="survey_id" ref="survey_0"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_page_1" model="survey.page">
- <field eval="&quot;&quot;&quot;These questions relates to the ergonomy and ease of use of OpenERP. Try to remind your firsts days on OpenERP and what have been your difficulties.&quot;&quot;&quot;" name="note"/>
- <field eval="&quot;&quot;&quot;Ergonomy and ease of use - 1&quot;&quot;&quot;" name="title"/>
- <field name="survey_id" ref="survey_0"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_page_4" model="survey.page">
- <field eval="&quot;&quot;&quot;Ergonomy of the clients&quot;&quot;&quot;" name="title"/>
- <field name="survey_id" ref="survey_0"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_page_5" model="survey.page">
- <field eval="&quot;&quot;&quot;Features&quot;&quot;&quot;" name="title"/>
- <field name="survey_id" ref="survey_0"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_page_6" model="survey.page">
- <field eval="&quot;&quot;&quot;Community and contributors&quot;&quot;&quot;" name="title"/>
- <field name="survey_id" ref="survey_0"/>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_page_7" model="survey.page">
- <field eval="&quot;&quot;&quot;If you do not contribute and develop in OpenERP, skip this page.&quot;&quot;&quot;" name="note"/>
- <field eval="&quot;&quot;&quot;Questions for developers&quot;&quot;&quot;" name="title"/>
- <field name="survey_id" ref="survey_0"/>
- <field eval="6" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_question_0" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="1" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;What do you think about the documentation available on doc.openerp.com ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;matrix_of_choices_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_1"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_1" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="2" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;What do you think about the process views of OpenERP, available in the web client ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;matrix_of_choices_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_1"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_2" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="1" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;Are you using OpenERP on a daily basis ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;multiple_choice_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_0"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
-
- <data>
- <record id="survey_question_3" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="3" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;Do you have suggestions on how to improve the process view ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;single_textbox&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_1"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- <field name="in_visible_rating_weight">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_4" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="4" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;What do you think about the structure of the menus (multiple answers allowed) ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;multiple_choice_multiple_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_1"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_5" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="2" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;If yes, which interface are you using ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;multiple_choice_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_0"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_6" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="3" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;Which modules are you using/testing?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;multiple_choice_multiple_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_0"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_7" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="1" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;How do you develop your new features ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;multiple_choice_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_7"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_8" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="1" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;How do you contribute or plan to contribute to OpenERP ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;multiple_choice_multiple_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_6"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_9" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="5" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;What do you think about the groups of users?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;matrix_of_choices_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_1"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_10" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="2" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;Do you have a proposition to help people to contribute ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;single_textbox&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_6"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- <field name="in_visible_rating_weight">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_11" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="3" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;Do you have a proposition to attract new contributors ?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;single_textbox&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_6"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- <field name="in_visible_rating_weight">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_12" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="6" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;About the groups of users installed by default&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;multiple_choice_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_1"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_13" model="survey.question">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="comment_valid_type"/>
- <field eval="7" name="sequence"/>
- <field eval="&quot;&quot;&quot;The choices need to add up to [enter sum here].&quot;&quot;&quot;" name="numeric_required_sum_err_msg"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="validation_valid_err_msg"/>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="&quot;&quot;&quot;This question requires an answer.&quot;&quot;&quot;" name="req_error_msg"/>
- <field eval="&quot;&quot;&quot;What do you think about configuration wizards?&quot;&quot;&quot;" name="question"/>
- <field eval="0" name="is_require_answer"/>
- <field eval="&quot;&quot;&quot;matrix_of_choices_only_one_ans&quot;&quot;&quot;" name="type"/>
- <field eval="&quot;&quot;&quot;The comment you entered is in an invalid format.&quot;&quot;&quot;" name="comment_valid_err_msg"/>
- <field name="page_id" ref="survey_page_1"/>
- <field eval="&quot;&quot;&quot;do_not_validate&quot;&quot;&quot;" name="validation_type"/>
- <field eval="&quot;&quot;&quot;Other&quot;&quot;&quot;" name="comment_label"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_0" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Disagree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_0"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_1" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Disagree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_0"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_2" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_0"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_3" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_0"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_4" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Disagree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_1"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_5" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Disagree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_1"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_6" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_1"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_7" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_1"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_8" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Disagree &quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_9"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_9" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Disagree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_9"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_10" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_9"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_11" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_9"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_12" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Disagree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_13"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_13" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Disagree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_13"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_14" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_13"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_15" model="survey.question.column.heading">
- <field eval="&quot;&quot;&quot;Totally Agree&quot;&quot;&quot;" name="title"/>
- <field name="question_id" ref="survey_question_13"/>
- <field name="in_visible_rating_weight">1</field>
- <field name="in_visible_menu_choice">1</field>
- </record>
- </data>
- <data>
- <record id="survey_answer_0" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I participate to discussion and forums&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_1" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I'd like to contribute but I don't know how ?&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_2" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;There is too many groups defined, security is too complex to set&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_12"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_3" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;There is too few groups defined, security isn't accurate enough&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_12"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_4" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The number of groups is good&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_12"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_5" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The GTK client&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_5"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_6" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The web interface&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_5"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_7" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The KDE client&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_5"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_8" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;At least two of them&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_5"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_9" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Yes, I use a version &lt; 5.0&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_2"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_10" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Yes, I use the 5.0 version, installed locally&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_2"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_11" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Yes, I use the latest version on Odoo&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_2"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_12" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;No, I just tested it&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_2"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_13" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Sales Management&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_14" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Purchases Management&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_15" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Financial Management&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_16" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;CRM / SRM&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_17" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Project Management&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_18" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Human Ressources&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_6"/>
- <field eval="6" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_19" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Descriptions and help tooltips are clear enough&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_13"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_20" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Configuration wizard exists for each important setting&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_13"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_21" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Extra modules proposed are relevant&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_13"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_22" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The current menu structure is good&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_23" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;It can be improved&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_24" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;They are too much menus, it's complex to understand&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_4"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_25" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I develop new features&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_26" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I help to translate&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_27" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I write documentations&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_8"/>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_28" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Running the configuration wizards is a good way to spare time&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_13"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_29" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I use Launchpad, like all official OpenERP projects&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_7"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_30" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The security rules defined on groups are helpfull&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_9"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_31" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;They are covering all objects&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_9"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_32" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;Those security rules are standard and can be used out-of-the-box in most cases&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_9"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_33" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The 'Usability/Extended View' group helps in daily work&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_9"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_34" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The 'Usability/Extended View' group hides only optional fields&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_9"/>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_35" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;The groups set on menu items are relevant&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_9"/>
- <field eval="6" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_36" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;It is up-to-date&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_0"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_37" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;It helps in the beginning&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_0"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_38" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I use the contextual help in OpenERP&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_0"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_39" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;It is complete&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_0"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_40" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;It is clear&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_0"/>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_41" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;They help new users to understand OpenERP&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_1"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_42" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;They are clean and correct&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_1"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_43" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;They are useful on a daily usage&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_1"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_44" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;A process is defined for all enterprise flows&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_1"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_45" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;It's easy to find the process you need&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_1"/>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_46" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I use another repository system (sourceforge, ...)&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_7"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_47" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I host on my own website&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_7"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_48" model="survey.answer">
- <field name="in_visible_answer_type">1</field>
- <field eval="&quot;&quot;&quot;I don't publish my developments&quot;&quot;&quot;" name="answer"/>
- <field name="question_id" ref="survey_question_7"/>
- <field eval="4" name="sequence"/>
- </record>
- </data>
-
-
-
- <data noupdate="1">
- <record id="survey_0_Community" model="survey">
- <field name="title">Community Survey</field>
- <field name="note">Please take a few minutes to complete this survey on the quality of service we provide. We welcome your feedback and appreciate your honesty. With your help, we hope to strengthen the bond between our clients.</field>
- <field eval="6" name="response_user"/>
- <field name="state">open</field>
- <field name="responsible_id" ref="base.user_root"/>
- <field eval="1" name="send_response"/>
- <field eval="[(6,0,[])]" name="users"/>
- <field name="type" ref="survey_type3"/>
- <field name="response_user">5</field>
- <field name="max_response_limit">20</field>
- </record>
- </data>
- <data>
- <record id="survey_page_0_Community" model="survey.page">
- <field name="title">Service Characteristics</field>
- <field name="survey_id" ref="survey_0_Community"/>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_page_1_Community" model="survey.page">
- <field name="title">Performance Indicator</field>
- <field name="survey_id" ref="survey_0_Community"/>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_page_2_Community" model="survey.page">
- <field name="title">Client Information</field>
- <field name="survey_id" ref="survey_0_Community"/>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_question_0_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="1" name="sequence"/>
- <field name="question">Please rank, your criteria for choosing an organization.</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_0_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_1_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="2" name="sequence"/>
- <field name="question">Please rate the following questions.</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">matrix_of_choices_only_one_ans</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_0_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_2_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="3" name="sequence"/>
- <field name="question">How would you prefer for us to provide most communications?</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="1" name="is_comment_require"/>
- <field name="type">multiple_choice_only_one_ans</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_0_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_3_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="4" name="sequence"/>
- <field name="question">What should we improve on (please be specific)?</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">comment</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_1_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_4_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="5" name="sequence"/>
- <field name="question">What do we do well?</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">comment</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_1_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_5_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="6" name="sequence"/>
- <field name="question">What are the most important challenges facing your organization this year?</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">comment</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_1_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_6_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="7" name="sequence"/>
- <field name="question">How can we help you do your job better?</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">comment</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_1_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_7_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="8" name="sequence"/>
- <field name="question">Please provide any additional comments.</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">comment</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_1_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_8_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="9" name="sequence"/>
- <field name="question">Contact information</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">multiple_textboxes_diff_type</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="0" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_2_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_9_Community" model="survey.question">
- <field name="validation_type">do_not_validate</field>
- <field name="comment_valid_type">do_not_validate</field>
- <field name="make_comment_field_err_msg">Please enter a comment.</field>
- <field name="numeric_required_sum_err_msg">The choices need to add up to [enter sum here].</field>
- <field eval="0" name="comment_column"/>
- <field name="validation_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="rating_allow_one_column_require"/>
- <field eval="0" name="is_validation_require"/>
- <field name="req_error_msg">This question requires an answer.</field>
- <field eval="10" name="sequence"/>
- <field name="question">How many years have you been a client?</field>
- <field name="comment_field_type">char</field>
- <field eval="0" name="is_require_answer"/>
- <field eval="0" name="is_comment_require"/>
- <field name="type">multiple_choice_only_one_ans</field>
- <field eval="1" name="req_ans"/>
- <field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
- <field eval="0" name="make_comment_field"/>
- <field eval="1" name="in_visible_answer_type"/>
- <field name="page_id" ref="survey_page_2_Community"/>
- <field name="required_type">at least</field>
- <field name="comment_label">Other (please specify)</field>
- <field eval="1" name="in_visible_rating_weight"/>
- <field eval="0" name="allow_comment"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_0_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Most Important</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_0_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_1_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Very Important</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_0_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_2_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Important</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_0_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_3_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Less Important</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_0_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_4_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Not Important</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_0_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_5_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Excellent</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_1_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_6_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Above Average</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_1_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_7_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Average</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_1_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_8_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Below Average</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_1_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_9_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">Poor</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_1_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_question_column_heading_10_Community" model="survey.question.column.heading">
- <field eval="0" name="in_visible_menu_choice"/>
- <field name="title">N/A</field>
- <field eval="0" name="in_visible_rating_weight"/>
- <field name="question_id" ref="survey_question_1_Community"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_0_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Email</field>
- <field name="question_id" ref="survey_question_2_Community"/>
- <field name="type">char</field>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_1_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">The quality of our responses to your questions and concerns.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_2_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">0 - 2 years</field>
- <field name="question_id" ref="survey_question_9_Community"/>
- <field name="type">char</field>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_3_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Name</field>
- <field name="question_id" ref="survey_question_8_Community"/>
- <field name="type">char</field>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_4_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Industry/marketplace knowledge</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="1" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_5_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Phone</field>
- <field name="question_id" ref="survey_question_2_Community"/>
- <field name="type">char</field>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_6_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">3 - 5 years</field>
- <field name="question_id" ref="survey_question_9_Community"/>
- <field name="type">char</field>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_7_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Length of time in business</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_8_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">The timeliness of our Representatives' response to your needs.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_9_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Company</field>
- <field name="question_id" ref="survey_question_8_Community"/>
- <field name="type">char</field>
- <field eval="2" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_10_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">The knowledge level of your Representative.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_11_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Mail</field>
- <field name="question_id" ref="survey_question_2_Community"/>
- <field name="type">char</field>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_12_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Phone number</field>
- <field name="question_id" ref="survey_question_8_Community"/>
- <field name="type">char</field>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_13_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Consultative capabilities</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_14_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">6 - 10 years</field>
- <field name="question_id" ref="survey_question_9_Community"/>
- <field name="type">char</field>
- <field eval="3" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_15_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">10 + years</field>
- <field name="question_id" ref="survey_question_9_Community"/>
- <field name="type">char</field>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_16_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Your Representative keeps you informed of changes.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_17_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Face-to-Face</field>
- <field name="question_id" ref="survey_question_2_Community"/>
- <field name="type">char</field>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_18_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Technology and Tools provided</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_19_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Email address</field>
- <field name="question_id" ref="survey_question_8_Community"/>
- <field name="type">email</field>
- <field eval="4" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_20_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Other</field>
- <field name="question_id" ref="survey_question_2_Community"/>
- <field name="type">char</field>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_21_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Personal Referral</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_22_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">How is our ability to anticipate your needs and provide assistance pro actively.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="5" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_23_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Lowest rate</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="6" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_24_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Our products and services we provide meet your objectives.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="6" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_25_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Responsiveness to requests</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="7" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_26_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">We are easy to work with.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="7" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_27_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Value-added services</field>
- <field name="question_id" ref="survey_question_0_Community"/>
- <field name="type">char</field>
- <field eval="8" name="sequence"/>
- </record>
- </data>
- <data>
- <record id="survey_answer_28_Community" model="survey.answer">
- <field eval="0" name="in_visible_answer_type"/>
- <field name="answer">Overall, how do you rank our services to you.</field>
- <field name="question_id" ref="survey_question_1_Community"/>
- <field name="type">char</field>
- <field eval="8" name="sequence"/>
- </record>
- </data>
-
- <!-- Survey Response -->
-
- <data noupdate="1">
- <record id="survey_history_0" model="survey.history">
- <field name="date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
- <field name="survey_id" ref="survey.survey_partner_feedback"/>
- <field name="user_id" ref="base.user_root"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_history_1" model="survey.history">
- <field name="date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
- <field name="survey_id" ref="survey.survey_odoo_feedback"/>
- <field name="user_id" ref="base.user_root"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_0" model="survey.response">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.603599'"/>
- <field name="state">done</field>
- <field name="survey_id" ref="survey.survey_partner_feedback"/>
- <field name="user_id" ref="base.user_root"/>
- <field name="response_type">link</field>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_1" model="survey.response">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.247905'"/>
- <field name="state">done</field>
- <field name="survey_id" ref="survey.survey_odoo_feedback"/>
- <field name="user_id" ref="base.user_root"/>
- <field name="response_type">link</field>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_0" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.631622'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_your_customers"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_1" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.653849'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_located"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_2" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.671836'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_company_size"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_3" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.689999'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_offical_partner"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_4" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.706175'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="single_text">OpenERP SA</field>
- <field name="question_id" ref="survey.survey_question_company_name"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_5" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.087116'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_partnership_contract"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_6" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.107571'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_contract_customers"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_7" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.126023'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_sell_to_your_customers"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_8" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.844451'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_partners_about"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_9" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.872224'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_launchpad_reporting"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_10" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.897764'"/>
- <field name="state">skip</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_partners_on_which_subjects"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_11" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.918989'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_0"/>
- <field name="question_id" ref="survey.survey_question_Leads"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_12" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.27459'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_discover_odoo"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_13" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.301461'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_company_sector"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_14" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.33203'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="single_text">OpenERP SA</field>
- <field name="question_id" ref="survey.survey_question_odoo_company_name"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_15" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.35911'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_mange_with_odoo"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_16" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.376172'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_continue_using_odoo"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_17" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.397675'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_subscribe_to_odoo"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_18" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.414119'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_configure_the_application"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_19" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.637519'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_would_you_prefer_use"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_20" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.653091'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="single_text">survey</field>
- <field name="question_id" ref="survey.survey_question_odoo_modules_are_missing_in_odoo"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_21" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.669619'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_give_your_opinion"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_22" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.691933'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_you_think_about"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_23" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.47899'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_dms"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_24" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.501274'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_offer_opinion_about_odoo"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_25" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.523878'"/>
- <field name="state">skip</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_offer_comments_them_here"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_26" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.538988'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_would_you_prefer_receive_your_prepaid_bill"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_line_27" model="survey.response.line">
- <field name="date_create" eval="time.strftime('%Y-%m-%d %H:%M:%S')+'.555196'"/>
- <field name="state">done</field>
- <field name="response_id" ref="survey_response_1"/>
- <field name="question_id" ref="survey.survey_question_odoo_support_services"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_0" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_0"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_answer_saas_services"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_1" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_0"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_answer_specific_devlopments"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_2" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_0"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_answer_with_specific_devlopments"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_3" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_1"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_company_size_Europ"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_4" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_1"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_company_size_Asia"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_5" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_2"/>
- <field name="answer_id" ref="survey.survey_question_company_size_51"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_6" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_3"/>
- <field name="answer_id" ref="survey.survey_question_company_size_before_2006"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_7" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_5"/>
- <field name="answer_id" ref="survey.survey_answer_Clear"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_8" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_6"/>
- <field name="answer_id" ref="survey.survey_answer_sometimes"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_9" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_7"/>
- <field name="answer_id" ref="survey.survey_answer_maintenance_contract"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_10" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_Good"/>
- <field name="response_id" ref="survey_response_line_8"/>
- <field name="answer_id" ref="survey.survey_answer_Maintenance_contracts"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_11" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_Very_Good"/>
- <field name="response_id" ref="survey_response_line_8"/>
- <field name="answer_id" ref="survey.survey_answer_partner_Leads"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_12" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_Very_Good"/>
- <field name="response_id" ref="survey_response_line_8"/>
- <field name="answer_id" ref="survey.survey_answer_Training_sessions"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_13" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_yes_but_could_better"/>
- <field name="response_id" ref="survey_response_line_9"/>
- <field name="answer_id" ref="survey.survey_answer_modify_a_translation"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_14" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_No"/>
- <field name="response_id" ref="survey_response_line_9"/>
- <field name="answer_id" ref="survey.survey_answer_bug_or_blueprint"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_15" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_yes_but_could_better"/>
- <field name="response_id" ref="survey_response_line_9"/>
- <field name="answer_id" ref="survey.survey_answer_find_openobject_website1"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_16" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_Easy"/>
- <field name="response_id" ref="survey_response_line_11"/>
- <field name="answer_id" ref="survey.survey_answer_converted_in_customers"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_17" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_Very_Easy"/>
- <field name="response_id" ref="survey_response_line_11"/>
- <field name="answer_id" ref="survey.survey_answer_find_openobject_website"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_18" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_12"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_OpenERP_website"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_19" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_13"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Other_sector"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_20" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_13"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Services"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_21" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_13"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_HR"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_22" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_13"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Engineering"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_23" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_15"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Customer_Accounting_Finance"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_24" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_15"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Customer_Relationship_Management"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_25" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_15"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Sales_Purchases"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_26" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_15"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Customer_Human_Resources"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_27" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_15"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Other_odoo_mange_with_odoo"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_28" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_15"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Project_Management"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_29" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_15"/>
- <field name="answer">1</field>
- <field name="answer_id" ref="survey.survey_question_Customer_inventory_Management"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_30" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_16"/>
- <field name="answer_id" ref="survey.survey_answer_yes"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_31" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_17"/>
- <field name="answer_id" ref="survey.survey_answer_switch_to_online_offer1"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_32" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_couple_of_hours"/>
- <field name="response_id" ref="survey_response_line_18"/>
- <field name="answer_id" ref="survey.survey_answer_importing_my_data"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_33" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_couple_of_minutes"/>
- <field name="response_id" ref="survey_response_line_18"/>
- <field name="answer_id" ref="survey.survey_answer_initial_data"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_34" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_couple_of_minutes"/>
- <field name="response_id" ref="survey_response_line_18"/>
- <field name="answer_id" ref="survey.survey_answer_switch_to_online_offer"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_35" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_couple_of_hours"/>
- <field name="response_id" ref="survey_response_line_18"/>
- <field name="answer_id" ref="survey.survey_answer_configuring_the_modules"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_36" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_couple_of_hours"/>
- <field name="response_id" ref="survey_response_line_18"/>
- <field name="answer_id" ref="survey.survey_answer_adding_modules_need"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_37" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_19"/>
- <field name="answer_id" ref="survey.survey_answer_both_interface"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_38" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_yes_but_be_better"/>
- <field name="response_id" ref="survey_response_line_21"/>
- <field name="answer_id" ref="survey.survey_answer_faq_clear_and_choicese"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_39" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_no_opinion"/>
- <field name="response_id" ref="survey_response_line_21"/>
- <field name="answer_id" ref="survey.survey_answer_webclient_simple_and_useful"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_40" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_Absolutely"/>
- <field name="response_id" ref="survey_response_line_21"/>
- <field name="answer_id" ref="survey.survey_answer_control_center_user_friendly"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_41" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_no_opinion"/>
- <field name="response_id" ref="survey_response_line_21"/>
- <field name="answer_id" ref="survey.survey_answer_appropriately_structured"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_42" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_think_Easy"/>
- <field name="response_id" ref="survey_response_line_22"/>
- <field name="answer_id" ref="survey.survey_answer_downloadin_your_backups"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_43" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_think_Difficult"/>
- <field name="response_id" ref="survey_response_line_22"/>
- <field name="answer_id" ref="survey.survey_answer_duplicating_database"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_44" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_think_Easy"/>
- <field name="response_id" ref="survey_response_line_22"/>
- <field name="answer_id" ref="survey.survey_answer_database_new_version"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_45" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_23"/>
- <field name="answer_id" ref="survey.survey_answer_No"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_46" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_pricing_No_Opinion"/>
- <field name="response_id" ref="survey_response_line_24"/>
- <field name="answer_id" ref="survey.survey_answer_pricing_understanding"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_47" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_pricing_Very_Good"/>
- <field name="response_id" ref="survey_response_line_24"/>
- <field name="answer_id" ref="survey.survey_answer_pricing_available_modules"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_48" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_pricing_Good"/>
- <field name="response_id" ref="survey_response_line_24"/>
- <field name="answer_id" ref="survey.survey_answer_pricing_criteria"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_49" model="survey.response.answer">
- <field name="response_id" ref="survey_response_line_26"/>
- <field name="answer_id" ref="survey.survey_answer_Monthly"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_50" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_offer_Very_Good"/>
- <field name="response_id" ref="survey_response_line_27"/>
- <field name="answer_id" ref="survey.survey_answer_pertinence_our_answer"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="survey_response_answer_51" model="survey.response.answer">
- <field name="column_id" ref="survey.survey_column_offer_Good"/>
- <field name="response_id" ref="survey_response_line_27"/>
- <field name="answer_id" ref="survey.survey_answer_our_answer_is"/>
- </record>
- </data>
-
-</openerp>
diff --git a/addons/survey/survey_report.xml b/addons/survey/survey_report.xml
deleted file mode 100644
index 647be4c26c5..00000000000
--- a/addons/survey/survey_report.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
-
- <report auto="False"
- id="report_survey_form"
- model="survey"
- name="survey.form"
- string="Survey"/>
-
- <report auto="True"
- id="survey_analysis"
- model="survey"
- name="survey.analysis"
- rml=""
- string="Survey Statistics"/>
-
- <report auto="True"
- id="survey_browse_response"
- model="survey"
- name="survey.browse.response"
- rml=""
- string="Survey Answers"/>
- </data>
-</openerp>
diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml
deleted file mode 100644
index 2c43364871d..00000000000
--- a/addons/survey/survey_view.xml
+++ /dev/null
@@ -1,1258 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data>
- <!-- Top menu item -->
- <menuitem name="Tools" id="base.menu_tools" sequence="120" groups="base.group_tool_user"/>
-
- <menuitem name="Surveys" id="menu_surveys" parent="base.menu_tools" sequence="2" groups="base.group_tool_user,base.group_tool_manager,base.group_survey_user"/>
-
- <menuitem name="Reporting" parent="base.menu_tools"
- id="base.menu_lunch_reporting" sequence="6"/>
- <menuitem name="Reporting" id="menu_reporting" parent="menu_surveys" sequence="60"/>
- <menuitem id="base.next_id_10" name="Survey" parent="base.menu_reporting" sequence="1" groups="base.group_survey_user"/>
-
- <!--
- Survey
- -->
-
- <record model="ir.ui.view" id="survey_form">
- <field name="name">survey_form</field>
- <field name="model">survey</field>
- <field name="arch" type="xml">
- <form string="Survey" version="7.0">
- <header>
- <button name="survey_open" string="Open" states="cancel,close" type="object"/>
- <button name="survey_close" string="Close" states="open" type="object" class="oe_highlight"/>
- <button name="survey_cancel" string="Cancel Survey" states="open" type="object"/>
- <field name="state" widget="statusbar" statusbar_visible="open,close"/>
- </header>
- <sheet>
- <div class="oe_button_box oe_right">
- <button name="test_survey" states="open,draft,close,cancel" string="Test Survey" type="object" icon="gtk-new" context="{'survey_id': active_id}" attrs="{'invisible':[('id','=',0)]}"/>
- <button name="fill_survey" states="open" string="Answer Survey" type="object" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
- <button name="action_print_survey" states="open,draft,close,cancel" string="Print Answer" type="object"/>
- <button name="edit_survey" states="open,draft,close,cancel"
- string="Edit Survey" type="object" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
-
- </div>
- <div class="oe_title">
- <label for="title" class="oe_edit_only"/>
- <h1>
- <field name="title" attrs="{'readonly':[('state','=','close')]}"/>
- </h1>
- </div>
- <group>
- <group>
- <field name="id" invisible="1"/>
- <field name="responsible_id" class="oe_inline" attrs="{'readonly':[('state','=','close')]}" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_survey_user', 'base.group_tool_manager']}"/>
- <field name="type" attrs="{'readonly':[('state','=','close')]}" class="oe_inline"/>
- <field name="send_response" attrs="{'readonly':[('state','=','close')]}"/>
- </group>
- <group>
- <field name="max_response_limit" attrs="{'readonly':[('state','=','close')]}"/>
- <field name="response_user" attrs="{'readonly':[('state','=','close')]}"/>
- </group>
- </group>
- <notebook>
- <page string="Survey Details">
- <field name="page_ids" colspan="4" mode="tree" attrs="{'readonly':[('state','=','close')]}">
- <form string="Survey Page" version="7.0">
- <sheet>
- <label for="title" class="oe_edit_only"/>
- <h1>
- <field name="title"/>
- </h1>
- <field name="note" placeholder="Description on the survey page..."/>
- <newline/>
- <group>
- <label for="question_ids"/>
- <newline/>
- <field name="question_ids" nolabel="1">
- <form string="Survey Question">
- <group>
- <group>
- <field name="question"/>
- <field name="type" on_change="on_change_type(type)"/>
- </group>
- </group>
- <newline/>
- <group>
- <field name="in_visible_rating_weight" invisible="1"/>
- <field name="in_visible_menu_choice" invisible="1"/>
- <field name="in_visible_answer_type" invisible="1"/>
- <notebook colspan="4">
- <page string="Options">
- <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}" string="Answer">
- <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
- <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'in_visible_answer_type': in_visible_answer_type}"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
- <field name="column_heading_ids" colspan="4" nolabel="1" context="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
- <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
- <field name="no_of_rows"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
- <separator string="Comment Field" colspan="4"/>
- <group colspan="4">
- <field name="is_comment_require"/>
- </group>
- <group attrs="{'invisible':[('is_comment_require','=',False)]}">
- <group col="4" colspan="4">
- <field name="comment_field_type" colspan="1"/>
- <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field colspan="2" name="comment_label" />
- </group>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field name="comment_valid_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
- <field name="comment_minimum_no" string="Between"/>
- <field name="comment_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
- <field name="comment_minimum_float" string="Between"/>
- <field name="comment_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
- <field name="comment_minimum_date" string="Between"/>
- <field name="comment_maximum_date" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
- <field name="comment_column"/>
- <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
- <field name="column_name" colspan="2"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
- <separator string="Validation" colspan="4"/>
- <group colspan="4">
- <field name="is_validation_require"/>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
- <field name="validation_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
- <field name="validation_minimum_no" string="Between"/>
- <field name="validation_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
- <field name="validation_minimum_float" string="Between"/>
- <field name="validation_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
- <field name="validation_minimum_date" string="Between"/>
- <field name="validation_maximum_date" string="and"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment'),('type','!=','multiple_textboxes_diff_type')]}">
- <separator string="Required Answer" colspan="4"/>
- <newline/>
- <field name="is_require_answer"/>
- <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
- <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','multiple_textboxes_diff_type')]}">
- <field name="required_type"/>
- <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
- <field name="req_ans" />
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
- <field name="minimum_req_ans"/>
- <field name="maximum_req_ans"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
- <label string="When the question is not answered, display this error message:"/>
- <field name="req_error_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
- <group colspan="2" >
- <field name="numeric_required_sum"/>
- </group>
- <newline/>
- <label string="When the choices do not add up correctly, display this error message"/>
- <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
- <field name="rating_allow_one_column_require"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
- <separator string="Descriptive Text" colspan="4"/>
- <field name="descriptive_text" colspan="4" nolabel="1"/>
- </group>
- </page>
- </notebook>
- </group>
- </form>
- <tree string="Survey Question">
- <field name="sequence" string="Seq"/>
- <field name="question"/>
- <field name="answer_choice_ids"/>
- </tree>
- </field>
- </group>
- </sheet>
- </form>
- </field>
- <field name="note" placeholder="Survey description..." attrs="{'readonly':[('state','=','close')]}"/>
- </page>
- <page string="Invited User">
- <field name="invited_user_ids" readonly="1"/>
- </page>
- <page string="History">
- <group>
- <group>
- <field name="date_open"/>
- <field name="date_close"/>
- </group>
- <group>
- <field name="tot_start_survey"/>
- <field name="tot_comp_survey"/>
- </group>
- </group>
- <field name="history" colspan="4">
- <tree string="History">
- <field name="date"/>
- <field name="user_id"/>
- </tree>
- <form string="History">
- <field name="date"/>
- <field name="user_id"/>
- </form>
- </field>
- </page>
- </notebook>
- </sheet>
- </form>
- </field>
- </record>
-
- <record model ="ir.ui.view" id= "survey_tree">
- <field name="name">survey_tree</field>
- <field name="model">survey</field>
- <field name="arch" type="xml">
- <tree colors="gray:state == 'close'" string="Survey">
- <field name="title"/>
- <field name="type"/>
- <field name="responsible_id"/>
- <field name="date_open" string="Open Date"/>
- <field name="tot_start_survey" string="Started"/>
- <field name="tot_comp_survey" string="Completed"/>
- <field name="state"/>
- <button name="test_survey" states="open,draft,close,cancel"
- string="Test Survey" type="object" icon="gtk-new"
- context="{'survey_id': active_id}"/>
- <button name="fill_survey" states="open"
- string="Answer Survey" type="object" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
- <button name="action_print_survey" states="open,draft,close,cancel"
- string="Print Answer" type="object" icon="gtk-print"/>
- </tree>
- </field>
- </record>
-
- <record id="survey_search" model="ir.ui.view">
- <field name="name">survey_search</field>
- <field name="model">survey</field>
- <field name="arch" type="xml">
- <search string="Search Survey">
- <field name="title" string="Survey"/>
- <field name="type"/>
- <filter icon="terp-document-new" string="New" domain="[('state','=', 'draft')]" help="All New Survey"/>
- <filter icon="terp-camera_test" string="Open" domain="[('state','=','open')]" help="All Open Survey"/>
- <separator/>
- <filter string="My Survey(s)" icon="terp-personal" domain="[('responsible_id','=',uid)]" help="My Survey(s)"/>
- <field name="responsible_id"/>
- <group expand="0" string="Group By...">
- <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'responsible_id'}"/>
- <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
- <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
- </group>
- </search>
- </field>
- </record>
-
- <record model="ir.ui.view" id="view_survey_kanban">
- <field name="name">event.survey.kanban</field>
- <field name="model">survey</field>
- <field name="arch" type="xml">
- <kanban>
- <field name="title"/>
- <field name="date_open"/>
- <field name="tot_comp_survey"/>
- <field name="max_response_limit"/>
- <field name="responsible_id"/>
- <field name="color"/>
- <templates>
- <t t-name="kanban-box">
- <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_survey">
- <div class="oe_dropdown_toggle oe_dropdown_kanban">
- <span class="oe_e">i</span>
- <ul class="oe_dropdown_menu">
- <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
- <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
- <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
- </ul>
- </div>
- <div class="oe_kanban_content">
- <h3 class="oe_kanban_ellipsis"><t t-esc="record.title.raw_value.toString()"></t></h3>
- <div>
- Answers: <field name="tot_comp_survey"/>
- <t t-if="record.max_response_limit.raw_value > 0"> / <field name="max_response_limit"/></t>
- </div>
- <br/>
- <a name="fill_survey" type="object">Answer Survey</a>
- <img t-att-src="kanban_image('res.users', 'image_small', record.responsible_id.raw_value)" t-att-title="record.responsible_id.value" width="24" height="24" class="oe_kanban_avatar oe_right"/>
- </div>
- </div>
- </t>
- </templates>
- </kanban>
- </field>
- </record>
-
- <record model="ir.actions.act_window" id="action_survey_form1">
- <field name="name">Surveys</field>
- <field name="res_model">survey</field>
- <field name="view_type">form</field>
- <field name="view_mode">kanban,tree,form</field>
- <field name="view_id" ref="view_survey_kanban"></field>
- <field name="search_view_id" ref="survey_search"/>
- <field name="help" type="html">
- <p class="oe_view_nocontent_create">
- Click to create a new survey.
- </p><p>
- You can create survey for different purposes: recruitment
- interviews, employee's periodical evaluations, marketing
- campaigns, etc.
- </p><p>
- A survey is made of pages containing questions
- of several types: text, multiple choices, etc.
- </p>
- </field>
- </record>
-
-
- <menuitem name="Surveys" id="menu_survey_form"
- action="action_survey_form1" parent="menu_surveys"
- groups="base.group_tool_manager" sequence="1"/>
-
- <!--
- Survey Pages
- -->
-
- <record model="ir.ui.view" id="survey_page_form">
- <field name="name">survey_page_form</field>
- <field name="model">survey.page</field>
- <field name="arch" type="xml">
- <form string="Survey Page" version="7.0">
- <sheet>
- <label for="title" class="oe_edit_only"/>
- <h1>
- <field name="title"/>
- </h1>
- <group colspan="4">
- <field name="survey_id"/>
- <field name="sequence"/>
- </group>
- <group colspan="4">
- <field name="note" nolabel="1" placeholder="Description on the survey page..."/>
- </group>
- <group col="4">
- <label for="question_ids"/>
- <newline/>
- <field name="question_ids" nolabel="1">
- <form string="Survey Question">
- <group>
- <group>
- <field name="question" select="1"/>
- <field name="type" on_change="on_change_type(type)"/>
- </group>
- <group>
- <field name="sequence" invisible="1"/>
- <field name="tot_resp" invisible="1"/>
- <field name="in_visible_rating_weight" invisible="1"/>
- <field name="in_visible_menu_choice" invisible="1"/>
- <field name="in_visible_answer_type" invisible="1"/>
- </group>
- <newline/>
- <notebook colspan="4">
- <page string="Options">
- <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}" string="Answer" col="4">
- <group attrs="{'invisible':[('type','=','table')]}">
- <field name="answer_choice_ids" nolabel="1" context="{'in_visible_answer_type': in_visible_answer_type}"/>
- </group>
- <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
- <field name="column_heading_ids" nolabel="1" context="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
- <group attrs="{'invisible':[('type','!=','table')]}">
- <field name="no_of_rows"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}" string="Comment Field" col="4">
- <group>
- <field name="is_comment_require"/>
- </group>
- <group attrs="{'invisible':[('is_comment_require','=',False)]}">
- <group>
- <field name="comment_field_type" colspan="1"/>
- <group attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field name="comment_label" />
- </group>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field name="comment_valid_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
- <field name="comment_minimum_no" string="Between"/>
- <field name="comment_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
- <field name="comment_minimum_float" string="Between"/>
- <field name="comment_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
- <field name="comment_minimum_date" string="Between"/>
- <field name="comment_maximum_date" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
- <field name="comment_column"/>
- <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
- <field name="column_name" colspan="2"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
- <separator string="Validation" colspan="4"/>
- <group colspan="4">
- <field name="is_validation_require"/>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
- <field name="validation_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
- <field name="validation_minimum_no" string="Between"/>
- <field name="validation_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
- <field name="validation_minimum_float" string="Between"/>
- <field name="validation_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
- <field name="validation_minimum_date" string="Between"/>
- <field name="validation_maximum_date" string="and"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment'),('type','!=','multiple_textboxes_diff_type')]}">
- <separator string="Required Answer" colspan="4"/>
- <newline/>
- <field name="is_require_answer"/>
- <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
- <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','multiple_textboxes_diff_type')]}">
- <field name="required_type"/>
- <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
- <field name="req_ans" />
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
- <field name="minimum_req_ans"/>
- <field name="maximum_req_ans"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
- <label string="When the question is not answered, display this error message:"/>
- <field name="req_error_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
- <group colspan="2">
- <field name="numeric_required_sum"/>
- </group>
- <newline/>
- <label string="When the choices do not add up correctly, display this error message"/>
- <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
- <field name="rating_allow_one_column_require"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
- <separator string="Descriptive Text" colspan="4"/>
- <field name="descriptive_text" colspan="4" nolabel="1"/>
- </group>
- </page>
- </notebook>
- </group>
- </form>
- <tree string="Survey Question">
- <field name="sequence" string="Seq"/>
- <field name="question"/>
- <field name="answer_choice_ids"/>
- </tree>
- </field>
- </group>
- </sheet>
- </form>
- </field>
- </record>
-
-
- <record model="ir.ui.view" id="survey_page_tree">
- <field name="name">survey_page_tree</field>
- <field name="model">survey.page</field>
- <field name="arch" type="xml">
- <tree string="Survey Page">
- <field name="sequence" string="Seq"/>
- <field name="title"/>
- <field name="survey_id"/>
- <field name="question_ids" string="#Questions"/>
- </tree>
- </field>
- </record>
-
- <record id="view_survey_page_filter" model="ir.ui.view">
- <field name="name">survey.page.list.select</field>
- <field name="model">survey.page</field>
- <field name="arch" type="xml">
- <search string="Search Survey Page">
- <field name="title" string="Page"/>
- <field name="survey_id"/>
- <group expand="0" string="Group By...">
- <filter string="Survey" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'survey_id'}"/>
- </group>
- </search>
- </field>
- </record>
-
- <record model="ir.actions.act_window" id="action_survey_page_form">
- <field name="name">Survey Pages</field>
- <field name="res_model">survey.page</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="view_id" ref="survey_page_tree"></field>
- </record>
-
- <menuitem name="Survey Pages" id="menu_survey_page_form1"
- action="action_survey_page_form" parent="menu_surveys"
- groups="base.group_no_one"/>
-
- <record model="ir.ui.view" id="survey_page_wizard_test1">
- <field name="name">survey_page_wizard_test</field>
- <field name="model">survey.page</field>
- <field name="priority">20</field>
- <field name="arch" type="xml">
- <form string="Survey Pages">
- <field name="title" colspan="4"/>
- <field name="sequence"/>
- <separator string="Description" colspan="4"/>
- <field name="note" colspan="4" nolabel="1"/>
- <group colspan="4">
- <label string="" colspan="3"/>
- <button name="survey_save" string="Ok" type="object" icon="gtk-go-forward"/>
- </group>
- </form>
- </field>
- </record>
-
- <!--
- Survey Question
- -->
-
- <record model="ir.ui.view" id="survey_question_form">
- <field name="name">survey_question_form</field>
- <field name="model">survey.question</field>
- <field name="arch" type="xml">
- <form string="Survey Question">
- <field name="question" colspan="4"/>
- <field name="page_id"/>
- <field name="sequence"/>
- <field name="tot_resp"/>
- <field name="type" on_change="on_change_type(type)"/>
- <field name="in_visible_rating_weight" invisible="1"/>
- <field name="in_visible_menu_choice" invisible="1"/>
- <field name="in_visible_answer_type" invisible="1"/>
- <notebook colspan="4">
- <page string="Options">
- <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}">
- <separator string="Answer" colspan="4"/>
- <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
- <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'in_visible_answer_type': in_visible_answer_type}"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
- <field name="column_heading_ids" colspan="4" nolabel="1" context="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
- <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
- <field name="no_of_rows"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
- <separator string="Comment Field" colspan="4"/>
- <group colspan="4">
- <field name="is_comment_require"/>
- </group>
- <group attrs="{'invisible':[('is_comment_require','=',False)]}">
- <group col="4" colspan="4">
- <field name="comment_field_type" colspan="1"/>
- <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field colspan="2" name="comment_label" />
- </group>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field name="comment_valid_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
- <field name="comment_minimum_no" string="Between"/>
- <field name="comment_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
- <field name="comment_minimum_float" string="Between"/>
- <field name="comment_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
- <field name="comment_minimum_date" string="Between"/>
- <field name="comment_maximum_date" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
- <field name="comment_column"/>
- <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
- <field name="column_name" colspan="2"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
- <separator string="Validation" colspan="4"/>
- <group colspan="4">
- <field name="is_validation_require"/>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
- <field name="validation_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
- <field name="validation_minimum_no" string="Between"/>
- <field name="validation_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
- <field name="validation_minimum_float" string="Between"/>
- <field name="validation_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
- <field name="validation_minimum_date" string="Between"/>
- <field name="validation_maximum_date" string="and"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment'),('type','!=','multiple_textboxes_diff_type')]}">
- <separator string="Required Answer" colspan="4"/>
- <newline/>
- <field name="is_require_answer"/>
- <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
- <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','multiple_textboxes_diff_type')]}">
- <field name="required_type"/>
- <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
- <field name="req_ans" />
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
- <field name="minimum_req_ans"/>
- <field name="maximum_req_ans"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
- <label string="When the question is not answered, display this error message:"/>
- <field name="req_error_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
- <group colspan="2" >
- <field name="numeric_required_sum"/>
- </group>
- <newline/>
- <label string="When the choices do not add up correctly, display this error message"/>
- <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
- <field name="rating_allow_one_column_require"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
- <separator string="Descriptive Text" colspan="4"/>
- <field name="descriptive_text" colspan="4" nolabel="1"/>
- </group>
- </page>
- </notebook>
- </form>
- </field>
- </record>
-
- <record model="ir.ui.view" id="survey_question_tree">
- <field name="name">survey_question_tree</field>
- <field name="model">survey.question</field>
- <field name="arch" type="xml">
- <tree string="Survey Question">
- <field name="sequence" string="Seq"/>
- <field name="question"/>
- <field name="page_id"/>
- <field name="survey"/>
- <field name="type"/>
- </tree>
- </field>
- </record>
-
- <record id="survey_question_search" model="ir.ui.view">
- <field name="name">survey_question_search</field>
- <field name="model">survey.question</field>
- <field name="arch" type="xml">
- <search string="Search Question">
- <field name="question" string="Question"/>
- <field name="survey"/>
- <field name="type"/>
- <field name="page_id"/>
- <group expand="0" string="Group By...">
- <filter string="Page" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'page_id'}"/>
- </group>
- </search>
- </field>
- </record>
-
- <record model="ir.actions.act_window" id="action_survey_question_form">
- <field name="name">Survey Questions</field>
- <field name="res_model">survey.question</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="view_id" ref="survey_question_tree"></field>
- <field name="search_view_id" ref="survey_question_search"/>
- </record>
-
- <record model="ir.ui.view" id="survey_question_wizard_test">
- <field name="name">survey_question_wizard_test</field>
- <field name="model">survey.question</field>
- <field name="priority">20</field>
- <field name="arch" type="xml">
- <form string="Survey Question">
- <field name="question" colspan="4"/>
- <field name="page_id"/>
- <field name="sequence"/>
- <field name="tot_resp"/>
- <field name="type" on_change="on_change_type(type)"/>
- <field name="in_visible_rating_weight" invisible="1"/>
- <field name="in_visible_menu_choice" invisible="1"/>
- <field name="in_visible_answer_type" invisible="1"/>
- <notebook colspan="4">
- <page string="Options">
- <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}">
- <separator string="Answer" colspan="4"/>
- <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
- <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'in_visible_answer_type': in_visible_answer_type}"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
- <field name="column_heading_ids" colspan="4" nolabel="1" context="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
- <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
- <field name="no_of_rows"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
- <separator string="Comment Field" colspan="4"/>
- <group colspan="4">
- <field name="is_comment_require"/>
- </group>
- <group attrs="{'invisible':[('is_comment_require','=',False)]}">
- <group col="4" colspan="4">
- <field name="comment_field_type" colspan="1"/>
- <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field colspan="2" name="comment_label" />
- </group>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
- <field name="comment_valid_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
- <field name="comment_minimum_no" string="Between"/>
- <field name="comment_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
- <field name="comment_minimum_float" string="Between"/>
- <field name="comment_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
- <field name="comment_minimum_date" string="Between"/>
- <field name="comment_maximum_date" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
- <field name="comment_column"/>
- <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
- <field name="column_name" colspan="2"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
- <separator string="Validation" colspan="4"/>
- <group colspan="4">
- <field name="is_validation_require"/>
- </group>
- <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
- <field name="validation_type" colspan="2"/>
- <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
- <field name="validation_minimum_no" string="Between"/>
- <field name="validation_maximum_no" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
- <field name="validation_minimum_float" string="Between"/>
- <field name="validation_maximum_float" string="and"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
- <field name="validation_minimum_date" string="Between"/>
- <field name="validation_maximum_date" string="and"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
- <label string="When the comment is an invalid format, display this error message" colspan="4"/>
- <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment'),('type','!=','multiple_textboxes_diff_type')]}">
- <separator string="Required Answer" colspan="4"/>
- <newline/>
- <field name="is_require_answer"/>
- <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
- <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','multiple_textboxes_diff_type')]}">
- <field name="required_type"/>
- <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
- <field name="req_ans" />
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
- <field name="minimum_req_ans"/>
- <field name="maximum_req_ans"/>
- </group>
- </group>
- <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
- <label string="When the question is not answered, display this error message:"/>
- <field name="req_error_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
- <group colspan="2" >
- <field name="numeric_required_sum"/>
- </group>
- <newline/>
- <label string="When the choices do not add up correctly, display this error message"/>
- <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
- <field name="rating_allow_one_column_require"/>
- </group>
- </group>
- </group>
- <newline/>
- <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
- <separator string="Descriptive Text" colspan="4"/>
- <field name="descriptive_text" colspan="4" nolabel="1"/>
- </group>
- </page>
- </notebook>
- <group colspan="4">
- <label string="" colspan="3"/>
- <button name="survey_save" string="Ok" type="object" icon="gtk-go-forward"/>
- </group>
- </form>
- </field>
- </record>
-
- <!--
- Survey Answer
- -->
-
- <record model ="ir.ui.view" id="survey_answer_form">
- <field name="name">survey_answer_form</field>
- <field name="model">survey.answer</field>
- <field name="arch" type="xml">
- <form string="Survey Answer">
- <field name="answer" colspan="4"/>
- <field name="sequence"/>
- <field name="in_visible_answer_type" invisible="1"/>
- <group colspan="4" attrs="{'invisible':[('in_visible_answer_type','=',True)]}">
- <field name="type" colspan="2"/>
- <group colspan="4" attrs="{'invisible':[('type','!=','selection')]}">
- <separator string="Menu Choices (each choice on separate by lines)" colspan="4"/>
- <field name="menu_choice" colspan="4" nolabel="1"/>
- </group>
- </group>
- </form>
- </field>
- </record>
-
-
- <record model="ir.ui.view" id= "survey_answer_tree">
- <field name="name">survey_answer_tree</field>
- <field name="model">survey.answer</field>
- <field name="arch" type="xml">
- <tree editable="bottom" string="Survey Answer">
- <field name="sequence" string="Seq"/>
- <field name="answer"/>
- <field name="type"/>
- </tree>
- </field>
- </record>
-
- <!--
- Survey Response Line
- -->
-
- <record model ="ir.ui.view" id= "survey_response_line_form">
- <field name="name">survey_response_line_form</field>
- <field name="model">survey.response.line</field>
- <field name="arch" type="xml">
- <form string="Survey Answer">
- <field name="question_id"/>
- <field name="date_create"/>
- <notebook colspan="4">
- <page string="Answer">
- <field name="response_answer_ids" colspan="4" nolabel="1"/>
- <group col="5" colspan="4">
- <field name="state"/>
- </group>
- </page>
- <page string="Single Textboxes">
- <field name="single_text" colspan="4"/>
- </page>
- <page string="Comment">
- <separator string="Description" colspan="4"/>
- <field name="comment" nolabel="1" colspan="4"/>
- </page>
- <page string="Table Answer">
- <field name="response_table_ids" colspan="4" nolabel="1">
- <form string="Table">
- <field name="column_id"/>
- <field name="name"/>
- <field name="value"/>
- </form>
- <tree string="Table">
- <field name="column_id"/>
- <field name="name"/>
- <field name="value"/>
- </tree>
- </field>
- </page>
- </notebook>
- </form>
- </field>
- </record>
-
- <record model="ir.ui.view" id="survey_response_line_tree">
- <field name="name">survey_response_line_tree</field>
- <field name="model">survey.response.line</field>
- <field name="arch" type="xml">
- <tree string="Survey Answer Line">
- <field name="page_id"/>
- <field name="question_id"/>
- <field name="date_create"/>
- <field name="state"/>
- </tree>
- </field>
- </record>
-
- <!--
- Survey Response
- -->
-
- <record model="ir.ui.view" id="survey_response_form">
- <field name="name">survey_response_form</field>
- <field name="model">survey.response</field>
- <field name="arch" type="xml">
- <form string="Survey Answer">
- <field name="survey_id"/>
- <field name="date_create"/>
- <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_survey_user']}"/>
- <field name="response_type"/>
- <field name="question_ids" nolabel="1" colspan="4" />
- <field name="state"/>
- </form>
- </field>
- </record>
-
- <record model="ir.ui.view" id="survey_response_tree">
- <field name="name">survey_response_tree</field>
- <field name="model">survey.response</field>
- <field name="arch" type="xml">
- <tree string="Survey Answer">
- <field name="survey_id"/>
- <field name="date_create"/>
- <field name="user_id"/>
- <field name="response_type"/>
- <field name="state"/>
- </tree>
- </field>
- </record>
-
- <!--
- Survey Response Answer
- -->
-
- <record model="ir.ui.view" id="survey_response_answer_form">
- <field name="name">survey_response_answer_form</field>
- <field name="model">survey.response.answer</field>
- <field name="arch" type="xml">
- <form string="Survey Answer">
- <group colspan="4">
- <field name="answer_id"/>
- <field name="answer" />
- </group>
- <field name="value_choice"/>
- <label string="(Use Only Question Type is matrix_of_drop_down_menus)" align="0.0"/>
- <group colspan="4" col="4">
- <field name="comment_field"/>
- <field name="column_id"/>
- </group>
- </form>
- </field>
- </record>
-
- <record model="ir.ui.view" id="survey_response_answer_tree">
- <field name="name">survey_response_answer_tree</field>
- <field name="model">survey.response.answer</field>
- <field name="arch" type="xml">
- <tree editable="top" string="Survey Answer">
- <field name="answer_id"/>
- <field name="answer" />
- <field name="value_choice" />
- <field name="column_id"/>
- <field name="comment_field"/>
- </tree>
- </field>
- </record>
-
- <!--
- Survey Question Column Heading
- -->
-
- <record model="ir.ui.view" id="survey_question_column_heading_form">
- <field name="name">survey_question_column_heading_form</field>
- <field name="model">survey.question.column.heading</field>
- <field name="arch" type="xml">
- <form string="Column Heading">
- <field name="title"/>
- <field name="in_visible_rating_weight" invisible="1"/>
- <field name="in_visible_menu_choice" invisible="1"/>
- <group colspan="4" attrs="{'invisible':[('in_visible_rating_weight','!=',False)]}">
- <field name="rating_weight"/>
- <label align="0.0" string="Use if question type is rating_scale" />
- </group>
- <group colspan="4" attrs="{'invisible':[('in_visible_menu_choice','!=',False)]}">
- <separator string="Menu Choices (each choice on separate lines)" colspan="4"/>
- <field name="menu_choice" nolabel="1" colspan="4"/>
- </group>
- </form>
- </field>
- </record>
-
- <record model="ir.ui.view" id="survey_question_column_heading_tree">
- <field name="name">survey_question_column_heading_tree</field>
- <field name="model">survey.question.column.heading</field>
- <field name="arch" type="xml">
- <tree editable="bottom" string="Column Heading">
- <field name="title"/>
- </tree>
- </field>
- </record>
-
- <!--
- Survey Request
- -->
-
- <record model="ir.ui.view" id="survey_request_form">
- <field name="name">survey_request_form</field>
- <field name="model">survey.request</field>
- <field name="arch" type="xml">
- <form string="Request" version="7.0">
- <header>
- <button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object"/>
- <button name="survey_req_waiting_answer" string="Waiting Answer" states="draft" type="object" class="oe_highlight"/>
- <button name="survey_req_done" string="Done" states="waiting_answer" type="object" class="oe_highlight"/>
- <button name="survey_req_cancel" string="Cancel Request" states="waiting_answer" type="object"/>
- <field name="state" widget="statusbar" statusbar_visible="draft,waiting_answer"/>
- </header>
- <sheet string="Survey Request">
- <group class="oe_header">
- <field name="date_deadline"/>
- <field name="survey_id"/>
- <field name="user_id" on_change="on_change_user(user_id)" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_survey_user']}"/>
- <field name="email"/>
- <field name="response" readonly="1" attrs="{'invisible':[('response','=',False)]}"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
-
- <record model="ir.ui.view" id="survey_request_tree">
- <field name="name">survey_request_tree</field>
- <field name="model">survey.request</field>
- <field name="arch" type="xml">
- <tree string="Evaluation Plan Phase" colors="red:date_deadline&lt;current_date">
- <field name="date_deadline"/>
- <field name="user_id"/>
- <field name="email"/>
- <field name="survey_id"/>
- <field name="response" />
- <field name="state" />
- </tree>
- </field>
- </record>
-
- <record id="survey_request_search" model="ir.ui.view">
- <field name="name">survey_request_search</field>
- <field name="model">survey.request</field>
- <field name="arch" type="xml">
- <search string="Search Survey">
- <field name="email" string="Survey"/>
- <filter icon="terp-gtk-media-pause" string="Waiting Answer" domain="[('state','=','waiting_answer')]"/>
- <separator/>
- <filter icon="terp-emblem-important" string="Late" domain="[('date_deadline','&lt;',current_date)]"/>
- <separator/>
- <filter string="My Survey(s)" icon="terp-personal" domain="[('user_id','=',uid)]"/>
- <field name="survey_id" widget="selection"/>
- <field name="user_id"/>
- <group expand="0" string="Group By...">
- <filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
- <filter string="Survey" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'survey_id'}"/>
- <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
- </group>
- </search>
- </field>
- </record>
-
- <record model="ir.actions.act_window" id="action_survey_request_tree">
- <field name="name">Survey Requests</field>
- <field name="res_model">survey.request</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="domain">[('user_id','=',uid)]</field>
- <field name="view_id" ref="survey_request_tree"></field>
- <field name="search_view_id" ref="survey_request_search"/>
- </record>
-
- <menuitem name="Survey Requests" id="menu_survey_type_form1"
- action="action_survey_request_tree" parent="menu_surveys"
- groups="base.group_tool_manager" sequence="3"/>
-
- <!--
- Survey Type
- -->
-
- <record model="ir.ui.view" id="survey_type_form">
- <field name="name">survey_type_form</field>
- <field name="model">survey.type</field>
- <field name="arch" type="xml">
- <form string="Survey Type">
- <field name="name"/>
- <field name="code"/>
- </form>
- </field>
- </record>
-
- <record model="ir.ui.view" id="survey_type_tree">
- <field name="name">survey_type_tree</field>
- <field name="model">survey.type</field>
- <field name="arch" type="xml">
- <tree string="Survey Type">
- <field name="name"/>
- <field name="code"/>
- </tree>
- </field>
- </record>
-
- <record model="ir.actions.act_window" id="action_survey_type_form">
- <field name="name">Survey Type</field>
- <field name="res_model">survey.type</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="view_id" ref="survey_type_tree"></field>
- </record>
-
- <act_window
- context="{'search_default_survey_id': [active_id], 'default_survey_id': active_id}"
- id="act_survey_pages"
- name="Pages"
- res_model="survey.page"
- src_model="survey"/>
-
- <act_window
- context="{'search_default_survey': active_id, 'default_survey': active_id}"
- id="act_survey_question"
- name="Questions"
- res_model="survey.question"
- src_model="survey"/>
-
-
- <act_window
- context="{'search_default_page_id': active_id, 'default_page_id': active_id}"
- id="act_survey_page_question"
- name="Questions"
- res_model="survey.question"
- src_model="survey.page"/>
-
- <act_window domain="[('question_id', '=', active_id)]"
- id="act_survey_answer"
- name="Answers"
- res_model="survey.answer"
- src_model="survey.question"/>
-
- <act_window
- context="{'search_default_survey_id': active_id, 'default_survey_id': active_id}"
- id="act_survey_request"
- name="Survey Requests"
- res_model="survey.request"
- src_model="survey"/>
-
- </data>
-</openerp>
diff --git a/addons/survey/test/__init__.py b/addons/survey/test/__init__.py
new file mode 100644
index 00000000000..b2a1a5accf2
--- /dev/null
+++ b/addons/survey/test/__init__.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
+#
+# 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/>.
+#
+##############################################################################
+
+
+from . import test_survey
+
+checks = [
+ test_survey
+]
diff --git a/addons/survey/test/draft2open2close_request.yml b/addons/survey/test/draft2open2close_request.yml
deleted file mode 100644
index 9d80952855b..00000000000
--- a/addons/survey/test/draft2open2close_request.yml
+++ /dev/null
@@ -1,50 +0,0 @@
--
- In order to check Survey Request of the survey "Initial Partner Feedback" I create a Survey Request for survey "Initial Partner Feedback".
--
- !record {model: survey.request, id: survey_request_1}:
- survey_id: survey_Initial_partner_feedback
- user_id: base.user_demo
--
- !assert {model: survey.request, id: survey_request_1, string: Survey Request should be in draft state}:
- - state == 'draft'
--
- I set Survey Request for the survey in waiting state.
--
- !python {model: survey.request}: |
- self.survey_req_waiting_answer(cr, uid, [ref("survey_request_1")], context)
--
- I check that state of Survey Request for the survey is waiting or not.
--
- !assert {model: survey.request, id: survey_request_1, severity: error, string: Survey Request should be in waiting state}:
- - state == 'waiting_answer'
--
- I cancel the Survey Request of the survey.
--
- !python {model: survey.request}: |
- self.survey_req_cancel(cr, uid, [ref("survey_request_1")], context)
--
- I check that state of Survey Request of the survey is cancel or not.
--
- !assert {model: survey.request, id: survey_request_1, severity: error, string: Survey Request should be in cancel state}:
- - state == 'cancel'
--
- I set Survey Request of the survey in draft state.
--
- !python {model: survey.request}: |
- self.survey_req_draft(cr, uid, [ref("survey_request_1")], context)
--
- I check that state of Survey request of the survey is draft or not.
--
- !assert {model: survey.request, id: survey_request_1, severity: error, string: Survey Request should be in draft state}:
- - state == 'draft'
--
- I set survey request of the survey in done state.
--
- !python {model: survey.request}: |
- self.survey_req_waiting_answer(cr, uid, [ref("survey_request_1")], context)
- self.survey_req_done(cr, uid, [ref("survey_request_1")], context)
--
- I check that state of Survey request of the survey is done or not.
--
- !assert {model: survey.request, id: survey_request_1, severity: error, string: Survey Request should be in done state}:
- - state == 'done'
diff --git a/addons/survey/test/draft2open2close_survey.yml b/addons/survey/test/draft2open2close_survey.yml
deleted file mode 100644
index 926810c1429..00000000000
--- a/addons/survey/test/draft2open2close_survey.yml
+++ /dev/null
@@ -1,111 +0,0 @@
--
- In order to check the survey module in OpenERP I use the survey "Initial Partner Feedback".
--
- I set the survey in Open state.
--
- !python {model: survey}: |
- sur = self.survey_open(cr, uid, [ref("survey_Initial_partner_feedback")], context)
--
- I check state of survey is open or not.
--
- !assert {model: survey, id: survey_Initial_partner_feedback, severity: error, string: Survey should be in open state}:
- - state == 'open'
--
- I check that the survey is reopened or not.
--
- !python {model: survey}: |
- self.survey_cancel(cr, uid, [ref('survey_Initial_partner_feedback')],context)
- self.survey_open(cr, uid, [ref('survey_Initial_partner_feedback')],context)
--
- I check that state of survey is open or not.
--
- !assert {model: survey, id: survey_Initial_partner_feedback, severity: error, string: Survey should be in open state}:
- - state == 'open'
--
- I set the state of the survey open.
--
- !python {model: survey}: |
- sur = self.survey_open(cr, uid, [ref("survey_Initial_partner_feedback")], context)
--
- In order to print the survey I click on Print.
--
- !python {model: survey.print}: |
- id = self.create(cr, uid, {'survey_ids': [(6,0,[ref('survey.survey_Initial_partner_feedback')])]})
- self.action_next(cr, uid, [id], context)
--
- In order to answer the survey I click on "Answer a Survey" wizard.
--
- !python {model: survey.name.wiz}: |
- id = self.create(cr, uid, {'survey_id': ref("survey_Initial_partner_feedback")})
- self.action_next(cr, uid, [id], context)
--
- I give the answer of the first and second page of the survey.
--
- !python {model: survey.question.wiz}: |
- ctx = {'active_model':'survey', 'active_id': ref('survey_Initial_partner_feedback'), 'active_ids': [ref('survey_Initial_partner_feedback')]}
- self.fields_view_get(cr, uid, ref("survey.view_survey_question_message"),"form", context=ctx)
- values = self.default_get(cr, uid, ['name'], ctx)
- id = self.create(cr, uid, {str(ref("survey_initial_question_company_name")) +"_single" :'Tiny' , str(ref("survey_initial_question_company_size")) + "_selection" : int(ref("survey.survey_initial_question_company_size_51")), }, context)
- self.action_next(cr, uid, [id], context)
- id = self.create(cr, uid, {str(ref("survey_initial_question_contract_customers")) + "_selection" : int(ref("survey_initial_answer_sometimes")), str(ref("survey_initial_question_sell_to_your_customers")) + "_selection" : int(ref("survey_initial_answer_maintenance_contract")), }, context)
- self.action_next(cr, uid, [id], context)
--
- I print the answers of the survey.
--
- !python {model: survey.browse.answer}: |
- id = self.create(cr, uid, {'survey_id': ref('survey.survey_Initial_partner_feedback')})
- self.action_next(cr, uid, [id], context)
--
- I edit questions of the survey as per requirement.
--
- !python {model: survey.question.wiz}: |
- name_wiz_obj = self.pool.get('survey.name.wiz')
- id = name_wiz_obj.create(cr, uid, {'survey_id': ref("survey_Initial_partner_feedback")})
- ctx = {'active_model':'survey', 'active_id': ref('survey_Initial_partner_feedback'), 'active_ids': [ref('survey_Initial_partner_feedback')], 'question_id': ref('survey_initial_question_company_name'), 'page_number': -1,'sur_name_id': id}
- self.action_edit_question(cr, uid, [ref('survey_initial_question_company_name')], context = ctx)
- self.action_delete_question(cr, uid, [ref('survey_initial_question_company_name')], context = ctx)
- self.action_new_question(cr, uid, [], context = ctx)
--
- I edit Page of the survey as per requirement.
--
- !python {model: survey.question.wiz}: |
- name_wiz_obj = self.pool.get('survey.name.wiz')
- id = name_wiz_obj.create(cr, uid, {'survey_id': ref("survey_Initial_partner_feedback")})
- ctx = {'active_model':'survey', 'active_id': ref('survey_Initial_partner_feedback'), 'active_ids': [ref('survey_Initial_partner_feedback')], 'page_id': ref('survey_initial_page_Contracts'), 'sur_name_id': id}
- self.action_edit_page(cr, uid, [ref('survey_initial_page_Contracts')], context = ctx)
- self.action_delete_page(cr, uid, [ref('survey_initial_page_Contracts')], context = ctx)
- self.action_new_page(cr, uid, [], context = ctx)
--
- In order to send invitation to the users I click on "Send Invitation" wizard.
--
- !python {model: survey.send.invitation}: |
- context = {'active_model':'survey', 'active_id': ref('survey_Initial_partner_feedback'), 'active_ids': [ref('survey_Initial_partner_feedback')]}
- values = self.default_get(cr, uid, ['mail_from', 'mail_subject', 'send_mail_existing', 'mail_subject_existing', 'mail', 'partner_ids', 'send_mail'], context)
- values['mail_from'] = 'Surveyor'
- new_id = self.create(cr, uid, values)
- self.action_send(cr, uid, [new_id], context)
--
- I set the value in "Total start survey" field.
--
- !record {model: survey, id: survey_Initial_partner_feedback}:
- tot_start_survey: 1
--
- I set the survey in Cancel state.
--
- !python {model: survey}: |
- self.survey_cancel(cr, uid, [ref("survey_Initial_partner_feedback")], context)
--
- I check state of survey is cancel or not.
--
- !assert {model: survey, id: survey_Initial_partner_feedback, severity: error, string: Survey should be in cancel state}:
- - state == 'cancel'
--
- I set the survey in close state.
--
- !python {model: survey}: |
- self.survey_close(cr, uid, [ref("survey_Initial_partner_feedback")], context)
--
- I check state of Survey is close or not.
--
- !assert {model: survey, id: survey_Initial_partner_feedback, severity: error, string: Survey should be in close state}:
- - state == 'close'
diff --git a/addons/survey/test/survey_question_type.yml b/addons/survey/test/survey_question_type.yml
deleted file mode 100644
index e03d7710ea0..00000000000
--- a/addons/survey/test/survey_question_type.yml
+++ /dev/null
@@ -1,6 +0,0 @@
--
- I check the question type of the survey "Initial Partner Feedback".
--
- !python {model: survey.question}: |
- sur_question = self.on_change_type(cr, uid, [ref("survey_Initial_partner_feedback")], 'multiple_textboxes_diff_type')
- assert sur_question
diff --git a/addons/survey/test/survey_report.yml b/addons/survey/test/survey_report.yml
deleted file mode 100644
index 36eff699075..00000000000
--- a/addons/survey/test/survey_report.yml
+++ /dev/null
@@ -1,26 +0,0 @@
--
- I print the Survey Browse Response Report through the wizard.
--
- !python {model: survey}: |
- ctx = {'model': 'survey','active_ids': [(6,0,[ref('survey_partner_feedback')])]}
- data_dict = {'response_ids' : [(6,0,[ref('survey.survey_partner_feedback')])], 'page_number' : True, 'without_pagebreak': True}
- from openerp.tools import test_reports
- test_reports.try_report_action(cr, uid, 'action_view_survey_print_answer',wiz_data=data_dict, context=ctx, our_module='survey')
-
--
- I print the Survey Analysis Report through the wizard.
--
- !python {model: survey}: |
- ctx = {'model': 'survey','active_ids': [(6,0,[ref('survey_partner_feedback')])]}
- data_dict = {'survey_ids' : [(6,0,[ref('survey.survey_partner_feedback')])]}
- from openerp.tools import test_reports
- test_reports.try_report_action(cr, uid, 'action_view_survey_print_statistics',wiz_data=data_dict, context=ctx, our_module='survey')
-
--
- I print the Survey Form Report through the wizard.
--
- !python {model: survey}: |
- ctx = {'model': 'survey','active_ids': [(6,0,[ref('survey_partner_feedback')])]}
- data_dict = {'survey_ids' : [(6,0,[ref('survey.survey_partner_feedback')])], 'page_number' : True, 'without_pagebreak': True}
- from openerp.tools import test_reports
- test_reports.try_report_action(cr, uid, 'action_view_survey_print',wiz_data=data_dict, context=ctx, our_module='survey')
diff --git a/addons/survey/test/test_survey.py b/addons/survey/test/test_survey.py
new file mode 100644
index 00000000000..c3a3f4459af
--- /dev/null
+++ b/addons/survey/test/test_survey.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2014-TODAY OpenERP S.A. <http://openerp.com>
+#
+# 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/>.
+#
+##############################################################################
+
+from openerp.tests import common
+
+
+class test_survey(common.TransactionCase):
+
+ def setUp(self):
+ super(test_survey, self).setUp()
+ cr, uid, context = self.cr, self.uid, {}
+ pass
+
+ def test_00_create_survey_and_questions(self):
+ cr, uid, context = self.cr, self.uid, {}
+ pass
+
+ def test_01_fill_survey(self):
+ pass
+
+ def test_02_answer_survey(self):
+ pass
diff --git a/addons/survey/views/survey_result.xml b/addons/survey/views/survey_result.xml
new file mode 100644
index 00000000000..40a8a75fc28
--- /dev/null
+++ b/addons/survey/views/survey_result.xml
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+ <template id="result" name="Survey Result">
+ <t t-call="website.layout">
+ <t t-set="head">
+ <link href="/web_graph/static/src/css/nv.d3.css" rel="stylesheet" type="text/css"></link>
+ <link href="/survey/static/src/css/survey_result.css" rel="stylesheet" type="text/css"></link>
+ <script src="/web_graph/static/lib/nvd3/d3.v3.js"></script>
+ <script src="/web_graph/static/lib/nvd3/nv.d3.js"></script>
+ <script type="text/javascript" src="/survey/static/src/js/survey_result.js" />
+ </t>
+ <div class="oe_structure" />
+ <div class="container">
+ <div class="jumbotron mt32">
+ <t t-set="survey" t-value="survey_dict['survey']"/>
+ <h1><span t-field="survey.title"></span> <span style="font-size:1.5em;" class="fa fa-bar-chart-o pull-right "/></h1>
+ <h2><span t-field="survey.description"></span></h2>
+ </div>
+ <div class="panel panel-default hidden-print">
+ <div class="panel-heading"><span class="fa fa-filter"></span> Filters <span t-if="filter_display_data" class="pull-right text-primary clear_survey_filter"><i class="fa fa-times"></i> Clear All Filters</span></div>
+ <div class="panel-body">
+ <span t-if="filter_finish == True">
+ <span class="label label-default only_left_radius filter-all">All surveys</span><span class="label label-primary only_right_radius filter-finished">Finished surveys</span>
+ </span>
+ <span t-if="filter_finish == False">
+ <span class="label label-primary only_left_radius filter-all">All surveys</span><span class="label label-default only_right_radius filter-finished">Finished surveys</span>
+ </span>
+ <span t-foreach="filter_display_data" t-as="filter_data">
+ <span class="label label-primary only_left_radius"><i class="fa fa-filter"></i></span><span class="label label-primary no_radius" t-esc="filter_data['question_text']"></span><span class="label label-success only_right_radius" t-esc="' > '.join(filter_data['labels'])"></span>
+ </span>
+ </div>
+ </div>
+ <div t-foreach="survey_dict['page_ids']" t-as='page_ids'>
+ <t t-set="page" t-value="page_ids['page']"/>
+ <h1 class="mt16" t-field='page.title'></h1>
+ <hr/>
+ <div t-foreach="page_ids['question_ids']" t-as='question_ids' class="mt16">
+ <t t-set="input_summary" t-value="question_ids['input_summary']"/>
+ <t t-set="question" t-value="question_ids['question']"/>
+ <t t-set="graph_data" t-value="question_ids['graph_data']"/>
+ <t t-set="prepare_result" t-value="question_ids['prepare_result']"/>
+ <h4>
+ <b>Question </b>
+ <span t-field='question.question'></span>
+ <t t-if="question.type == 'matrix'">
+ <small><span class="label label-default">Matrix: <span t-field='question.matrix_subtype'/></span></small>
+ </t>
+ <t t-if="question.type in ['simple_choice', 'multiple_choice']">
+ <small><span t-field='question.type' class="label label-default"></span></small>
+ </t>
+ <span class="pull-right">
+ <span class="label label-success"><span t-esc="input_summary['answered']"></span> Answered</span>
+ <span class="label label-danger"><span t-esc="input_summary['skipped']"></span> Skipped</span>
+ </span>
+ </h4>
+ <t t-if="input_summary['answered'] != 0">
+ <t t-if="question.description">
+ <h5><span class="text-muted" t-field="question.description"></span></h5>
+ </t>
+ <t t-if="question.type in ['textbox', 'free_text', 'datetime']">
+ <t t-call="survey.result_text"></t>
+ </t>
+ <t t-if="question.type in ['simple_choice', 'multiple_choice']">
+ <t t-call="survey.result_choice"></t>
+ </t>
+ <t t-if="question.type == 'matrix'">
+ <t t-call="survey.result_matrix"></t>
+ </t>
+ <t t-if="question.type == 'numerical_box'">
+ <t t-call="survey.result_number"></t>
+ </t>
+ </t>
+ <t t-if="input_summary['answered'] == 0">
+ <h2 style="padding-top:30px;padding-bottom:30px;text-align:center;" class="text-muted">Sorry, No one answered this question.</h2>
+ </t>
+ </div>
+ </div>
+ </div>
+ <div class="oe_structure" />
+ </t>
+ </template>
+
+ <!-- Result for free_text,textbox and datetime -->
+ <template id="result_text" name="Text Result">
+ <table class="table table-hover table-condensed" t-att-id="'table_question_%d' % question.id">
+ <thead>
+ <tr>
+ <th>#</th>
+ <th>User Responses</th>
+ </tr>
+ </thead>
+ <tbody>
+ <t t-set="text_result" t-value="prepare_result"/>
+ <tr t-foreach="text_result" t-as="user_input">
+ <td><a t-att-href="'%s/%s' % (user_input.user_input_id.print_url, user_input.user_input_id.token)"><t t-esc="user_input_index + 1"></t></a></td>
+ <t t-if="question.type == 'free_text'">
+ <td>
+ <span t-field="user_input.value_free_text"></span><br/>
+ </td>
+ </t>
+ <t t-if="question.type == 'textbox'">
+ <td>
+ <span t-field="user_input.value_text"></span><br/>
+ </td>
+ </t>
+ <t t-if="question.type == 'datetime'">
+ <td>
+ <span class="oe_date" t-field="user_input.value_date"></span><br/>
+ </td>
+ </t>
+ </tr>
+ </tbody>
+ </table>
+ <t t-call="survey.pagination" />
+ </template>
+
+ <!-- Result for simple_choice and multiple_choice -->
+ <template id="result_choice" name="Choice Result">
+ <div>
+ <!-- Tabs -->
+ <ul class="nav nav-tabs hidden-print">
+ <li class="active" t-if="question.type != 'simple_choice'">
+ <a t-att-href="'#graph_question_%d' % question.id" data-toggle="tab">
+ <i class="fa fa-bar-chart-o"></i> Graph
+ </a>
+ </li>
+ <li class="active" t-if="question.type == 'simple_choice'">
+ <a t-att-href="'#graph_question_%d' % question.id" data-toggle="tab">
+ <i class="fa fa-bar-chart-o"></i> Pie Chart
+ </a>
+ </li>
+ <li>
+ <a t-att-href="'#data_question_%d' % question.id" data-toggle="tab">
+ <i class="fa fa-list-alt"></i> Data
+ </a>
+ </li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active survey_graph" t-if="question.type != 'simple_choice'" t-att-id="'graph_question_%d' % question.id" t-att-data-question_id="question.id" data-graph_type="bar" t-att-graph-data="graph_data">
+ <!-- svg element for drawing bar chart -->
+ <svg style="height:20em"></svg>
+ </div>
+ <div class="tab-pane active survey_graph" t-if="question.type == 'simple_choice'" t-att-id="'graph_question_%d' % question.id" t-att-data-question_id="question.id" data-graph_type="pie" t-att-graph-data="graph_data">
+ <!-- svg element for drawing pie chart -->
+ <svg style="height:20em"></svg>
+ </div>
+ <div class="tab-pane" t-att-id="'data_question_%d' % question.id">
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Answer Choices</th>
+ <th>User Responses</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr t-foreach="prepare_result" t-as="user_input">
+ <td>
+ <p t-esc="user_input['text']"></p>
+ </td>
+ <td class="survey_answer">
+ <span t-esc="round(user_input['count']*100.0/(input_summary['answered'] or 1),2)"></span> %
+ <span t-esc="user_input['count']" class="label label-primary">Vote</span>
+ <i class="fa fa-filter text-primary invisible survey_filter" t-att-data-question_id="question.id" t-att-data-answer_id="user_input['answer_id']"></i>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </template>
+
+ <!-- Result for matrix -->
+ <template id="result_matrix" name="Matrix Result">
+ <t t-set="matrix_result" t-value="prepare_result"/>
+ <!-- Tabs -->
+ <ul class="nav nav-tabs hidden-print">
+ <li class="active">
+ <a t-att-href="'#graph_question_%d' % question.id" data-toggle="tab">
+ <i class="fa fa-bar-chart-o"></i>
+ Graph
+ </a>
+ </li>
+ <li>
+ <a t-att-href="'#data_question_%d' % question.id" data-toggle="tab">
+ <i class="fa fa-list-alt"></i>
+ Data
+ </a>
+ </li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active with-3d-shadow with-transitions survey_graph" t-att-id="'graph_question_%d' % question.id" t-att-data-question_id= "question.id" data-graph_type= "multi_bar" t-att-graph-data="graph_data">
+ <!-- svg element for drawing Multibar chart -->
+ <svg style="height:20em"></svg>
+ </div>
+ <div class="tab-pane" t-att-id="'data_question_%d' % question.id">
+ <table class="table table-hover table-condensed text-right">
+ <thead>
+ <tr>
+ <th></th>
+ <th class="text-right" t-foreach="matrix_result['answers']" t-as="answer_id">
+ <span t-esc="matrix_result['answers'][answer_id]"></span>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr t-foreach="matrix_result['rows']" t-as="row_id">
+ <td>
+ <span t-esc="matrix_result['rows'][row_id]"></span>
+ </td>
+ <td class="survey_answer" t-foreach="matrix_result['answers']" t-as="answer_id">
+ <span t-esc="round(matrix_result['result'][(row_id,answer_id)]*100.0/(input_summary['answered'] or 1),2)"></span> %
+ <span class="label label-primary" t-esc="matrix_result['result'][(row_id,answer_id)]"></span><i class="fa fa-filter text-primary invisible survey_filter" t-att-data-question_id="question.id" t-att-data-row_id="row_id" t-att-data-answer_id="answer_id"></i>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </template>
+
+ <!-- Result for Numeric Data -->
+ <template id="result_number" name="Number Result">
+ <t t-set="number_result" t-value="prepare_result"/>
+ <t t-set="text_result" t-value="number_result['input_lines']" />
+ <span class="pull-right mt8">
+ <span class="label label-default only_left_radius">Maximum </span> <span class="label label-success only_right_radius" t-esc="number_result['max']"></span>
+ <span class="label label-default only_left_radius">Minimum </span> <span class="label label-danger only_right_radius" t-esc="number_result['min']"></span>
+ <span class="label label-default only_left_radius">Average </span> <span class="label label-warning only_right_radius" t-esc="number_result['average']"></span>
+ </span>
+ <ul class="nav nav-tabs hidden-print">
+ <li class="active">
+ <a t-att-href="'#most_common_%d' % question.id" data-toggle="tab">
+ <i class="fa fa-list-ol"></i>
+ Most Common <span t-esc="len(number_result['most_comman'])"></span>
+ </a>
+ </li>
+ <li>
+ <a t-att-href="'#data_question_%d' % question.id" data-toggle="tab">
+ <i class="fa fa-list-alt"></i>
+ All Data
+ </a>
+ </li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active with-3d-shadow with-transitions" t-att-id="'most_common_%d' % question.id">
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>User Responses</th>
+ <th>Occurence</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr t-foreach="number_result['most_comman']" t-as="row">
+ <td>
+ <span t-esc="row[0]"></span>
+ </td>
+ <td>
+ <span t-esc="row[1]"></span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="tab-pane" t-att-id="'data_question_%d' % question.id">
+ <table class="table table-hover table-condensed" t-att-id="'table_question_%d' % question.id">
+ <thead>
+ <tr>
+ <th>#</th>
+ <th>User Responses</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="hidden" t-foreach="number_result['input_lines']" t-as="user_input">
+ <td><a t-att-href="'%s/%s' % (user_input.user_input_id.print_url, user_input.user_input_id.token)"><t t-esc="user_input_index + 1"></t></a></td>
+<!-- <td><t t-esc="user_input_index+1"></t></td>
+ --> <td>
+ <span t-field="user_input.value_number"></span><br/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <t t-call="survey.pagination"/>
+ </div>
+ </div>
+ </template>
+ <template id="no_result" name="Survey Result">
+ <t t-call="website.layout">
+ <div class="container">
+ <h2><span t-field='survey.title'></span></h2>
+ <div class="jumbotron mt32">
+ <h2 class="text-muted">
+ <span>
+ <i style="font-size:1.8em" class="fa fa-users pull-right"></i>
+ </span>
+ Sorry, No one answered this survey yet
+ </h2>
+ </div>
+ </div>
+ </t>
+ </template>
+ <!-- Pagination Element -->
+ <template id="pagination" name="Survey Result">
+ <t t-set="record_limit" t-value="10"/><!-- Change This record_limit to change number of record per page-->
+ <ul t-att-id="'pagination_%d' % question.id" class="pagination" t-att-data-question_id="question.id" t-att-data-record_limit="record_limit">
+ <t t-if="len(text_result) > record_limit">
+ <li t-foreach="page_range(len(text_result), record_limit)" t-as="num">
+ <a href="#" t-esc="num"></a>
+ </li>
+ </t>
+ </ul>
+ </template>
+</data>
+</openerp>
diff --git a/addons/survey/views/survey_templates.xml b/addons/survey/views/survey_templates.xml
new file mode 100644
index 00000000000..626adff105a
--- /dev/null
+++ b/addons/survey/views/survey_templates.xml
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+ <!-- "Thank you" message when the survey is completed -->
+ <template id="sfinished" name="Survey Finished">
+ <t t-call="website.layout">
+ <div class="wrap">
+ <div class="container">
+ <div class="jumbotron mt32">
+ <h1>Thank you!</h1>
+ <div t-field="survey.thank_you_message" />
+ <div t-if='survey.quizz_mode'>You scored <t t-esc="user_input.quizz_score" /> points.</div>
+ <div>If you wish, you can <a t-att-href="'/survey/print/%s/%s' % (slug(survey), token)">print your answers</a>.</div>
+ </div>
+ </div>
+ </div>
+ </t>
+ </template>
+
+ <!-- Message when the survey is not open -->
+ <template id="notopen" name="Survey not open">
+ <t t-call="website.layout">
+ <div class="wrap">
+ <div class="container">
+ <div class="jumbotron mt32">
+ <h1>Not open</h1>
+ <p>This survey is not open. Thank you for your interest!</p>
+ </div>
+ </div>
+ </div>
+ </t>
+ </template>
+
+ <!-- Message when the survey has no pages -->
+ <template id="nopages" name="Survey has no pages">
+ <t t-call="website.layout">
+ <div class="wrap">
+ <div class="container">
+ <div class="jumbotron mt32">
+ <h1>Not ready</h1>
+ <p>This survey has no pages by now!</p>
+ </div>
+ </div>
+ </div>
+ </t>
+ </template>
+
+ <!-- First page of a survey -->
+ <template id="survey_init" name="Survey">
+ <t t-call="website.layout">
+ <div class="wrap">
+ <div class="oe_structure" />
+ <div class="container">
+ <div groups="base.group_website_publisher" t-ignore="true" class="text-right">
+ <a href="/web#action=survey.action_survey_form" class="btn btn-default">Go back to surveys</a>
+ </div>
+ <div class='jumbotron mt32'>
+ <h1 t-field='survey.title' />
+ <div t-field='survey.description' />
+ <a class="btn btn-primary btn-lg" t-att-href="'/survey/fill/%s/%s' % (slug(survey), token)">
+ Start Survey
+ </a>
+ </div>
+ </div>
+ <div class="oe_structure" />
+ </div>
+ </t>
+ </template>
+
+ <!-- A survey -->
+ <template id="survey" name="Survey">
+ <t t-call="website.layout">
+ <t t-set="head">
+ <script type="text/javascript" src="/survey/static/src/js/survey.js" />
+ </t>
+ <div class="wrap">
+ <div class="oe_structure"/>
+ <div class="container">
+ <div groups="base.group_website_publisher" t-ignore="true" class="text-right">
+ <a href="/web#action=survey.action_survey_form" class="btn btn-default">Go back to surveys</a>
+ </div>
+ <t t-call="survey.page" />
+ </div>
+ <div class="oe_structure"/>
+ </div>
+ </t>
+ </template>
+
+ <!-- A page -->
+ <template id="page" name="Page">
+ <div class="page-header">
+ <p class="pull-right">Page <span t-raw='page_nr + 1'/> on <span t-raw="len(survey.page_ids)"/></p>
+ <h1 t-field='page.title' />
+ <div t-field='page.description'/>
+ </div>
+
+ <form role="form" method="post" class="js_surveyform" t-att-name="'%s_%s' % (survey.id, page.id)" t-att-action="'/survey/fill/%s/%s' % (slug(survey), token)" t-att-data-prefill="'/survey/prefill/%s/%s/%s' % (slug(survey), token, slug(page))" t-att-data-validate="'/survey/validate/%s' % (slug(survey))" t-att-data-submit="'/survey/submit/%s' % (slug(survey))">
+ <input type="hidden" name="page_id" t-att-value="page.id" />
+ <input type="hidden" name="token" t-att-value="token" />
+ <t t-foreach='page.question_ids' t-as='question'>
+ <t t-set="prefix" t-value="'%s_%s_%s' % (survey.id, page.id, question.id)" />
+ <div class="js_question-wrapper" t-att-id="prefix">
+ <h2>
+ <span t-field='question.question' />
+ <span t-if="question.constr_mandatory" class="text-danger">*</span>
+ </h2>
+ <div t-field='question.description' class="text-muted"/>
+ <t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t>
+ <t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t>
+ <t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t>
+ <t t-if="question.type == 'datetime'"><t t-call="survey.datetime"/></t>
+ <t t-if="question.type == 'simple_choice'"><t t-call="survey.simple_choice"/></t>
+ <t t-if="question.type == 'multiple_choice'"><t t-call="survey.multiple_choice"/></t>
+ <t t-if="question.type == 'matrix'"><t t-call="survey.matrix"/></t>
+ <div class="js_errzone alert alert-danger" style="display:none;"></div>
+ </div>
+ </t>
+ <div class="text-center mt16 mb16">
+ <button t-if="survey.users_can_go_back and page_nr > 0" type="submit" class="btn btn-default" name="button_submit" value="previous">Previous page</button>
+ <button t-if="not last" type="submit" class="btn btn-primary" name="button_submit" value="next">Next page</button>
+ <button t-if="last" type="submit" class="btn btn-primary" name="button_submit" value="finish">Submit survey</button>
+ </div>
+ </form>
+
+ <!-- Modal used to display error message, i.c.o. ajax error -->
+ <div class="modal fade" id="AJAXErrorModal" role="dialog" aria-labelledby="AJAXErrorModal" aria-hidden="true" >
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&amp;times;</button>
+ <h4 class="modal-title">A problem has occured</h4>
+ </div>
+ <div class="modal-body"><p>Something went wrong while contacting survey server. <strong class="text-danger">Your answers have probably not been recorded.</strong> Try refreshing.</p></div>
+ <div class="modal-footer"><button type="button" class="btn btn-primary" data-dismiss="modal">Close</button></div>
+ </div>
+ </div>
+ </div>
+
+ </template>
+
+ <!-- Question widgets -->
+ <template id="free_text" name="Free text box">
+ <textarea class="form-control" rows="3" t-att-name="prefix"></textarea>
+ </template>
+
+ <template id="textbox" name="Text box">
+ <input type="text" class="form-control" t-att-name="prefix"/>
+ </template>
+
+ <template id="numerical_box" name="Numerical box">
+ <input type="number" step="any" class="form-control" t-att-name="prefix"/>
+ </template>
+
+ <template id="datetime" name="Datetime box">
+ <input type="text" class="form-control" t-att-name="prefix" placeholder="yyyy-mm-dd hh:mm:ss" />
+ </template>
+
+ <template id="simple_choice" name="Simple choice">
+ <div t-if="question.display_mode == 'dropdown'" class="js_drop row">
+ <div class="col-md-12">
+ <select class="form-control" t-att-name="prefix">
+ <option disabled="1" selected="1" value="">Choose...</option>
+ <t t-foreach='question.labels_ids' t-as='label'>
+ <option t-att-value='label.id'><t t-esc='label.value'/></option>
+ </t>
+ <t t-if='question.comments_allowed and question.comment_count_as_answer'>
+ <option class="js_other_option" value="-1"><span t-esc="question.comments_message" /></option>
+ </t>
+ </select>
+ </div>
+ <div t-if='question.comments_allowed and question.comment_count_as_answer' class="col-md-6">
+ <input type="text" class="form-control" t-att-name="'%s_%s' % (prefix, 'comment')" data-oe-survey-othert="1"/>
+ </div>
+ <div t-if='question.comments_allowed and not question.comment_count_as_answer' class="col-md-12 mt16">
+ <span t-field="question.comments_message"/>
+ <input type="text" class="form-control" t-att-name="'%s_%s' % (prefix, 'comment')"/>
+ </div>
+ </div>
+ <div t-if="question.display_mode == 'columns' " class="row js_radio">
+ <div t-foreach='question.labels_ids' t-as='label' t-attf-class="col-md-#{question.column_nb}">
+ <label>
+ <input type="radio" t-att-name="prefix" t-att-value='label.id' />
+ <span t-field='label.value'/>
+ </label>
+ </div>
+ <div t-if='question.comments_allowed and question.comment_count_as_answer' class="js_comments col-md-12" >
+ <label>
+ <input type="radio" t-att-name="prefix" value="-1"/>
+ <span t-field="question.comments_message" />
+ </label>
+ <input type="text" class="form-control" t-att-name="'%s_%s' % (prefix, 'comment')"/>
+ </div>
+ <div t-if='question.comments_allowed and not question.comment_count_as_answer' class="col-md-12">
+ <span t-field="question.comments_message"/>
+ <input type="text" class="form-control" t-att-name="'%s_%s' % (prefix, 'comment')" data-oe-survey-othert="1"/>
+ </div>
+ </div>
+ </template>
+
+ <template id="multiple_choice" name="Multiple choice">
+ <div class="row">
+ <div t-foreach='question.labels_ids' t-as='label' t-attf-class="col-md-#{question.column_nb}">
+ <label>
+ <input type="checkbox" t-att-name="'%s_%s' % (prefix, label.id)" t-att-value='label.id' />
+ <span t-field='label.value'/>
+ </label>
+ </div>
+ <div t-if='question.comments_allowed and question.comment_count_as_answer' class="js_ck_comments col-md-12" >
+ <label>
+ <input type="checkbox" t-att-name="'%s_%s' % (prefix, -1)" value="-1" />
+ <span t-field="question.comments_message" />
+ </label>
+ <input type="text" class="form-control" t-att-name="'%s_%s' % (prefix, 'comment')"/>
+ </div>
+ <div t-if='question.comments_allowed and not question.comment_count_as_answer' class="col-md-12">
+ <span t-field="question.comments_message"/>
+ <input type="text" class="form-control" t-att-name="'%s_%s' % (prefix, 'comment')" data-oe-survey-othert="1"/>
+ </div>
+ </div>
+ </template>
+
+ <template id="matrix" name="Matrix">
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th> </th>
+ <th t-foreach="question.labels_ids" t-as="col_label"><span t-field="col_label.value" /></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr t-foreach="question.labels_ids_2" t-as="row_label">
+ <th><span t-field="row_label.value" /></th>
+ <td t-foreach="question.labels_ids" t-as="col_label">
+ <input t-if="question.matrix_subtype == 'simple'" type="radio" t-att-name="'%s_%s' % (prefix, row_label.id)" t-att-value='col_label.id' />
+ <input t-if="question.matrix_subtype == 'multiple'" type="checkbox" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)" t-att-value='col_label.id' />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <div t-if='question.comments_allowed'>
+ <span t-field="question.comments_message"/>
+ <input type="text" class="form-control" t-att-name="'%s_%s' % (prefix, 'comment')" />
+ </div>
+ </template>
+
+ <!-- Printable view of a survey (all pages) -->
+ <template id="survey_print" name="Survey">
+ <t t-call="website.layout">
+ <t t-set="head">
+ <script type="text/javascript" src="/survey/static/src/js/survey.js" />
+ </t>
+ <div class="wrap">
+ <div class="container">
+ <div class="row">
+ <div class='jumbotron mt32'>
+ <h1><span t-field='survey.title'/></h1>
+ <t t-if="survey.description"><div t-field='survey.description'/></t>
+ </div>
+ <form role="form" method="post" class="js_surveyform" t-att-name="'%s' % (survey.id)" t-att-data-prefill="'/survey/prefill/%s/%s' % (slug(survey), token)">
+ <t t-foreach="survey.page_ids" t-as="page">
+ <div class="page-header">
+ <h1 t-field='page.title' />
+ <t t-if="page.description"><div t-field='page.description'/></t>
+ </div>
+ <t t-foreach='page.question_ids' t-as='question'>
+ <t t-set="prefix" t-value="'%s_%s_%s' % (survey.id, page.id, question.id)" />
+ <div class="js_question-wrapper" t-att-id="prefix">
+ <h2>
+ <span t-field='question.question' />
+ <span t-if="question.constr_mandatory" class="text-danger">*</span>
+ </h2>
+ <t t-if="question.description"><div class="text-muted" t-field='question.description' /></t>
+ <t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t>
+ <t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t>
+ <t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t>
+ <t t-if="question.type == 'datetime'"><t t-call="survey.datetime"/></t>
+ <t t-if="question.type == 'simple_choice'"><t t-call="survey.simple_choice"/></t>
+ <t t-if="question.type == 'multiple_choice'"><t t-call="survey.multiple_choice"/></t>
+ <t t-if="question.type == 'matrix'"><t t-call="survey.matrix"/></t>
+ <div class="js_errzone alert alert-danger" style="display:none;"></div>
+ </div>
+ </t>
+ <hr/>
+ </t>
+ </form>
+ </div>
+ </div>
+ </div>
+ </t>
+ </template>
+</data>
+</openerp>
diff --git a/addons/survey/views/survey_views.xml b/addons/survey/views/survey_views.xml
new file mode 100644
index 00000000000..3246b19b08b
--- /dev/null
+++ b/addons/survey/views/survey_views.xml
@@ -0,0 +1,532 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <!-- USER INPUTS -->
+ <record id="survey_user_input_search" model="ir.ui.view">
+ <field name="name">survey_user_input_search</field>
+ <field name="model">survey.user_input</field>
+ <field name="arch" type="xml">
+ <search string="Search Survey">
+ <field name="survey_id"/>
+ <field name="email"/>
+ <field name="partner_id"/>
+ <filter string="Completed" domain="[('state', '=', 'done')]"/>
+ <filter string="Partially completed" domain="[('state', '=', 'skip')]"/>
+ <filter string="New" domain="[('state', '=', 'new')]"/>
+ <filter string="Test" domain="[('state','=', 'test')]"/>
+ <group expand="0" string="Group By...">
+ <filter name="group_by_survey" string="Survey" domain="[]" context="{'group_by': 'survey_id'}"/>
+ <filter string="Email" domain="[]" context="{'group_by': 'email'}"/>
+ <filter string="Partner" domain="[]" context="{'group_by': ['partner_id']}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_user_input_form">
+ <field name="name">survey_user_input_form</field>
+ <field name="model">survey.user_input</field>
+ <field name="arch" type="xml">
+ <form string="Survey User inputs" version="7.0" create="false">
+ <header>
+ <button name="action_survey_resent" string="Sent Invitation Again" type="object" class="oe_highlight" attrs="{'invisible': ['|', ('type','=','manually'), ('state', '=', 'done')]}"/>
+ <button name="action_view_answers" states="done" string="Print These Answers" type="object" class="oe_highlight" />
+ <button name="action_survey_results" string="View Results" type="object" />
+ <field name="state" widget="statusbar"/>
+ </header>
+ <sheet>
+ <div class="oe_right oe_button_box" name="button_box">
+ </div>
+ <group col="2">
+ <group>
+ <field name="survey_id"/>
+ <field name="date_create"/>
+ <field name="type"/>
+ <field name="token" groups="base.group_no_one"/>
+ </group>
+ <group>
+ <field name="deadline"/>
+ <field name="partner_id"/>
+ <field name="email" widget="email"/>
+ <field name="test_entry" groups="base.group_no_one"/>
+ <field name="quizz_score" groups="base.group_no_one"/>
+ </group>
+ </group>
+ <field name="user_input_line_ids" mode="tree" attrs="{'readonly': False}">
+ <tree>
+ <field name="page_id"/>
+ <field name="question_id"/>
+ <field name="answer_type"/>
+ <field name="skipped"/>
+ <field name="date_create"/>
+ <field name="quizz_mark" groups="base.group_no_one"/>
+ </tree>
+ </field>
+ </sheet>
+ </form>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_user_input_tree">
+ <field name="name">survey_user_input_tree</field>
+ <field name="model">survey.user_input</field>
+ <field name="arch" type="xml">
+ <tree string="Survey User inputs" version="7.0" colors="lightgrey:test_entry == True" create="false">
+ <field name="survey_id"/>
+ <field name="date_create"/>
+ <field name="deadline"/>
+ <field name="partner_id"/>
+ <field name="email"/>
+ <field name="type"/>
+ <field name="state"/>
+ <field name="test_entry" invisible="True"/>
+ <field name="quizz_score" groups="base.group_no_one"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_survey_user_input">
+ <field name="name">Answers</field>
+ <field name="res_model">survey.user_input</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="survey_user_input_tree"></field>
+ <field name="search_view_id" ref="survey_user_input_search"/>
+ <field name="context">{'search_default_group_by_survey': True}</field>
+ <field name="help" type="html">
+ <p>Nobody has replied to your surveys yet.</p>
+ </field>
+ </record>
+ <record id="action_selected_survey_user_input" model="ir.actions.act_window">
+ <field name="name">Survey User input</field>
+ <field name="res_model">survey.user_input</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="survey_user_input_tree"></field>
+ <field name="search_view_id" ref="survey_user_input_search"/>
+ <field name="context">{'search_default_survey_id': active_id, 'default_survey_id': active_id}</field>
+ <field name="help" type="html">
+ <p>Nobody has replied to your survey yet.</p>
+ </field>
+ </record>
+
+ <!-- SURVEY -->
+ <record model="ir.ui.view" id="survey_form">
+ <field name="name">Form view for survey</field>
+ <field name="model">survey.survey</field>
+ <field name="arch" type="xml">
+ <form string="Survey" version="7.0">
+ <header groups="base.group_survey_manager">
+ <button name="action_test_survey" string="Test Survey" type="object"/>
+ <button name="action_print_survey" string="Print Survey" type="object"/>
+ <button name="action_send_survey" string="Share and invite by email" type="object" class="oe_highlight" />
+ <button name="action_result_survey" string="View results" type="object" class="oe_highlight" />
+ <field name="stage_id" widget="statusbar" clickable="True" />
+ </header>
+ <sheet>
+ <div class="oe_title" style="width: 100%;">
+ <label for="title" class="oe_edit_only"/>
+ <h1><field name="title" /></h1>
+ </div>
+ <notebook>
+ <page string="Edit Pages and Questions">
+ <field name="page_ids" mode="tree" context="{'default_survey_id': active_id}" nolabel="1">
+ <tree>
+ <field name="sequence" widget="handle"/>
+ <field name="title"/>
+ <field name="question_ids"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Select Options">
+ <group colspan="4">
+ <field name="users_can_go_back" string="User can come back in the previous page" />
+ <field name="auth_required" />
+ <field name="res_model" groups="base.group_no_one"/>
+ <field name="quizz_mode" groups="base.group_no_one"/>
+ </group>
+ </page>
+ </notebook>
+ </sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
+ </div>
+ </form>
+ </field>
+ </record>
+ <record model="ir.ui.view" id= "survey_tree">
+ <field name="name">Tree view for survey</field>
+ <field name="model">survey.survey</field>
+ <field name="arch" type="xml">
+ <tree string="Survey">
+ <field name="title" />
+ <field name="stage_id" />
+ <field name="tot_sent_survey" string="Invitations sent" />
+ <field name="tot_start_survey" string="Started" />
+ <field name="tot_comp_survey" string="Completed" />
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_kanban">
+ <field name="name">Kanban view for survey</field>
+ <field name="model">survey.survey</field>
+ <field name="arch" type="xml">
+ <kanban default_group_by="stage_id">
+ <field name="stage_id" />
+ <field name="designed" />
+ <field name="title" />
+ <field name="tot_sent_survey" />
+ <field name="tot_start_survey" />
+ <field name="tot_comp_survey" />
+ <field name="color" />
+ <field name="auth_required" />
+ <field name="public_url" />
+ <templates>
+ <div t-name="kanban-box" t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card">
+ <div class="oe_dropdown_toggle oe_dropdown_kanban" t-if="widget.view.is_action_enabled('edit')">
+ <span class="oe_e">Ă­</span> <!-- icon for dropdown menu -->
+ <ul class="oe_dropdown_menu">
+ <li><a type="edit">Survey Options</a></li>
+ <li t-if="widget.view.is_action_enabled('delete')"><a type="delete">Delete!</a></li>
+ <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
+ </ul>
+ </div>
+ <div class="oe_kanban_content">
+ <h4 class="oe_center"><field name="title" /></h4>
+ <div><ul>
+ <li>
+ <a name="action_test_survey" type="object">Design</a>
+ </li>
+ <li>
+ <t t-if="record.designed.raw_value"><a type="object" name="action_test_survey">Test</a></t>
+ <t t-if="! record.designed.raw_value"><a style="color: #aaaaaa;">Test</a></t>
+ </li>
+ <li>
+ <t t-if="record.designed.raw_value"><a type="object" name="action_send_survey">Share &amp;amp; Invite</a></t>
+ <t t-if="! record.designed.raw_value"><a style="color: #aaaaaa;">Share &amp;amp; Invite</a></t>
+ </li>
+ <li>
+ <t t-if="record.tot_start_survey.raw_value &gt; 0"><a name="action_result_survey" type="object">Analyse Answers</a> <span t-if="record.tot_start_survey.raw_value &gt; 0">(<field name="tot_start_survey" />)</span></t>
+ <t t-if="record.tot_start_survey.raw_value &lt;= 0"><a style="color: #aaaaaa;">Analyse Answers</a></t>
+ </li>
+ </ul></div>
+ </div>
+ </div>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_survey_form">
+ <field name="name">Surveys</field>
+ <field name="res_model">survey.survey</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">kanban,tree,form</field>
+ <field name="help" type="html">
+ <p class="oe_view_nocontent_create">Click to add a survey.</p>
+ <p>You can create surveys for different purposes: customer opinion, services feedback, recruitment interviews, employee's periodical evaluations, marketing campaigns, etc.</p>
+ <p>Design easily your survey, send invitations to answer by email and analyse answers.</p>
+ </field>
+ </record>
+ <act_window context="{'search_default_survey_id': [active_id], 'default_survey_id': active_id}" id="act_survey_pages" name="Pages" res_model="survey.page" src_model="survey.survey"/>
+ <act_window context="{'search_default_survey_id': [active_id], 'default_survey_id': active_id}" id="act_survey_question" name="Questions" res_model="survey.question" src_model="survey.survey"/>
+
+ <!-- PAGES -->
+ <record model="ir.ui.view" id="survey_page_form">
+ <field name="name">Form view for survey page</field>
+ <field name="model">survey.page</field>
+ <field name="arch" type="xml">
+ <form string="Survey Page" version="7.0" create="false">
+ <sheet>
+ <div class="oe_title" style="width: 100%;">
+ <label for="title" class="oe_edit_only"/>
+ <h1><field name="title"/></h1>
+ </div>
+ <field name="question_ids" nolabel="1" mode="tree" context="{'default_page_id': active_id}">
+ <tree>
+ <field name="sequence" widget="handle"/>
+ <field name="question"/>
+ <field name="type"/>
+ <field name="constr_mandatory"/>
+ </tree>
+ </field>
+ </sheet>
+ </form>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_page_tree">
+ <field name="name">Tree view for survey page</field>
+ <field name="model">survey.page</field>
+ <field name="arch" type="xml">
+ <tree string="Survey Page" create="false">
+ <field name="sequence" widget="handle"/>
+ <field name="title"/>
+ <field name="survey_id"/>
+ <field name="question_ids" string="#Questions"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_page_search" >
+ <field name="name">Search view for survey page</field>
+ <field name="model">survey.page</field>
+ <field name="arch" type="xml">
+ <search string="Search Page">
+ <field name="title" string="Page"/>
+ <field name="survey_id" string="Survey"/>
+ <group expand="0" string="Group By...">
+ <filter name="group_by_survey" string="Survey" domain="[]" context="{'group_by':'survey_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_survey_page_form">
+ <field name="name">Pages</field>
+ <field name="res_model">survey.page</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="search_view_id" ref="survey_page_search"/>
+ <field name="context">{'search_default_group_by_survey': True}</field>
+ </record>
+ <act_window context="{'search_default_page_id': active_id, 'default_page_id': active_id}" id="act_survey_page_question" name="Questions" res_model="survey.question" src_model="survey.page"/>
+
+ <!-- QUESTIONS -->
+ <record model="ir.ui.view" id="survey_question_form">
+ <field name="name">Form view for survey question</field>
+ <field name="model">survey.question</field>
+ <field name="arch" type="xml">
+ <form string="Survey Question" version="7.0" create="false">
+ <sheet>
+ <div class="oe_title" style="width: 100%;">
+ <label for="question" string="Question name" class="oe_edit_only"/>
+ <h1><field name="question" colspan="4"/></h1>
+ <separator />
+ </div>
+ <group>
+ <field name="type" widget="radio" />
+ </group>
+ <notebook>
+ <page string="Answers">
+ <field name="validation_email" attrs="{'invisible': [('type', '!=', 'textbox')]}"/>
+ <label for="validation_email" attrs="{'invisible': [('type', '!=', 'textbox')]}"/>
+ <separator />
+ <label for="labels_ids" attrs="{'invisible': [('type', 'not in', ['simple_choice', 'multiple_choice', 'matrix'])]}" />
+ <field name="labels_ids" string="Type of answers" context="{'default_question_id': active_id}" attrs="{'invisible': [('type', 'not in', ['simple_choice', 'multiple_choice', 'matrix'])]}">
+ <tree editable="bottom">
+ <field name="sequence" widget="handle"/>
+ <field name="value" string="Answers"/>
+ </tree>
+ </field>
+ <separator />
+ <label for="labels_ids_2" attrs="{'invisible': [('type', '!=', 'matrix')]}" />
+ <field name="labels_ids_2" context="{'default_question_id_2': active_id}" attrs="{'invisible': [('type', '!=', 'matrix')]}">
+ <tree editable="bottom">
+ <field name="sequence" widget="handle"/>
+ <field name="value" string="Answers"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Options">
+ <group string="Constraints" >
+ <field name="constr_mandatory" string="Mandatory Answer"/>
+ <field name="constr_error_msg" attrs="{'invisible': [('constr_mandatory', '=', False)]}"/>
+ <group colspan="2" nolabel="1" attrs="{'invisible': [('type', 'not in', ['textbox', 'numerical_box', 'datetime'])]}">
+ <field name="validation_required"/>
+ <group colspan="2" nolabel="1" attrs="{'invisible': [('validation_required', '=', False)]}">
+ <field name="validation_length_min" attrs="{'invisible': [('type', '!=', 'textbox')]}"/>
+ <field name="validation_length_max" attrs="{'invisible': [('type', '!=', 'textbox')]}"/>
+ <field name="validation_min_float_value" attrs="{'invisible': [('type', '!=', 'numerical_box')]}"/>
+ <field name="validation_max_float_value" attrs="{'invisible': [('type', '!=', 'numerical_box')]}"/>
+ <field name="validation_min_date" attrs="{'invisible': [('type', '!=', 'datetime')]}"/>
+ <field name="validation_max_date" attrs="{'invisible': [('type', '!=', 'datetime')]}"/>
+ <field name="validation_error_msg" />
+ </group>
+ </group>
+ <field name="matrix_subtype" attrs="{'invisible':[('type','not in',['matrix'])]}"/>
+ </group>
+ <group string="Display mode" attrs="{'invisible':[('type','not in',['simple_choice', 'multiple_choice'])]}">
+ <field name="display_mode" string="Format" attrs="{'invisible':[('type','not in',['simple_choice'])]}"/>
+ <field name="column_nb" string="Number of columns" attrs="{'invisible':[('display_mode','=','dropdown'), ('type','=','simple_choice')]}"/>
+ </group>
+ <group string="Allow Comments" attrs="{'invisible':[('type','not in',['simple_choice','multiple_choice', 'matrix'])]}">
+ <field name='comments_allowed' />
+ <field name='comments_message' attrs="{'invisible': [('comments_allowed', '=', False)]}"/>
+ <field name='comment_count_as_answer' attrs="{'invisible': ['|', ('comments_allowed', '=', False), ('type', 'in', ['matrix'])]}" />
+ </group>
+ </page>
+ </notebook>
+ </sheet>
+ </form>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_question_tree">
+ <field name="name">Tree view for survey question</field>
+ <field name="model">survey.question</field>
+ <field name="arch" type="xml">
+ <tree string="Survey Question" create="false">
+ <field name="sequence" widget="handle"/>
+ <field name="question"/>
+ <field name="page_id"/>
+ <field name="survey_id"/>
+ <field name="type"/>
+ </tree>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_question_search">
+ <field name="name">Search view for survey question</field>
+ <field name="model">survey.question</field>
+ <field name="arch" type="xml">
+ <search string="Search Question">
+ <field name="question" string="Question"/>
+ <field name="survey_id" string="Survey"/>
+ <field name="page_id" string="Page"/>
+ <field name="type" string="Type"/>
+ <group expand="1" string="Group By...">
+ <filter name="group_by_page" string="Page" domain="[]" context="{'group_by':'page_id'}"/>
+ <filter name="group_by_type" string="Type" domain="[]" context="{'group_by':'type'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_survey_question_form">
+ <field name="name">Questions</field>
+ <field name="res_model">survey.question</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="search_view_id" ref="survey_question_search"/>
+ <field name="context">{'search_default_group_by_page': True}</field>
+ </record>
+
+ <!-- LABELS -->
+ <record model="ir.ui.view" id="survey_label_tree">
+ <field name="name">survey_label_tree</field>
+ <field name="model">survey.label</field>
+ <field name="arch" type="xml">
+ <tree string="Survey Label" create="false">
+ <field name="sequence" widget="handle"/>
+ <field name="question_id"/>
+ <field name="question_id_2"/>
+ <field name="value"/>
+ <field name="quizz_mark" groups="base.group_no_one"/>
+ </tree>
+ </field>
+ </record>
+ <record id="survey_label_search" model="ir.ui.view">
+ <field name="name">survey_label_search</field>
+ <field name="model">survey.label</field>
+ <field name="arch" type="xml">
+ <search string="Search Label">
+ <field name="question_id" string="Question"/>
+ <filter name="group_by_question" string="Question" domain="[]" context="{'group_by':'question_id'}"/>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_survey_label_form">
+ <field name="name">Labels</field>
+ <field name="res_model">survey.label</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="search_view_id" ref="survey_label_search"/>
+ <field name="context">{'search_default_group_by_question': True}</field>
+ </record>
+
+ <!-- USER INPUT LINES
+ .. note:: these views are useful mainly for technical users/administrators -->
+ <record model="ir.ui.view" id="survey_user_input_line_form">
+ <field name="name">survey_user_input_line_form</field>
+ <field name="model">survey.user_input_line</field>
+ <field name="arch" type="xml">
+ <form string="User input line details" version="7.0" create="false">
+ <sheet>
+ <group col="4">
+ <field name="question_id"/>
+ <field name="date_create"/>
+ <field name="answer_type"/>
+ <field name="skipped" />
+ <field name="quizz_mark" groups="base.group_no_one"/>
+ </group>
+ <group>
+ <field name="value_text" colspan='2' attrs="{'invisible': [('answer_type','!=','text')]}"/>
+ <field name="value_number" colspan='2' attrs="{'invisible': [('answer_type','!=','number')]}"/>
+ <field name="value_date" colspan='2' attrs="{'invisible': [('answer_type','!=','date')]}"/>
+ <field name="value_free_text" colspan='2' attrs="{'invisible': [('answer_type','!=','free_text')]}"/>
+ <field name="value_suggested_row" colspan='2' />
+ <field name="value_suggested" colspan='2' attrs="{'invisible': [('answer_type','!=','suggestion')]}"/>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="survey_response_line_tree">
+ <field name="name">survey_response_line_tree</field>
+ <field name="model">survey.user_input_line</field>
+ <field name="arch" type="xml">
+ <tree string="Survey Answer Line" create="false">
+ <field name="survey_id"/>
+ <field name="user_input_id"/>
+ <field name="page_id"/>
+ <field name="question_id"/>
+ <field name="date_create"/>
+ <field name="answer_type"/>
+ <field name="skipped"/>
+ <field name="quizz_mark" groups="base.group_no_one"/>
+ </tree>
+ </field>
+ </record>
+ <record id="survey_response_line_search" model="ir.ui.view">
+ <field name="name">survey_response_line_search</field>
+ <field name="model">survey.user_input_line</field>
+ <field name="arch" type="xml">
+ <search string="Search User input lines">
+ <field name="user_input_id"/>
+ <field name="survey_id"/>
+ <group expand="1" string="Group By...">
+ <filter name="group_by_survey" string="Survey" domain="[]" context="{'group_by':'survey_id'}"/>
+ <filter name="group_by_user_input" string="User Input" domain="[]" context="{'group_by':'user_input_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_survey_user_input_line">
+ <field name="name">Survey User Input lines</field>
+ <field name="res_model">survey.user_input_line</field>
+ <field name="view_mode">tree,form</field>
+ <field name="search_view_id" ref="survey_response_line_search"/>
+ <field name="context">{'search_default_group_by_survey': True, 'search_default_group_by_user_input': True}</field>
+ </record>
+
+
+ <record model="ir.ui.view" id="survey_stage_form">
+ <field name="name">Form view for survey stage</field>
+ <field name="model">survey.stage</field>
+ <field name="arch" type="xml">
+ <form string="Stage">
+ <group col='4' colspan='4'>
+ <field name="name" />
+ <field name="closed" />
+ <field name="sequence" />
+ <field name="fold" />
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <!-- MENU ELEMENTS -->
+
+ <!-- Left menu categories-->
+ <menuitem name="Surveys" id="menu_surveys" parent="base.marketing_menu" sequence="25" groups="base.group_survey_user"/>
+ <menuitem name="Configuration" id="base.menu_marketing_config_root" parent="base.marketing_menu" sequence="30" />
+
+ <!-- Left menu elements: Survey -->
+ <menuitem name="Surveys" id="menu_survey_form" action="action_survey_form" parent="menu_surveys" sequence="1"/>
+ <menuitem name="Answers" id="menu_survey_type_form1" action="action_survey_user_input" parent="menu_surveys" sequence="1"/>
+
+ <!-- Left menu elements: Technical Configuration -->
+ <menuitem name="Surveys" id="menu_surveys_configuration" parent="base.menu_marketing_config_root" groups="base.group_no_one" sequence="25" />
+ <menuitem name="Pages" id="menu_survey_page_form1" action="action_survey_page_form" parent="menu_surveys_configuration" sequence="1"/>
+ <menuitem name="Questions" id="menu_survey_question_form1" action="action_survey_question_form" parent="menu_surveys_configuration" sequence="2"/>
+ <menuitem name="Labels" id="menu_survey_label_form1" action="action_survey_label_form" parent="menu_surveys_configuration" sequence="3"/>
+ <menuitem name="User Input Lines" id="menu_survey_response_line_form" action="action_survey_user_input_line" parent="menu_surveys_configuration" sequence="4"/>
+ </data>
+</openerp>
diff --git a/addons/survey/wizard/__init__.py b/addons/survey/wizard/__init__.py
index 0ea0e5cd424..d4090570b93 100644
--- a/addons/survey/wizard/__init__.py
+++ b/addons/survey/wizard/__init__.py
@@ -19,12 +19,4 @@
#
##############################################################################
-import survey_send_invitation
-import survey_print_statistics
-import survey_print_answer
-import survey_browse_answer
-import survey_selection
-import survey_answer
-import survey_print
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+import survey_email_compose_message
diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
deleted file mode 100644
index 5b9bbb5de7e..00000000000
--- a/addons/survey/wizard/survey_answer.py
+++ /dev/null
@@ -1,1259 +0,0 @@
-## -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 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 base64
-import datetime
-from lxml import etree
-import os
-from time import strftime
-
-from openerp import tools
-from openerp.modules.module import get_module_resource
-from openerp.osv import fields, osv
-import openerp.report
-from openerp.tools import to_xml
-from openerp.tools.translate import _
-from openerp.tools.safe_eval import safe_eval
-
-class survey_question_wiz(osv.osv_memory):
- _name = 'survey.question.wiz'
- _columns = {
- 'name': fields.integer('Number'),
- }
-
- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- """
- Fields View Get method :- generate the new view and display the survey pages of selected survey.
- """
- if context is None:
- context = {}
- result = super(survey_question_wiz, self).fields_view_get(cr, uid, view_id, \
- view_type, context, toolbar,submenu)
-
- surv_name_wiz = self.pool.get('survey.name.wiz')
- survey_obj = self.pool.get('survey')
- page_obj = self.pool.get('survey.page')
- que_obj = self.pool.get('survey.question')
- ans_obj = self.pool.get('survey.answer')
- sur_response_obj = self.pool.get('survey.response')
- que_col_head = self.pool.get('survey.question.column.heading')
- user_obj = self.pool.get('res.users')
- mail_message = self.pool.get('mail.message')
-
- if view_type in ['form']:
- wiz_id = 0
- sur_name_rec = None
- if 'sur_name_id' in context:
- sur_name_rec = surv_name_wiz.browse(cr, uid, context['sur_name_id'], context=context)
- elif 'survey_id' in context:
- res_data = {
- 'survey_id': context.get('survey_id', False),
- 'page_no': -1,
- 'page': 'next',
- 'transfer': 1,
- 'response': 0
- }
- wiz_id = surv_name_wiz.create(cr, uid, res_data)
- sur_name_rec = surv_name_wiz.browse(cr, uid, wiz_id, context=context)
- context.update({'sur_name_id' :wiz_id})
-
- if context.has_key('active_id'):
- context.pop('active_id')
-
- survey_id = context.get('survey_id', False)
- if not survey_id:
- # Try one more time to find it
- if sur_name_rec and sur_name_rec.survey_id:
- survey_id = sur_name_rec.survey_id.id
- else:
- # raise osv.except_osv(_('Error!'), _("Cannot locate survey for the question wizard!"))
- # If this function is called without a survey_id in
- # its context, it makes no sense to return any view.
- # Just return the default, empty view for this object,
- # in order to please random calls to this fn().
- return super(survey_question_wiz, self).\
- fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context,
- toolbar=toolbar, submenu=submenu)
- sur_rec = survey_obj.browse(cr, uid, survey_id, context=context)
- p_id = map(lambda x:x.id, sur_rec.page_ids)
- total_pages = len(p_id)
- pre_button = False
- readonly = 0
-
- if context.get('response_id', False) \
- and int(context['response_id'][0]) > 0:
- readonly = 1
-
- if not sur_name_rec.page_no + 1 :
- surv_name_wiz.write(cr, uid, [context['sur_name_id'],], {'store_ans':{}})
-
- sur_name_read = surv_name_wiz.browse(cr, uid, context['sur_name_id'], context=context)
- page_number = int(sur_name_rec.page_no)
- if sur_name_read.transfer or not sur_name_rec.page_no + 1:
- surv_name_wiz.write(cr, uid, [context['sur_name_id']], {'transfer':False})
- flag = False
- fields = {}
- if sur_name_read.page == "next" or sur_name_rec.page_no == -1:
- if total_pages > sur_name_rec.page_no + 1:
- if ((context.has_key('active') and not context.get('active', False)) \
- or not context.has_key('active')) and not sur_name_rec.page_no + 1:
- if sur_rec.state != "open" :
- raise osv.except_osv(_('Warning!'),_("You cannot answer because the survey is not open."))
- cr.execute('select count(id) from survey_history where user_id=%s\
- and survey_id=%s', (uid,survey_id))
- res = cr.fetchone()[0]
- user_limit = survey_obj.browse(cr, uid, survey_id)
- user_limit = user_limit.response_user
- if user_limit and res >= user_limit:
- raise osv.except_osv(_('Warning!'),_("You cannot answer this survey more than %s times.") % (user_limit))
-
- if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1:
- survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")})
-
- p_id = p_id[sur_name_rec.page_no + 1]
- surv_name_wiz.write(cr, uid, [context['sur_name_id'],], {'page_no' : sur_name_rec.page_no + 1})
- flag = True
- page_number += 1
- if sur_name_rec.page_no > - 1:
- pre_button = True
- else:
- flag = True
- else:
- if sur_name_rec.page_no != 0:
- p_id = p_id[sur_name_rec.page_no - 1]
- surv_name_wiz.write(cr, uid, [context['sur_name_id'],],\
- {'page_no' : sur_name_rec.page_no - 1})
- flag = True
- page_number -= 1
-
- if sur_name_rec.page_no > 1:
- pre_button = True
- if flag:
- pag_rec = page_obj.browse(cr, uid, p_id, context=context)
- note = False
- question_ids = []
- if pag_rec:
- title = pag_rec.title
- note = pag_rec.note
- question_ids = pag_rec.question_ids
- else:
- title = sur_rec.title
- xml_form = etree.Element('form', {'string': tools.ustr(title)})
- if context.has_key('active') and context.get('active',False) and context.has_key('edit'):
- context.update({'page_id' : tools.ustr(p_id),'page_number' : sur_name_rec.page_no , 'transfer' : sur_name_read.transfer})
- xml_group3 = etree.SubElement(xml_form, 'group', {'col': '4', 'colspan': '4'})
- etree.SubElement(xml_group3, 'button', {'string' :'Add Page','icon': "gtk-new", 'type' :'object','name':"action_new_page", 'context' : tools.ustr(context)})
- etree.SubElement(xml_group3, 'button', {'string' :'Edit Page','icon': "gtk-edit", 'type' :'object','name':"action_edit_page", 'context' : tools.ustr(context)})
- etree.SubElement(xml_group3, 'button', {'string' :'Delete Page','icon': "gtk-delete", 'type' :'object','name':"action_delete_page", 'context' : tools.ustr(context)})
- etree.SubElement(xml_group3, 'button', {'string' :'Add Question','icon': "gtk-new", 'type' :'object','name':"action_new_question", 'context' : tools.ustr(context)})
-
- # FP Note
- xml_group = xml_form
-
- if context.has_key('response_id') and context.get('response_id', False) \
- and int(context.get('response_id',0)[0]) > 0:
- # TODO: l10n, cleanup this code to make it readable. Or template?
- xml_group = etree.SubElement(xml_form, 'group', {'col': '40', 'colspan': '4'})
- record = sur_response_obj.browse(cr, uid, context['response_id'][context['response_no']])
- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(_('Answer Of :- ') + record.user_id.name + _(', Date :- ') + record.date_create.split('.')[0] )), 'align':"0.0"})
- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(_(" Answer :- ") + str(context.get('response_no',0) + 1) +"/" + str(len(context.get('response_id',0))) )), 'align':"0.0"})
- if context.get('response_no',0) > 0:
- etree.SubElement(xml_group, 'button', {'colspan':"1",'icon':"gtk-go-back",'name':"action_forward_previous",'string': tools.ustr("Previous Answer"),'type':"object"})
- if context.get('response_no',0) + 1 < len(context.get('response_id',0)):
- etree.SubElement(xml_group, 'button', {'colspan':"1",'icon': "gtk-go-forward", 'name':"action_forward_next",'string': tools.ustr("Next Answer") ,'type':"object",'context' : tools.ustr(context)})
-
- if wiz_id:
- fields["wizardid_" + str(wiz_id)] = {'type':'char', 'size' : 255, 'string':"", 'views':{}}
- etree.SubElement(xml_form, 'field', {'invisible':'1','name': "wizardid_" + str(wiz_id),'default':str(lambda *a: 0),'modifiers':'{"invisible":true}'})
-
- if note:
- xml_group_note = etree.SubElement(xml_form, 'group', {'col': '1','colspan': '4'})
- for que_test in note.split('\n'):
- etree.SubElement(xml_group_note, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
- que_ids = question_ids
- qu_no = 0
-
- for que in que_ids:
- qu_no += 1
- que_rec = que_obj.browse(cr, uid, que.id, context=context)
- descriptive_text = ""
- separator_string = tools.ustr(qu_no) + "." + tools.ustr(que_rec.question)
- if ((context.has_key('active') and not context.get('active',False)) or not context.has_key('active')) and que_rec.is_require_answer:
- star = '*'
- else:
- star = ''
- if context.has_key('active') and context.get('active',False) and \
- context.has_key('edit'):
- etree.SubElement(xml_form, 'separator', {'string': star+to_xml(separator_string)})
-
- xml_group1 = etree.SubElement(xml_form, 'group', {'col': '2', 'colspan': '2'})
- context.update({'question_id' : tools.ustr(que.id),'page_number': sur_name_rec.page_no , 'transfer' : sur_name_read.transfer, 'page_id' : p_id})
- etree.SubElement(xml_group1, 'button', {'string':'','icon': "gtk-edit", 'type' :'object', 'name':"action_edit_question", 'context' : tools.ustr(context)})
- etree.SubElement(xml_group1, 'button', {'string':'','icon': "gtk-delete", 'type' :'object','name':"action_delete_question", 'context' : tools.ustr(context)})
- else:
- etree.SubElement(xml_form, 'newline')
- etree.SubElement(xml_form, 'separator', {'string': star+to_xml(separator_string)})
-
- ans_ids = que_rec.answer_choice_ids
- xml_group = etree.SubElement(xml_form, 'group', {'col': '1', 'colspan': '4'})
-
- if que_rec.type == 'multiple_choice_only_one_ans':
- selection = []
- for ans in ans_ids:
- selection.append((tools.ustr(ans.id), ans.answer))
- xml_group = etree.SubElement(xml_group, 'group', {'col': '2', 'colspan': '2'})
- etree.SubElement(xml_group, 'field', {'readonly':str(readonly), 'name': tools.ustr(que.id) + "_selection"})
- fields[tools.ustr(que.id) + "_selection"] = {'type':'selection', 'selection' :selection, 'string':_('Answer')}
-
- elif que_rec.type == 'multiple_choice_multiple_ans':
- xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
- for ans in ans_ids:
- etree.SubElement(xml_group, 'field', {'readonly':str(readonly), 'name': tools.ustr(que.id) + "_" + tools.ustr(ans.id)})
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id)] = {'type':'boolean', 'string':ans.answer}
-
- elif que_rec.type in ['matrix_of_choices_only_one_ans', 'rating_scale']:
- if que_rec.comment_column:
- col = "4"
- colspan = "4"
- else:
- col = "2"
- colspan = "2"
- xml_group = etree.SubElement(xml_group, 'group', {'col': tools.ustr(col), 'colspan': tools.ustr(colspan)})
- for row in ans_ids:
- etree.SubElement(xml_group, 'newline')
- etree.SubElement(xml_group, 'field', {'readonly': str(readonly), 'name': tools.ustr(que.id) + "_selection_" + tools.ustr(row.id),'string':to_xml(tools.ustr(row.answer))})
- selection = [('','')]
- for col in que_rec.column_heading_ids:
- selection.append((str(col.id), col.title))
- fields[tools.ustr(que.id) + "_selection_" + tools.ustr(row.id)] = {'type':'selection', 'selection' : selection, 'string': "Answer"}
- if que_rec.comment_column:
- fields[tools.ustr(que.id) + "_commentcolumn_"+tools.ustr(row.id) + "_field"] = {'type':'char', 'size' : 255, 'string':tools.ustr(que_rec.column_name), 'views':{}}
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_commentcolumn_"+tools.ustr(row.id)+ "_field"})
-
- elif que_rec.type == 'matrix_of_choices_only_multi_ans':
- xml_group = etree.SubElement(xml_group, 'group', {'col': str(len(que_rec.column_heading_ids) + 1), 'colspan': '4'})
- etree.SubElement(xml_group, 'separator', {'string': '.','colspan': '1'})
- for col in que_rec.column_heading_ids:
- etree.SubElement(xml_group, 'separator', {'string': tools.ustr(col.title),'colspan': '1'})
- for row in ans_ids:
- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(row.answer)) +' :-', 'align': '0.0'})
- for col in que_col_head.browse(cr, uid, [head.id for head in que_rec.column_heading_ids]):
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_" + tools.ustr(row.id) + "_" + tools.ustr(col.id), 'nolabel':"1"})
- fields[tools.ustr(que.id) + "_" + tools.ustr(row.id) + "_" + tools.ustr(col.id)] = {'type':'boolean', 'string': col.title}
-
- elif que_rec.type == 'matrix_of_drop_down_menus':
- xml_group = etree.SubElement(xml_group, 'group', {'col': str(len(que_rec.column_heading_ids) + 1), 'colspan': '4'})
- etree.SubElement(xml_group, 'separator', {'string': '.','colspan': '1'})
- for col in que_rec.column_heading_ids:
- etree.SubElement(xml_group, 'separator', {'string': tools.ustr(col.title),'colspan': '1'})
- for row in ans_ids:
- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(row.answer))+' :-', 'align': '0.0'})
- for col in que_rec.column_heading_ids:
- selection = []
- if col.menu_choice:
- for item in col.menu_choice.split('\n'):
- if item and not item.strip() == '': selection.append((item ,item))
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_" + tools.ustr(row.id) + "_" + tools.ustr(col.id),'nolabel':'1'})
- fields[tools.ustr(que.id) + "_" + tools.ustr(row.id) + "_" + tools.ustr(col.id)] = {'type':'selection', 'string': col.title, 'selection':selection}
-
- elif que_rec.type == 'multiple_textboxes':
- xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
- type = "char"
- if que_rec.is_validation_require:
- if que_rec.validation_type in ['must_be_whole_number']:
- type = "integer"
- elif que_rec.validation_type in ['must_be_decimal_number']:
- type = "float"
- elif que_rec.validation_type in ['must_be_date']:
- type = "date"
- for ans in ans_ids:
- etree.SubElement(xml_group, 'field', {'readonly': str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"})
- if type == "char" :
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"] = {'type':'char', 'size':255, 'string':ans.answer}
- else:
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"] = {'type': str(type), 'string':ans.answer}
-
- elif que_rec.type == 'numerical_textboxes':
- xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
- for ans in ans_ids:
- etree.SubElement(xml_group, 'field', {'readonly': str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_numeric"})
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_numeric"] = {'type':'integer', 'string':ans.answer}
-
- elif que_rec.type == 'date':
- xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
- for ans in ans_ids:
- etree.SubElement(xml_group, 'field', {'readonly': str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que.id) + "_" + tools.ustr(ans.id)})
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id)] = {'type':'date', 'string':ans.answer}
-
- elif que_rec.type == 'date_and_time':
- xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
- for ans in ans_ids:
- etree.SubElement(xml_group, 'field', {'readonly': str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que.id) + "_" + tools.ustr(ans.id)})
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id)] = {'type':'datetime', 'string':ans.answer}
-
- elif que_rec.type == 'descriptive_text':
- if que_rec.descriptive_text:
- for que_test in que_rec.descriptive_text.split('\n'):
- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
-
- elif que_rec.type == 'single_textbox':
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_single", 'nolabel':"1" ,'colspan':"4"})
- fields[tools.ustr(que.id) + "_single"] = {'type':'char', 'size': 255, 'string':"single_textbox", 'views':{}}
-
- elif que_rec.type == 'comment':
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_comment", 'nolabel':"1" ,'colspan':"4"})
- fields[tools.ustr(que.id) + "_comment"] = {'type':'text', 'string':"Comment/Eassy Box", 'views':{}}
-
- elif que_rec.type == 'table':
- xml_group = etree.SubElement(xml_group, 'group', {'col': str(len(que_rec.column_heading_ids)), 'colspan': '4'})
- for col in que_rec.column_heading_ids:
- etree.SubElement(xml_group, 'separator', {'string': tools.ustr(col.title),'colspan': '1'})
- for row in range(0,que_rec.no_of_rows):
- for col in que_rec.column_heading_ids:
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_table_" + tools.ustr(col.id) +"_"+ tools.ustr(row), 'nolabel':"1"})
- fields[tools.ustr(que.id) + "_table_" + tools.ustr(col.id) +"_"+ tools.ustr(row)] = {'type':'char','size':255,'views':{}}
-
- elif que_rec.type == 'multiple_textboxes_diff_type':
- xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'})
- for ans in ans_ids:
- if ans.type == "email" :
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"] = {'type':'char', 'size':255, 'string':ans.answer}
- etree.SubElement(xml_group, 'field', {'readonly': str(readonly), 'widget':'email','width':"300",'colspan': '1','name': tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"})
- else:
- etree.SubElement(xml_group, 'field', {'readonly': str(readonly), 'width':"300",'colspan': '1','name': tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"})
- if ans.type == "char" :
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"] = {'type':'char', 'size':255, 'string':ans.answer}
- elif ans.type in ['integer','float','date','datetime']:
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"] = {'type': str(ans.type), 'string':ans.answer}
- else:
- selection = []
- if ans.menu_choice:
- for item in ans.menu_choice.split('\n'):
- if item and not item.strip() == '': selection.append((item ,item))
- fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id) + "_multi"] = {'type':'selection', 'selection' : selection, 'string':ans.answer}
-
- if que_rec.type in ['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale'] and que_rec.is_comment_require:
- if que_rec.type in ['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans'] and que_rec.comment_field_type in ['char','text'] and que_rec.make_comment_field:
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_otherfield", 'colspan':"4"})
- fields[tools.ustr(que.id) + "_otherfield"] = {'type':'boolean', 'string':que_rec.comment_label, 'views':{}}
- if que_rec.comment_field_type == 'char':
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_other", 'nolabel':"1" ,'colspan':"4"})
- fields[tools.ustr(que.id) + "_other"] = {'type': 'char', 'string': '', 'size':255, 'views':{}}
- elif que_rec.comment_field_type == 'text':
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_other", 'nolabel':"1" ,'colspan':"4"})
- fields[tools.ustr(que.id) + "_other"] = {'type': 'text', 'string': '', 'views':{}}
- else:
- if que_rec.comment_field_type == 'char':
- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_rec.comment_label)),'colspan':"4"})
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_other", 'nolabel':"1" ,'colspan':"4"})
- fields[tools.ustr(que.id) + "_other"] = {'type': 'char', 'string': '', 'size':255, 'views':{}}
- elif que_rec.comment_field_type == 'text':
- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_rec.comment_label)),'colspan':"4"})
- etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_other", 'nolabel':"1" ,'colspan':"4"})
- fields[tools.ustr(que.id) + "_other"] = {'type': 'text', 'string': '', 'views':{}}
-
- xml_footer = etree.SubElement(xml_form, 'footer', {'col': '8', 'colspan': '1', 'width':"100%"})
-
- if pre_button:
- etree.SubElement(xml_footer, 'label', {'string': ""})
- etree.SubElement(xml_footer, 'button', {'name':"action_previous",'string':_('Previous'),'type':"object"})
- but_string = _('Next')
- if int(page_number) + 1 == total_pages:
- but_string = _('Done')
- if context.has_key('active') and context.get('active',False) and int(page_number) + 1 == total_pages and context.has_key('response_id') and context.has_key('response_no') and context.get('response_no',0) + 1 == len(context.get('response_id',0)):
- etree.SubElement(xml_footer, 'label', {'string': ""})
- etree.SubElement(xml_footer, 'button', {'special' : 'cancel','string': tools.ustr("Done") ,'context' : tools.ustr(context), 'class':"oe_highlight"})
- elif context.has_key('active') and context.get('active', False) and int(page_number) + 1 == total_pages and context.has_key('response_id'):
- etree.SubElement(xml_footer, 'label', {'string': ""})
- etree.SubElement(xml_footer, 'button', {'name':"action_forward_next",'string': tools.ustr("Next Answer") ,'type':"object",'context' : tools.ustr(context), 'class':"oe_highlight"})
- elif context.has_key('active') and context.get('active',False) and int(page_number) + 1 == total_pages:
- etree.SubElement(xml_footer, 'label', {'string': ""})
- etree.SubElement(xml_footer, 'button', {'special': "cancel", 'string' : 'Done', 'context' : tools.ustr(context), 'class':"oe_highlight"})
- else:
- etree.SubElement(xml_footer, 'label', {'string': ""})
- etree.SubElement(xml_footer, 'button', {'name':"action_next",'string': tools.ustr(but_string) ,'type':"object",'context' : tools.ustr(context), 'class':"oe_highlight"})
- etree.SubElement(xml_footer, 'label', {'string': _('or')})
- etree.SubElement(xml_footer, 'button', {'special': "cancel",'string':_('Exit'),'class':"oe_link"})
- etree.SubElement(xml_footer, 'label', {'string': tools.ustr(page_number+ 1) + "/" + tools.ustr(total_pages), 'class':"oe_survey_title_page oe_right"})
-
- root = xml_form.getroottree()
- result['arch'] = etree.tostring(root)
- result['fields'] = fields
- result['context'] = context
- else:
- survey_obj.write(cr, uid, survey_id, {'tot_comp_survey' : sur_rec.tot_comp_survey + 1})
- sur_response_obj.write(cr, uid, [sur_name_read.response], {'state' : 'done'})
-
- # mark the survey request as done; call 'survey_req_done' on its actual model
- if context.get('active_model') in self.pool:
- survey_req_obj = self.pool[context.get('active_model')]
- if hasattr(survey_req_obj, 'survey_req_done'):
- survey_req_obj.survey_req_done(cr, uid, context.get('active_ids', []), context=context)
-
- if sur_rec.send_response:
- survey_data = survey_obj.browse(cr, uid, survey_id)
- response_id = surv_name_wiz.read(cr, uid, context.get('sur_name_id',False))['response']
- report = self.create_report(cr, uid, [survey_id], 'report.survey.browse.response', survey_data.title,context)
- attachments = {}
- pdf_filename = get_module_resource('survey', 'report') + survey_data.title + ".pdf"
- if os.path.exists(pdf_filename):
- file = open(pdf_filename)
- file_data = ""
- while 1:
- line = file.readline()
- file_data += line
- if not line:
- break
-
- attachments[survey_data.title + ".pdf"] = file_data
- file.close()
- os.remove(get_module_resource('survey', 'report') + survey_data.title + ".pdf")
- context.update({'response_id':response_id})
- user_email = user_obj.browse(cr, uid, uid, context).email
- resp_email = survey_data.responsible_id and survey_data.responsible_id.email or False
-
- if user_email and resp_email:
- user_name = user_obj.browse(cr, uid, uid, context=context).name
- mail = "Hello " + survey_data.responsible_id.name + ",\n\n " + str(user_name) + " has given the Response Of " + survey_data.title + " Survey.\nThe Response has been attached herewith.\n\n Thanks."
- vals = {'state': 'outgoing',
- 'subject': "Survey Answer Of " + user_name,
- 'body_html': '<pre>%s</pre>' % mail,
- 'email_to': [resp_email],
- 'email_from': user_email}
- if attachments:
- vals['attachment_ids'] = [(0,0,{'name': a_name,
- 'datas_fname': a_name,
- 'datas': str(a_content).encode('base64')})
- for a_name, a_content in attachments.items()]
- self.pool.get('mail.mail').create(cr, uid, vals, context=context)
-
- xml_form = etree.Element('form', {'string': _('Complete Survey Answer')})
- xml_footer = etree.SubElement(xml_form, 'footer', {'col': '6', 'colspan': '4' ,'class': 'oe_survey_title_height'})
-
- etree.SubElement(xml_form, 'separator', {'string': 'Survey Completed', 'colspan': "4"})
- etree.SubElement(xml_form, 'label', {'string': 'Thanks for your Answer'})
- etree.SubElement(xml_form, 'newline')
- etree.SubElement(xml_footer, 'button', {'special':"cancel",'string':"OK",'colspan':"2",'class':'oe_highlight'})
- root = xml_form.getroottree()
- result['arch'] = etree.tostring(root)
- result['fields'] = {}
- result['context'] = context
- return result
-
- def create_report(self, cr, uid, res_ids, report_name=False, file_name=False, context=None):
- """
- If any user give answer of survey then last create report of this answer and if 'E-mail Notification on Answer' set True in survey then send mail on responsible person of this survey and attach survey answer report in pdf format.
- """
- if not report_name or not res_ids:
- return (False, Exception('Report name and Resources ids are required !!!'))
- try:
- uid = 1
- result, format = openerp.report.render_report(cr, uid, res_ids, report_name[len('report.'):], {}, context)
- ret_file_name = get_module_resource('survey', 'report') + file_name + '.pdf'
- fp = open(ret_file_name, 'wb+');
- fp.write(result);
- fp.close();
-
- # hr.applicant: if survey answered directly in system: attach report to applicant
- if context.get('active_model') == 'hr.applicant':
- self.pool.get('hr.applicant').write(cr,uid,[context.get('active_ids')[0]],{'response':context.get('response_id')})
- result = base64.b64encode(result)
- file_name = file_name + '.pdf'
- ir_attachment = self.pool.get('ir.attachment').create(cr, uid,
- {'name': file_name,
- 'datas': result,
- 'datas_fname': file_name,
- 'res_model': context.get('active_model'),
- 'res_id': context.get('active_ids')[0]},
- context=context)
-
- except Exception,e:
- return (False, str(e))
- return (True, ret_file_name)
-
- def default_get(self, cr, uid, fields_list, context=None):
- """
- Assign Default value in particular field. If Browse Answers wizard run then read the value into database and Assigne to a particular fields.
- """
- value = {}
- if context is None:
- context = {}
- for field in fields_list:
- if field.split('_')[0] == 'progress':
- tot_page_id = self.pool.get('survey').browse(cr, uid, context.get('survey_id',False))
- tot_per = (float(100) * (int(field.split('_')[2]) + 1) / len(tot_page_id.page_ids))
- value[field] = tot_per
- response_obj = self.pool.get('survey.response')
- surv_name_wiz = self.pool.get('survey.name.wiz')
- if context.has_key('response_id') and context.get('response_id') and int(context['response_id'][0]) > 0:
- data = super(survey_question_wiz, self).default_get(cr, uid, fields_list, context)
- response_ans = response_obj.browse(cr, uid, context['response_id'][context['response_no']])
- fields_list.sort()
-
- for que in response_ans.question_ids:
- for field in fields_list:
- if field.split('_')[0] != "progress" and field.split('_')[0] == str(que.question_id.id):
- if que.response_answer_ids and len(field.split('_')) == 4 and field.split('_')[1] == "commentcolumn" and field.split('_')[3] == "field":
- for ans in que.response_answer_ids:
- if str(field.split('_')[2]) == str(ans.answer_id.id):
- value[field] = ans.comment_field
-
- if que.response_table_ids and len(field.split('_')) == 4 and field.split('_')[1] == "table":
- for ans in que.response_table_ids:
- if str(field.split('_')[2]) == str(ans.column_id.id) and str(field.split('_')[3]) == str(ans.name):
- value[field] = ans.value
-
- if que.comment and (field.split('_')[1] == "comment" or field.split('_')[1] == "other"):
- value[field] = tools.ustr(que.comment)
-
- elif que.single_text and field.split('_')[1] == "single":
- value[field] = tools.ustr(que.single_text)
-
- elif que.response_answer_ids and len(field.split('_')) == 3 and field.split('_')[1] == "selection":
- for ans in que.response_answer_ids:
- if str(field.split('_')[2]) == str( ans.answer_id.id):
- value[field] = str(ans.column_id.id)
-
- elif que.response_answer_ids and len(field.split('_')) == 2 and field.split('_')[1] == "selection":
- value[field] = str(que.response_answer_ids[0].answer_id.id)
-
- elif que.response_answer_ids and len(field.split('_')) == 3 and field.split('_')[2] != "multi" and field.split('_')[2] != "numeric":
- for ans in que.response_answer_ids:
- if str(field.split('_')[1]) == str( ans.answer_id.id) and str(field.split('_')[2]) == str(ans.column_id.id):
- if ans.value_choice:
- value[field] = ans.value_choice
- else:
- value[field] = True
-
- else:
- for ans in que.response_answer_ids:
- if str(field.split('_')[1]) == str( ans.answer_id.id):
- value[field] = ans.answer
-
- else:
-
- if not context.has_key('sur_name_id'):
- return value
- if context.has_key('active') and context.get('active',False):
- return value
- sur_name_read = surv_name_wiz.read(cr, uid, context.get('sur_name_id',False))
- ans_list = []
-
- for key,val in safe_eval(sur_name_read.get('store_ans',"{}")).items():
- for field in fields_list:
- if field in list(val):
- value[field] = val[field]
- return value
-
- def create(self, cr, uid, vals, context=None):
- """
- Create the Answer of survey and store in survey.response object, and if set validation of question then check the value of question if value is wrong then raise the exception.
- """
- if context is None: context = {}
-
- survey_question_wiz_id = super(survey_question_wiz,self).create(cr, uid, {'name': vals.get('name')}, context=context)
- if context.has_key('active') and context.get('active',False):
- return survey_question_wiz_id
-
- for key,val in vals.items():
- if key.split('_')[0] == "progress":
- vals.pop(key)
- if not context.has_key('sur_name_id') and key.split('_')[0] == "wizardid":
- context.update({'sur_name_id': int(key.split('_')[1])})
- vals.pop(key)
-
- click_state = True
- click_update = []
- surv_name_wiz = self.pool.get('survey.name.wiz')
- surv_all_resp_obj = self.pool.get('survey.response')
- surv_tbl_column_obj = self.pool.get('survey.tbl.column.heading')
- survey_obj = self.pool.get('survey')
- resp_obj = self.pool.get('survey.response.line')
- res_ans_obj = self.pool.get('survey.response.answer')
- que_obj = self.pool.get('survey.question')
- sur_name_read = surv_name_wiz.read(cr, uid, context.get('sur_name_id',False), [])
- response_id = 0
-
- if not sur_name_read['response']:
- response_id = surv_all_resp_obj.create(cr, uid, {'response_type':'link', 'user_id':uid, 'date_create':datetime.datetime.now(), 'survey_id' : context['survey_id']})
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id', False)], {'response' : tools.ustr(response_id)})
- else:
- response_id = int(sur_name_read['response'])
-
- if response_id not in surv_all_resp_obj.search(cr, uid, []):
- response_id = surv_all_resp_obj.create(cr, uid, {'response_type':'link', 'user_id':uid, 'date_create':datetime.datetime.now(), 'survey_id' : context.get('survey_id',False)})
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'response' : tools.ustr(response_id)})
-
- #click first time on next button then increemnet on total start suvey
- if not safe_eval(sur_name_read['store_ans']):
- his_id = self.pool.get('survey.history').create(cr, uid, {'user_id': uid, \
- 'date': strftime('%Y-%m-%d %H:%M:%S'), 'survey_id': sur_name_read['survey_id'][0]})
- survey_id = sur_name_read['survey_id'][0]
- sur_rec = survey_obj.read(cr, uid, survey_id)
- survey_obj.write(cr, uid, survey_id, {'tot_start_survey' : sur_rec['tot_start_survey'] + 1})
- if context.has_key('cur_id'):
- if context.has_key('request') and context.get('request',False):
- self.pool[context.get('object')].write(cr, uid, [int(context.get('cur_id',False))], {'response' : response_id})
- self.pool[context.get('object')].survey_req_done(cr, uid, [int(context.get('cur_id'))], context)
- else:
- self.pool[context.get('object')].write(cr, uid, [int(context.get('cur_id',False))], {'response' : response_id})
- if sur_name_read['store_ans'] and type(safe_eval(sur_name_read['store_ans'])) == dict:
- sur_name_read['store_ans'] = safe_eval(sur_name_read['store_ans'])
- for key,val in sur_name_read['store_ans'].items():
- for field in vals:
- if field.split('_')[0] == val['question_id']:
- click_state = False
- click_update.append(key)
- break
- else:
- sur_name_read['store_ans'] = {}
- if click_state:
- que_li = []
- resp_id_list = []
- for key, val in vals.items():
- que_id = key.split('_')[0]
- if que_id not in que_li:
- que_li.append(que_id)
- que_rec = que_obj.read(cr, uid, [int(que_id)], [])[0]
- res_data = {
- 'question_id': que_id,
- 'date_create': datetime.datetime.now(),
- 'state': 'done',
- 'response_id': response_id
- }
- resp_id = resp_obj.create(cr, uid, res_data)
- resp_id_list.append(resp_id)
- sur_name_read['store_ans'].update({resp_id:{'question_id':que_id}})
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'store_ans':sur_name_read['store_ans']})
- select_count = 0
- numeric_sum = 0
- selected_value = []
- matrix_list = []
- comment_field = False
- comment_value = False
- response_list = []
-
- for key1, val1 in vals.items():
- if val1 and key1.split('_')[1] == "table" and key1.split('_')[0] == que_id:
- surv_tbl_column_obj.create(cr, uid, {'response_table_id' : resp_id,'column_id':key1.split('_')[2], 'name':key1.split('_')[3], 'value' : val1})
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- select_count += 1
-
- elif val1 and key1.split('_')[1] == "otherfield" and key1.split('_')[0] == que_id:
- comment_field = True
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- select_count += 1
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'store_ans':sur_name_read['store_ans']})
- continue
-
- elif val1 and key1.split('_')[1] == "selection" and key1.split('_')[0] == que_id:
- if len(key1.split('_')) > 2:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[-1], 'column_id' : val1})
- selected_value.append(val1)
- response_list.append(str(ans_create_id) + "_" + str(key1.split('_')[-1]))
- else:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':val1})
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- select_count += 1
-
- elif key1.split('_')[1] == "other" and key1.split('_')[0] == que_id:
- if not val1:
- comment_value = True
- else:
- error = False
- if que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_specific_length':
- if (not val1 and que_rec['comment_minimum_no']) or len(val1) < que_rec['comment_minimum_no'] or len(val1) > que_rec['comment_maximum_no']:
- error = True
- elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']:
- error = False
- try:
- if que_rec['comment_valid_type'] == 'must_be_whole_number':
- value = int(val1)
- if value < que_rec['comment_minimum_no'] or value > que_rec['comment_maximum_no']:
- error = True
- elif que_rec['comment_valid_type'] == 'must_be_decimal_number':
- value = float(val1)
- if value < que_rec['comment_minimum_float'] or value > que_rec['comment_maximum_float']:
- error = True
- elif que_rec['comment_valid_type'] == 'must_be_date':
- value = datetime.datetime.strptime(val1, "%Y-%m-%d")
- if value < datetime.datetime.strptime(que_rec['comment_minimum_date'], "%Y-%m-%d") or value > datetime.datetime.strptime(que_rec['comment_maximum_date'], "%Y-%m-%d"):
- error = True
- except:
- error = True
- elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_email_address':
- import re
- if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val1) == None:
- error = True
- if error:
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
-
- resp_obj.write(cr, uid, resp_id, {'comment':val1})
- sur_name_read['store_ans'][resp_id].update({key1:val1})
-
- elif val1 and key1.split('_')[1] == "comment" and key1.split('_')[0] == que_id:
- resp_obj.write(cr, uid, resp_id, {'comment':val1})
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- select_count += 1
-
- elif val1 and key1.split('_')[0] == que_id and (key1.split('_')[1] == "single" or (len(key1.split('_')) > 2 and key1.split('_')[2] == 'multi')):
- error = False
- if que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_specific_length':
- if (not val1 and que_rec['validation_minimum_no']) or len(val1) < que_rec['validation_minimum_no'] or len(val1) > que_rec['validation_maximum_no']:
- error = True
- elif que_rec['is_validation_require'] and que_rec['validation_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']:
- error = False
- try:
- if que_rec['validation_type'] == 'must_be_whole_number':
- value = int(val1)
- if value < que_rec['validation_minimum_no'] or value > que_rec['validation_maximum_no']:
- error = True
- elif que_rec['validation_type'] == 'must_be_decimal_number':
- value = float(val1)
- if value < que_rec['validation_minimum_float'] or value > que_rec['validation_maximum_float']:
- error = True
- elif que_rec['validation_type'] == 'must_be_date':
- value = datetime.datetime.strptime(val1, "%Y-%m-%d")
- if value < datetime.datetime.strptime(que_rec['validation_minimum_date'], "%Y-%m-%d") or value > datetime.datetime.strptime(que_rec['validation_maximum_date'], "%Y-%m-%d"):
- error = True
- except:
- error = True
- elif que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_email_address':
- import re
- if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val1) == None:
- error = True
- if error:
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
-
- if key1.split('_')[1] == "single" :
- resp_obj.write(cr, uid, resp_id, {'single_text':val1})
- else:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'answer' : val1})
-
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- select_count += 1
-
- elif val1 and que_id == key1.split('_')[0] and len(key1.split('_')) > 2 and key1.split('_')[2] == 'numeric':
- if not val1=="0":
- try:
- numeric_sum += int(val1)
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'answer' : val1})
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- select_count += 1
- except:
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + _("Please enter an integer value."))
-
- elif val1 and que_id == key1.split('_')[0] and len(key1.split('_')) == 3:
- if type(val1) == type('') or type(val1) == type(u''):
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'column_id' : key1.split('_')[2], 'value_choice' : val1})
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- else:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'column_id' : key1.split('_')[2]})
- sur_name_read['store_ans'][resp_id].update({key1:True})
-
- matrix_list.append(key1.split('_')[0] + '_' + key1.split('_')[1])
- select_count += 1
-
- elif val1 and que_id == key1.split('_')[0] and len(key1.split('_')) == 2:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[-1], 'answer' : val1})
- sur_name_read['store_ans'][resp_id].update({key1:val1})
- select_count += 1
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'store_ans':sur_name_read['store_ans']})
-
- for key,val in vals.items():
- if val and key.split('_')[1] == "commentcolumn" and key.split('_')[0] == que_id:
- for res_id in response_list:
- if key.split('_')[2] in res_id.split('_')[1]:
- a = res_ans_obj.write(cr, uid, [res_id.split('_')[0]], {'comment_field':val})
- sur_name_read['store_ans'][resp_id].update({key:val})
-
- if comment_field and comment_value:
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
-
- if que_rec['type'] == "rating_scale" and que_rec['rating_allow_one_column_require'] and len(selected_value) > len(list(set(selected_value))):
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "'\n" + _("You cannot select the same answer more than one time."))
-
- if not select_count:
- resp_obj.write(cr, uid, resp_id, {'state':'skip'})
-
- if que_rec['numeric_required_sum'] and numeric_sum > que_rec['numeric_required_sum']:
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
-
- if que_rec['type'] in ['multiple_textboxes_diff_type', 'multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']:
- if matrix_list:
- if (que_rec['required_type'] == 'all' and len(list(set(matrix_list))) < len(que_rec['answer_choice_ids'])) or \
- (que_rec['required_type'] == 'at least' and len(list(set(matrix_list))) < que_rec['req_ans']) or \
- (que_rec['required_type'] == 'at most' and len(list(set(matrix_list))) > que_rec['req_ans']) or \
- (que_rec['required_type'] == 'exactly' and len(list(set(matrix_list))) != que_rec['req_ans']) or \
- (que_rec['required_type'] == 'a range' and (len(list(set(matrix_list))) < que_rec['minimum_req_ans'] or len(list(set(matrix_list))) > que_rec['maximum_req_ans'])):
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
-
- elif (que_rec['required_type'] == 'all' and select_count < len(que_rec['answer_choice_ids'])) or \
- (que_rec['required_type'] == 'at least' and select_count < que_rec['req_ans']) or \
- (que_rec['required_type'] == 'at most' and select_count > que_rec['req_ans']) or \
- (que_rec['required_type'] == 'exactly' and select_count != que_rec['req_ans']) or \
- (que_rec['required_type'] == 'a range' and (select_count < que_rec['minimum_req_ans'] or select_count > que_rec['maximum_req_ans'])):
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
-
- if que_rec['type'] in ['multiple_choice_only_one_ans','single_textbox','comment'] and que_rec['is_require_answer'] and select_count <= 0:
- for res in resp_id_list:
- sur_name_read['store_ans'].pop(res)
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
-
- else:
- resp_id_list = []
- for update in click_update:
- que_rec = que_obj.read(cr, uid , [int(sur_name_read['store_ans'][update]['question_id'])], [])[0]
- res_ans_obj.unlink(cr, uid,res_ans_obj.search(cr, uid, [('response_id', '=', update)]))
- surv_tbl_column_obj.unlink(cr, uid,surv_tbl_column_obj.search(cr, uid, [('response_table_id', '=', update)]))
- resp_id_list.append(update)
- sur_name_read['store_ans'].update({update:{'question_id':sur_name_read['store_ans'][update]['question_id']}})
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'store_ans':sur_name_read['store_ans']})
- select_count = 0
- numeric_sum = 0
- selected_value = []
- matrix_list = []
- comment_field = False
- comment_value = False
- response_list = []
-
- for key, val in vals.items():
- ans_id_len = key.split('_')
- if ans_id_len[0] == sur_name_read['store_ans'][update]['question_id']:
- if val and key.split('_')[1] == "table":
- surv_tbl_column_obj.create(cr, uid, {'response_table_id' : update,'column_id':key.split('_')[2], 'name':key.split('_')[3], 'value' : val})
- sur_name_read['store_ans'][update].update({key:val})
- resp_obj.write(cr, uid, update, {'state': 'done'})
-
- elif val and key.split('_')[1] == "otherfield" :
- comment_field = True
- sur_name_read['store_ans'][update].update({key:val})
- select_count += 1
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'store_ans':sur_name_read['store_ans']})
- continue
-
- elif val and key.split('_')[1] == "selection":
- if len(key.split('_')) > 2:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':key.split('_')[-1], 'column_id' : val})
- selected_value.append(val)
- response_list.append(str(ans_create_id) + "_" + str(key.split('_')[-1]))
- else:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id': val})
- resp_obj.write(cr, uid, update, {'state': 'done'})
- sur_name_read['store_ans'][update].update({key:val})
- select_count += 1
-
- elif key.split('_')[1] == "other":
- if not val:
- comment_value = True
- else:
- error = False
- if que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_specific_length':
- if (not val and que_rec['comment_minimum_no']) or len(val) < que_rec['comment_minimum_no'] or len(val) > que_rec['comment_maximum_no']:
- error = True
- elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']:
- try:
- if que_rec['comment_valid_type'] == 'must_be_whole_number':
- value = int(val)
- if value < que_rec['comment_minimum_no'] or value > que_rec['comment_maximum_no']:
- error = True
- elif que_rec['comment_valid_type'] == 'must_be_decimal_number':
- value = float(val)
- if value < que_rec['comment_minimum_float'] or value > que_rec['comment_maximum_float']:
- error = True
- elif que_rec['comment_valid_type'] == 'must_be_date':
- value = datetime.datetime.strptime(val, "%Y-%m-%d")
- if value < datetime.datetime.strptime(que_rec['comment_minimum_date'], "%Y-%m-%d") or value > datetime.datetime.strptime(que_rec['comment_maximum_date'], "%Y-%m-%d"):
- error = True
- except:
- error = True
- elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_email_address':
- import re
- if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None:
- error = True
- if error:
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
- resp_obj.write(cr, uid, update, {'comment':val,'state': 'done'})
- sur_name_read['store_ans'][update].update({key:val})
-
- elif val and key.split('_')[1] == "comment":
- resp_obj.write(cr, uid, update, {'comment':val,'state': 'done'})
- sur_name_read['store_ans'][update].update({key:val})
- select_count += 1
-
- elif val and (key.split('_')[1] == "single" or (len(key.split('_')) > 2 and key.split('_')[2] == 'multi')):
- error = False
- if que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_specific_length':
- if (not val and que_rec['validation_minimum_no']) or len(val) < que_rec['validation_minimum_no'] or len(val) > que_rec['validation_maximum_no']:
- error = True
- elif que_rec['is_validation_require'] and que_rec['validation_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']:
- error = False
- try:
- if que_rec['validation_type'] == 'must_be_whole_number':
- value = int(val)
- if value < que_rec['validation_minimum_no'] or value > que_rec['validation_maximum_no']:
- error = True
- elif que_rec['validation_type'] == 'must_be_decimal_number':
- value = float(val)
- if value < que_rec['validation_minimum_float'] or value > que_rec['validation_maximum_float']:
- error = True
- elif que_rec['validation_type'] == 'must_be_date':
- value = datetime.datetime.strptime(val, "%Y-%m-%d")
- if value < datetime.datetime.strptime(que_rec['validation_minimum_date'], "%Y-%m-%d") or value > datetime.datetime.strptime(que_rec['validation_maximum_date'], "%Y-%m-%d"):
- error = True
- except Exception ,e:
- error = True
- elif que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_email_address':
- import re
- if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None:
- error = True
- if error:
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
- if key.split('_')[1] == "single" :
- resp_obj.write(cr, uid, update, {'single_text':val,'state': 'done'})
- else:
- resp_obj.write(cr, uid, update, {'state': 'done'})
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':ans_id_len[1], 'answer' : val})
- sur_name_read['store_ans'][update].update({key:val})
- select_count += 1
-
- elif val and len(key.split('_')) > 2 and key.split('_')[2] == 'numeric':
- if not val=="0":
- try:
- numeric_sum += int(val)
- resp_obj.write(cr, uid, update, {'state': 'done'})
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id': update, 'answer_id':ans_id_len[1], 'answer' : val})
- sur_name_read['store_ans'][update].update({key:val})
- select_count += 1
- except:
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "'\n" + _("Please enter an integer value."))
-
- elif val and len(key.split('_')) == 3:
- resp_obj.write(cr, uid, update, {'state': 'done'})
- if type(val) == type('') or type(val) == type(u''):
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id': update, 'answer_id':ans_id_len[1], 'column_id' : ans_id_len[2], 'value_choice' : val})
- sur_name_read['store_ans'][update].update({key:val})
- else:
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id': update, 'answer_id':ans_id_len[1], 'column_id' : ans_id_len[2]})
- sur_name_read['store_ans'][update].update({key:True})
- matrix_list.append(key.split('_')[0] + '_' + key.split('_')[1])
- select_count += 1
-
- elif val and len(key.split('_')) == 2:
- resp_obj.write(cr, uid, update, {'state': 'done'})
- ans_create_id = res_ans_obj.create(cr, uid, {'response_id': update, 'answer_id':ans_id_len[-1], 'answer' : val})
- sur_name_read['store_ans'][update].update({key:val})
- select_count += 1
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'store_ans': sur_name_read['store_ans']})
-
- for key,val in vals.items():
- if val and key.split('_')[1] == "commentcolumn" and key.split('_')[0] == sur_name_read['store_ans'][update]['question_id']:
- for res_id in response_list:
- if key.split('_')[2] in res_id.split('_')[1]:
- a = res_ans_obj.write(cr, uid, [res_id.split('_')[0]], {'comment_field':val})
- sur_name_read['store_ans'][update].update({key:val})
-
- if comment_field and comment_value:
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
-
- if que_rec['type'] == "rating_scale" and que_rec['rating_allow_one_column_require'] and len(selected_value) > len(list(set(selected_value))):
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "\n" + _("You cannot select same answer more than one time.'"))
-
- if que_rec['numeric_required_sum'] and numeric_sum > que_rec['numeric_required_sum']:
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
-
- if not select_count:
- resp_obj.write(cr, uid, update, {'state': 'skip'})
-
- if que_rec['type'] in ['multiple_textboxes_diff_type','multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']:
- if matrix_list:
- if (que_rec['required_type'] == 'all' and len(list(set(matrix_list))) < len(que_rec['answer_choice_ids'])) or \
- (que_rec['required_type'] == 'at least' and len(list(set(matrix_list))) < que_rec['req_ans']) or \
- (que_rec['required_type'] == 'at most' and len(list(set(matrix_list))) > que_rec['req_ans']) or \
- (que_rec['required_type'] == 'exactly' and len(list(set(matrix_list))) != que_rec['req_ans']) or \
- (que_rec['required_type'] == 'a range' and (len(list(set(matrix_list))) < que_rec['minimum_req_ans'] or len(list(set(matrix_list))) > que_rec['maximum_req_ans'])):
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
-
- elif (que_rec['required_type'] == 'all' and select_count < len(que_rec['answer_choice_ids'])) or \
- (que_rec['required_type'] == 'at least' and select_count < que_rec['req_ans']) or \
- (que_rec['required_type'] == 'at most' and select_count > que_rec['req_ans']) or \
- (que_rec['required_type'] == 'exactly' and select_count != que_rec['req_ans']) or \
- (que_rec['required_type'] == 'a range' and (select_count < que_rec['minimum_req_ans'] or select_count > que_rec['maximum_req_ans'])):
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
-
- if que_rec['type'] in ['multiple_choice_only_one_ans','single_textbox','comment'] and que_rec['is_require_answer'] and select_count <= 0:
- raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
-
- return survey_question_wiz_id
-
- def action_new_question(self, cr, uid, ids, context=None):
- """
- New survey.Question form.
- """
- if context is None:
- context = {}
- for key,val in context.items():
- if type(key) == type(True):
- context.pop(key)
- view_id = self.pool.get('ir.ui.view').search(cr,uid,[('model','=','survey.question'),\
- ('name','=','survey_question_wizard_test')])
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'view_id': view_id,
- 'page_id': int(context.get('page_id',0)),
- 'context': context
- }
-
- def action_new_page(self, cr, uid, ids, context=None):
- """
- New survey.Page form.
- """
- if context is None:
- context = {}
- for key,val in context.items():
- if type(key) == type(True):
- context.pop(key)
- view_id = self.pool.get('ir.ui.view').search(cr,uid,[('model','=','survey.page'),\
- ('name','=','survey_page_wizard_test')])
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.page',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'view_id': view_id,
- 'context': context
- }
-
- def action_edit_page(self, cr, uid, ids, context=None):
- """
- Edit survey.page.
- """
- if context is None:
- context = {}
- for key,val in context.items():
- if type(key) == type(True):
- context.pop(key)
- view_id = self.pool.get('ir.ui.view').search(cr,uid,[('model','=','survey.page'),\
- ('name','=','survey_page_wizard_test')])
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.page',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'res_id': int(context.get('page_id',0)),
- 'view_id': view_id,
- 'context': context
- }
-
- def action_delete_page(self, cr, uid, ids, context=None):
- """
- Delete survey.page.
- """
- if context is None:
- context = {}
- for key,val in context.items():
- if type(key) == type(True):
- context.pop(key)
-
- self.pool.get('survey.page').unlink(cr, uid, [context.get('page_id',False)])
- for survey in self.pool.get('survey').browse(cr, uid, [context.get('survey_id',False)], context=context):
- if not survey.page_ids:
- return {'type':'ir.actions.act_window_close'}
-
- search_id = self.pool.get('ir.ui.view').search(cr,uid,[('model','=','survey.question.wiz'),\
- ('name','=','Survey Search')])
- surv_name_wiz = self.pool.get('survey.name.wiz')
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], \
- {'transfer':True, 'page_no' : context.get('page_number',False) })
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id':search_id[0],
- 'context': context
- }
-
- def action_edit_question(self, cr, uid, ids, context=None):
- """
- Edit survey.question.
- """
- if context is None:
- context = {}
- for key,val in context.items():
- if type(key) == type(True):
- context.pop(key)
- view_id = self.pool.get('ir.ui.view').search(cr,uid,[('model','=','survey.question'),\
- ('name','=','survey_question_wizard_test')])
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'res_id' : int(context.get('question_id',0)),
- 'view_id': view_id,
- 'context': context
- }
-
- def action_delete_question(self, cr, uid, ids, context=None):
- """
- Delete survey.question.
- """
- if context is None:
- context = {}
- for key,val in context.items():
- if type(key) == type(True):
- context.pop(key)
-
- que_obj = self.pool.get('survey.question')
- que_obj.unlink(cr, uid, [context.get('question_id',False)])
- search_id = self.pool.get('ir.ui.view').search(cr,uid,[('model','=','survey.question.wiz'),\
- ('name','=','Survey Search')])
- surv_name_wiz = self.pool.get('survey.name.wiz')
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)],\
- {'transfer':True, 'page_no' : context.get('page_number',0) })
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
- def action_forward_previous(self, cr, uid, ids, context=None):
- """
- Goes to previous Survey Answer.
- """
- if context is None:
- context = {}
- search_obj = self.pool.get('ir.ui.view')
- surv_name_wiz = self.pool.get('survey.name.wiz')
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),\
- ('name','=','Survey Search')])
- wiz_id = surv_name_wiz.create(cr,uid, {'survey_id': context.get('survey_id',False),'page_no' :-1,'page':'next','transfer' :1,'response':0})
- context.update({'sur_name_id' :wiz_id, 'response_no': context.get('response_no',0) - 1})
-
- if context.get('response_no',0) + 1 > len(context.get('response_id',0)):
- return {}
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
- def action_forward_next(self, cr, uid, ids, context=None):
- """
- Goes to Next Survey Answer.
- """
- if context is None:
- context = {}
- search_obj = self.pool.get('ir.ui.view')
- surv_name_wiz = self.pool.get('survey.name.wiz')
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),\
- ('name','=','Survey Search')])
- wiz_id = surv_name_wiz.create(cr,uid, {'survey_id' : context.get('survey_id',False),'page_no' :-1,'page':'next','transfer' :1,'response':0})
- context.update({'sur_name_id' :wiz_id, 'response_no' : context.get('response_no',0) + 1})
-
- if context.get('response_no',0) + 1 > len(context.get('response_id',0)):
- return {}
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
- def action_next(self, cr, uid, ids, context=None):
- """
- Goes to Next page.
- """
- if context is None:
- context = {}
- surv_name_wiz = self.pool.get('survey.name.wiz')
- search_obj = self.pool.get('ir.ui.view')
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'transfer':True, 'page':'next'})
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
- def action_previous(self, cr, uid, ids, context=None):
- """
- Goes to previous page.
- """
- if context is None:
- context = {}
- surv_name_wiz = self.pool.get('survey.name.wiz')
- search_obj = self.pool.get('ir.ui.view')
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),\
- ('name','=','Survey Search')])
- surv_name_wiz.write(cr, uid, [context.get('sur_name_id',False)], {'transfer':True, 'page':'previous'})
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/wizard/survey_answer.xml b/addons/survey/wizard/survey_answer.xml
deleted file mode 100644
index b02f9fb2be5..00000000000
--- a/addons/survey/wizard/survey_answer.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
-
- <!--
- Survey Question Wizard
- -->
- <record id="view_survey_question_message" model="ir.ui.view">
- <field name="name">Survey Answer</field>
- <field name="model">survey.question.wiz</field>
- <field name="arch" type="xml">
- <form string="Your Messages" version="7.0">
- <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="arch" type="xml">
- <search string="Your Messages">
- <field name="name"/>
- </search>
- </field>
- </record>
-
- <record id="action_view_survey_question_message" model="ir.actions.act_window">
- <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>
-
- </data>
-</openerp>
diff --git a/addons/survey/wizard/survey_browse_answer.py b/addons/survey/wizard/survey_browse_answer.py
deleted file mode 100644
index 1b461761bb5..00000000000
--- a/addons/survey/wizard/survey_browse_answer.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
-#
-# 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/>.
-#
-##############################################################################
-
-from openerp.osv import fields, osv
-
-class survey_browse_answer(osv.osv_memory):
- _name = 'survey.browse.answer'
-
- _columns = {
- 'survey_id': fields.many2one('survey', "Survey", required="1"),
- 'response_id': fields.many2one("survey.response", "Survey Answers", help="If this field is empty, all answers of the selected survey will be print."),
- }
-
- def action_next(self, cr, uid, ids, context=None):
- """
- Open Browse Response wizard. if you select only survey_id then this wizard open with all response_ids and
- if you select survey_id and response_id then open the particular response of the survey.
- """
- if context is None: context = {}
- record = self.read(cr, uid, ids, [])
- record = record and record[0] or {}
- if record['response_id']:
- res_id = [(record.get('response_id') and record['response_id'][0])]
- else:
- sur_response_obj = self.pool.get('survey.response')
- res_id = sur_response_obj.search(cr, uid, [('survey_id', '=', record['survey_id'][0])])
- context.update({'active' : True,'survey_id' : record['survey_id'][0], 'response_id' : res_id, 'response_no' : 0})
- search_obj = self.pool.get('ir.ui.view')
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id':search_id[0],
- 'context' : context
- }
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/wizard/survey_browse_answer.xml b/addons/survey/wizard/survey_browse_answer.xml
deleted file mode 100644
index 4f2adb85743..00000000000
--- a/addons/survey/wizard/survey_browse_answer.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
-
- <!--
- Browse Response Wizard (Survey Browse answer)
- -->
-
- <record id="view_survey_answer" model="ir.ui.view">
- <field name="name">Survey</field>
- <field name="model">survey.browse.answer</field>
- <field name="arch" type="xml">
- <form string="Survey" version="7.0">
- <group col="4">
- <field name="survey_id"/>
- <field name="response_id" domain="[('survey_id','=', survey_id)]"/>
- </group>
- <footer>
- <button name="action_next" string="Start" type="object" class="oe_highlight"/>
- or
- <button string="Cancel" class="oe_link" special="cancel" />
- </footer>
- </form>
- </field>
- </record>
-
- <record id="action_browse_survey_response"
- model="ir.actions.act_window">
- <field name="name">Answer Survey</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">survey.browse.answer</field>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
-
- <menuitem name="Browse Answers" id="menu_browse_survey_response"
- action="action_browse_survey_response" parent="base.next_id_10"
- groups="base.group_tool_manager" icon="STOCK_PRINT_PREVIEW"/>
-
- </data>
-</openerp>
diff --git a/addons/survey/wizard/survey_email_compose_message.py b/addons/survey/wizard/survey_email_compose_message.py
new file mode 100644
index 00000000000..22f204b9427
--- /dev/null
+++ b/addons/survey/wizard/survey_email_compose_message.py
@@ -0,0 +1,225 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
+#
+# 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/>
+#
+##############################################################################
+
+from openerp.osv import osv
+from openerp.osv import fields
+from openerp.tools.translate import _
+from datetime import datetime
+
+import re
+import uuid
+import urlparse
+
+emails_split = re.compile(r"[;,\n\r]+")
+
+
+class survey_mail_compose_message(osv.TransientModel):
+ _name = 'survey.mail.compose.message'
+ _inherit = 'mail.compose.message'
+ _description = 'Email composition wizard for Survey'
+ _log_access = True
+
+ def _get_public_url(self, cr, uid, ids, name, arg, context=None):
+ res = dict((id, 0) for id in ids)
+ survey_obj = self.pool.get('survey.survey')
+ for wizard in self.browse(cr, uid, ids, context=context):
+ res[wizard.id] = survey_obj.browse(cr, uid, wizard.survey_id, context=context).public_url
+ return res
+
+ def _get_public_url_html(self, cr, uid, ids, name, arg, context=None):
+ """ Compute if the message is unread by the current user """
+ urls = self._get_public_url(cr, uid, ids, name, arg, context=context)
+ for key, url in urls.items():
+ urls[key] = '<a href="%s">%s</a>' % (url, _("Click here to start survey"))
+ return urls
+
+ _columns = {
+ 'survey_id': fields.many2one('survey.survey', 'Survey', required=True),
+ 'public': fields.selection([('public_link', 'Share the public web link to your audience.'),
+ ('email_public_link', 'Send by email the public web link to your audience.'),
+ ('email_private', 'Send private invitation to your audience (only one response per recipient and per invitation).')],
+ string='Share options', required=True),
+ 'public_url': fields.function(_get_public_url, string="Public url", type="char"),
+ 'public_url_html': fields.function(_get_public_url_html, string="Public HTML web link", type="char"),
+ 'partner_ids': fields.many2many('res.partner',
+ 'survey_mail_compose_message_res_partner_rel',
+ 'wizard_id', 'partner_id', 'Existing contacts'),
+ 'attachment_ids': fields.many2many('ir.attachment',
+ 'survey_mail_compose_message_ir_attachments_rel',
+ 'wizard_id', 'attachment_id', 'Attachments'),
+ 'multi_email': fields.text(string='List of emails', help="This list of emails of recipients will not converted in contacts. Emails separated by commas, semicolons or newline."),
+ 'date_deadline': fields.date(string="Deadline to which the invitation to respond is valid", help="Deadline to which the invitation to respond for this survey is valid. If the field is empty, the invitation is still valid."),
+ }
+
+ _defaults = {
+ 'public': 'public_link',
+ 'survey_id': lambda self, cr, uid, ctx={}: ctx.get('model') == 'survey.survey' and ctx.get('res_id') or None
+ }
+
+ def default_get(self, cr, uid, fields, context=None):
+ res = super(survey_mail_compose_message, self).default_get(cr, uid, fields, context=context)
+ if context.get('active_model') == 'res.partner' and context.get('active_ids'):
+ res.update({'partner_ids': context.get('active_ids')})
+ return res
+
+ def onchange_multi_email(self, cr, uid, ids, multi_email, context=None):
+ emails = list(set(emails_split.split(multi_email or "")))
+ emails_checked = []
+ error_message = ""
+ for email in emails:
+ email = email.strip()
+ if email:
+ if not re.search(r"^[^@]+@[^@]+$", email):
+ error_message += "\n'%s'" % email
+ else:
+ emails_checked.append(email)
+ if error_message:
+ raise osv.except_osv(_('Warning!'), _("One email at least is incorrect: %s" % error_message))
+
+ emails_checked.sort()
+ values = {'multi_email': '\n'.join(emails_checked)}
+ return {'value': values}
+
+ def onchange_survey_id(self, cr, uid, ids, survey_id, context=None):
+ """ Compute if the message is unread by the current user. """
+ if survey_id:
+ survey = self.pool.get('survey.survey').browse(cr, uid, survey_id, context=context)
+ return {
+ 'value': {
+ 'subject': survey.title,
+ 'public_url': survey.public_url,
+ 'public_url_html': '<a href="%s">%s</a>' % (survey.public_url, _("Click here to take survey")),
+ }}
+ else:
+ txt = _("Please select a survey")
+ return {
+ 'value': {
+ 'public_url': txt,
+ 'public_url_html': txt,
+ }}
+
+ #------------------------------------------------------
+ # Wizard validation and send
+ #------------------------------------------------------
+
+ def send_mail(self, cr, uid, ids, context=None):
+ """ Process the wizard content and proceed with sending the related
+ email(s), rendering any template patterns on the fly if needed """
+ if context is None:
+ context = {}
+
+ survey_response_obj = self.pool.get('survey.user_input')
+ partner_obj = self.pool.get('res.partner')
+ mail_mail_obj = self.pool.get('mail.mail')
+ try:
+ model, anonymous_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'portal', 'group_anonymous')
+ except ValueError:
+ anonymous_id = None
+
+ def create_response_and_send_mail(wizard, token, partner_id, email):
+ """ Create one mail by recipients and replace __URL__ by link with identification token """
+ #set url
+ url = wizard.survey_id.public_url
+
+ url = urlparse.urlparse(url).path[1:] # dirty hack to avoid incorrect urls
+
+ if token:
+ url = url + '/' + token
+
+ # post the message
+ values = {
+ 'model': None,
+ 'res_id': None,
+ 'subject': wizard.subject,
+ 'body': wizard.body.replace("__URL__", url),
+ 'body_html': wizard.body.replace("__URL__", url),
+ 'parent_id': None,
+ 'partner_ids': partner_id and [(4, partner_id)] or None,
+ 'notified_partner_ids': partner_id and [(4, partner_id)] or None,
+ 'attachment_ids': wizard.attachment_ids or None,
+ 'email_from': wizard.email_from or None,
+ 'email_to': email,
+ }
+ mail_id = mail_mail_obj.create(cr, uid, values, context=context)
+ mail_mail_obj.send(cr, uid, [mail_id], context=context)
+
+ def create_token(wizard, partner_id, email):
+ if context.get("survey_resent_token"):
+ response_ids = survey_response_obj.search(cr, uid, [('survey_id', '=', wizard.survey_id.id), ('state', 'in', ['new', 'skip']), '|', ('partner_id', '=', partner_id), ('email', '=', email)], context=context)
+ if response_ids:
+ return survey_response_obj.read(cr, uid, response_ids, ['token'], context=context)[0]['token']
+ if wizard.public != 'email_private':
+ return None
+ else:
+ token = uuid.uuid4().__str__()
+ # create response with token
+ survey_response_obj.create(cr, uid, {
+ 'survey_id': wizard.survey_id.id,
+ 'deadline': wizard.date_deadline,
+ 'date_create': datetime.now(),
+ 'type': 'link',
+ 'state': 'new',
+ 'token': token,
+ 'partner_id': partner_id,
+ 'email': email})
+ return token
+
+ for wizard in self.browse(cr, uid, ids, context=context):
+ # check if __URL__ is in the text
+ if wizard.body.find("__URL__") < 0:
+ raise osv.except_osv(_('Warning!'), _("The content of the text don't contain '__URL__'. \
+ __URL__ is automaticaly converted into the special url of the survey."))
+
+ if not wizard.multi_email and not wizard.partner_ids and (context.get('default_partner_ids') or context.get('default_multi_email')):
+ wizard.multi_email = context.get('default_multi_email')
+ wizard.partner_ids = context.get('default_partner_ids')
+
+ # quick check of email list
+ emails_list = []
+ if wizard.multi_email:
+ emails = list(set(emails_split.split(wizard.multi_email)) - set([partner.email for partner in wizard.partner_ids]))
+ for email in emails:
+ email = email.strip()
+ if re.search(r"^[^@]+@[^@]+$", email):
+ emails_list.append(email)
+
+ # remove public anonymous access
+ partner_list = []
+ for partner in wizard.partner_ids:
+ if not anonymous_id or not partner.user_ids or anonymous_id not in [x.id for x in partner.user_ids[0].groups_id]:
+ partner_list.append({'id': partner.id, 'email': partner.email})
+
+ if not len(emails_list) and not len(partner_list):
+ if wizard.model == 'res.partner' and wizard.res_id:
+ return False
+ raise osv.except_osv(_('Warning!'), _("Please enter at least one valid recipient."))
+
+ for email in emails_list:
+ partner_id = partner_obj.search(cr, uid, [('email', '=', email)], context=context)
+ partner_id = partner_id and partner_id[0] or None
+ token = create_token(wizard, partner_id, email)
+ create_response_and_send_mail(wizard, token, partner_id, email)
+
+ for partner in partner_list:
+ token = create_token(wizard, partner['id'], partner['email'])
+ create_response_and_send_mail(wizard, token, partner['id'], partner['email'])
+
+ return {'type': 'ir.actions.act_window_close'}
diff --git a/addons/survey/wizard/survey_email_compose_message.xml b/addons/survey/wizard/survey_email_compose_message.xml
new file mode 100644
index 00000000000..cef59019945
--- /dev/null
+++ b/addons/survey/wizard/survey_email_compose_message.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <!--Survey send invitation by email: template -->
+ <record id="email_template_survey" model="email.template">
+ <field name="name">Survey - Send by Email</field>
+ <field name="model_id" ref="model_survey_survey" />
+ <field name="auto_delete" eval="True" />
+ <field name="body_html">
+ <![CDATA[
+ <div style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); ">
+ <p>Hello,</p>
+ <p>We are conducting a survey, and your response would be appreciated.</p>
+ <p><a href="__URL__">Please, click here to start survey</a></p>
+ <p>Thanks for your participation!</p>
+ </div>
+ ]]>
+ </field>
+ </record>
+
+ <!-- Replace the default mass-mailing wizard in base with the composition wizard -->
+ <act_window name="Partner Survey Mailing" res_model="survey.mail.compose.message" src_model="res.partner" view_mode="form" multi="True" target="new" key2="client_action_multi" id="survey.action_partner_survey_mail" context="{'default_use_template': True, 'default_template_id': ref('email_template_survey')}" />
+
+ <!-- Composition form (context['survey_resent_token'], if True, hide share option, emails list and partner_ids) -->
+ <record model="ir.ui.view" id="survey_email_compose_message">
+ <field name="name">survey.mail.compose.message.form</field>
+ <field name="model">survey.mail.compose.message</field>
+ <field name="arch" type="xml">
+ <form string="Compose Email" version="7.0">
+ <field name="composition_mode" invisible="1"/>
+ <field name="model" invisible="1"/>
+ <field name="res_id" invisible="1"/>
+ <field name="parent_id" invisible="1"/>
+ <group col="2">
+ <field name="survey_id" readonly="context.get('default_survey_id')" on_change="onchange_survey_id(survey_id)" />
+ <field name="public" widget="radio" invisible="context.get('survey_resent_token')" />
+ </group>
+ <group col="1" invisible="context.get('survey_resent_token')" attrs="{'invisible':[('public','in',['email_private', 'email_public_link'])]}" class="oe_survey_email_public">
+ <div>
+ You can share your survey web public link and/or send private invitations to your audience. People can answer once per invitation, and whenever they want with the public web link (in this case, the "Public in website" setting must be enabled).
+ </div>
+ <div>Copy, paste and share the web link below to your audience.</div>
+ <code><field name="public_url"/></code>
+ <div>Copy and paste the HTML code below to add this web link to any webpage.</div>
+ <code><field name="public_url_html" /></code>
+ </group>
+ <group col="1" attrs="{'invisible':['|',('public','=',False),('public','in',['public_link'])]}">
+ <group col="2">
+ <field invisible="context.get('survey_resent_token')" name="partner_ids" widget="many2many_tags_email" placeholder="Add list of existing contacts..." context="{'force_email':True, 'show_email':True}" />
+ <field invisible="context.get('survey_resent_token')" name="multi_email" placeholder="Add list of email of recipients (will not converted in partner), separated by commas, semicolons or newline..." on_change="onchange_multi_email(multi_email)" no_resize="1" />
+ <field name="subject" placeholder="Subject..."/>
+ </group>
+ <field name="body" />
+ <group col="2">
+ <div>
+ <label for="attachment_ids" />
+ <field name="attachment_ids" widget="many2many_binary" />
+ </div>
+ <div class="oe_survey_date_deadline">
+ <label for="date_deadline" />
+ <field name="date_deadline" />
+ </div>
+ </group>
+ </group>
+ <footer attrs="{'invisible':[('public','in',['email_private', 'email_public_link'])]}">
+ <button string="Close" class="oe_link" special="cancel" />
+ </footer>
+ <footer attrs="{'invisible':['|',('public','=',False),('public','in',['public_link'])]}">
+ <button string="Send" name="send_mail" type="object" class="oe_highlight" />
+ or
+ <button string="Cancel" class="oe_link" special="cancel" />
+ <group class="oe_right" col="1">
+ <div>
+ Use template
+ <field name="template_id" nolabel="1" on_change="onchange_template_id(template_id, composition_mode, model, res_id, context)" />
+ </div>
+ <button icon="/email_template/static/src/img/email_template_save.png" type="object" name="save_as_template" string="Save as new template" class="oe_link" help="Save as a new template" />
+ </group>
+ </footer>
+ </form>
+ </field>
+ </record>
+ </data>
+</openerp>
diff --git a/addons/survey/wizard/survey_print.py b/addons/survey/wizard/survey_print.py
deleted file mode 100644
index f0e39f99cb9..00000000000
--- a/addons/survey/wizard/survey_print.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
-#
-# 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/>.
-#
-##############################################################################
-
-from openerp.osv import fields, osv
-from openerp.tools.translate import _
-
-class survey_print(osv.osv_memory):
- _name = 'survey.print'
- _columns = {
- 'survey_ids': fields.many2many('survey', string="Survey", required="1"),
- 'orientation' : fields.selection([('vertical','Portrait(Vertical)'),\
- ('horizontal','Landscape(Horizontal)')], 'Orientation'),
- 'paper_size' : fields.selection([('letter','Letter (8.5" x 11")'),\
- ('legal','Legal (8.5" x 14")'),('a4','A4 (210mm x 297mm)')], 'Paper Size'),
- 'page_number' : fields.boolean('Include Page Number'),
- 'without_pagebreak' : fields.boolean('Print Without Page Breaks'),
- }
-
- _defaults = {
- 'orientation': lambda *a:'vertical',
- 'paper_size': lambda *a:'letter',
- 'page_number':lambda *a: 0,
- 'without_pagebreak':lambda *a: 0
- }
-
- def action_next(self, cr, uid, ids, context=None):
- """
- Print Survey Form(print template of the survey).
-
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Survey IDs
- @param context: A standard dictionary for contextual values
- @return : Dictionary value for print survey form.
- """
- datas = {'ids' : self.read(cr, uid, ids, ['survey_ids'], context=context)[0]['survey_ids']}
- res = self.read(cr, uid, ids, ['survey_title', 'orientation', 'paper_size',\
- 'page_number', 'without_pagebreak'], context=context)
- res = res and res[0] or {}
- datas['form'] = res
- datas['model'] = 'survey.print'
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'survey.form',
- 'datas': datas,
- }
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/wizard/survey_print.xml b/addons/survey/wizard/survey_print.xml
deleted file mode 100644
index b539b844654..00000000000
--- a/addons/survey/wizard/survey_print.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
-
- <!-- Survey Print Form View -->
-
- <record id="view_survey_print" model="ir.ui.view">
- <field name="name">Survey Print</field>
- <field name="model">survey.print</field>
- <field name="arch" type="xml">
- <form string="Survey Print" version="7.0">
- <group col="4">
- <separator string="Survey" colspan="4"/>
- <field name="survey_ids" nolabel="1" colspan="4" />
- <separator string="Print Option" colspan="4"/>
- <field name="orientation" colspan="4"/>
- <field name="paper_size" colspan="4"/>
- <field name="page_number" colspan="4"/>
- <field name="without_pagebreak" colspan="4"/>
- </group>
- <footer>
- <button name="action_next" string="Print" type="object" class="oe_highlight"/>
- or
- <button string="Cancel" class="oe_link" special="cancel" />
- </footer>
- </form>
- </field>
- </record>
-
- <!-- Survey Print action -->
-
- <record id="action_view_survey_print" model="ir.actions.act_window">
- <field name="name">Print Survey</field>
- <field name="res_model">survey.print</field>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
-
- <menuitem name="Print Surveys" id="menu_print_survey_form" sequence="1"
- action="action_view_survey_print" parent="base.next_id_10"
- groups="base.group_tool_manager" icon="STOCK_PRINT"/>
-
- </data>
-</openerp>
diff --git a/addons/survey/wizard/survey_print_answer.py b/addons/survey/wizard/survey_print_answer.py
deleted file mode 100644
index 417d1bb732f..00000000000
--- a/addons/survey/wizard/survey_print_answer.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
-#
-# 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/>.
-#
-##############################################################################
-
-from openerp.osv import fields, osv
-from openerp.tools.translate import _
-
-class survey_print_answer(osv.osv_memory):
- _name = 'survey.print.answer'
- _columns = {
- 'response_ids': fields.many2many('survey.response','survey_print_response',\
- 'response_id','print_id', "Answer", required="1"),
- 'orientation': fields.selection([('vertical','Portrait(Vertical)'),\
- ('horizontal','Landscape(Horizontal)')], 'Orientation'),
- 'paper_size': fields.selection([('letter','Letter (8.5" x 11")'),\
- ('legal','Legal (8.5" x 14")'),\
- ('a4','A4 (210mm x 297mm)')], 'Paper Size'),
- 'page_number': fields.boolean('Include Page Number'),
- 'without_pagebreak': fields.boolean('Print Without Page Breaks')
- }
-
- _defaults = {
- 'orientation': lambda *a:'vertical',
- 'paper_size': lambda *a:'letter',
- 'page_number': lambda *a: 0,
- 'without_pagebreak': lambda *a: 0
- }
-
- def action_next(self, cr, uid, ids, context=None):
- """
- Print Survey Answer in pdf format.
-
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of print answer IDs
- @param context: A standard dictionary for contextual values
- @return : Dictionary value for created survey answer report
- """
- if context is None:
- context = {}
- datas = {'ids': context.get('active_ids', [])}
- res = self.read(cr, uid, ids, ['response_ids', 'orientation', 'paper_size',\
- 'page_number', 'without_pagebreak'], context=context)
- res = res and res[0] or {}
- datas['form'] = res
- datas['model'] = 'survey.print.answer'
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'survey.browse.response',
- 'datas': datas,
- }
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/wizard/survey_print_answer.xml b/addons/survey/wizard/survey_print_answer.xml
deleted file mode 100644
index f3c8d01a62c..00000000000
--- a/addons/survey/wizard/survey_print_answer.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
-
- <!-- Survey Print answer Form View -->
-
- <record id="view_survey_print_answer" model="ir.ui.view">
- <field name="name">Survey Print Answer</field>
- <field name="model">survey.print.answer</field>
- <field name="arch" type="xml">
- <form string="Print Answer" version="7.0">
- <group col="4">
- <separator string="Answer" colspan="4"/>
- <field name="response_ids" nolabel="1" colspan="4" />
- <separator string="Print Option" colspan="4"/>
- <field name="orientation" colspan="4"/>
- <field name="paper_size" colspan="4"/>
- <field name="page_number" colspan="4"/>
- <field name="without_pagebreak" colspan="4"/>
- </group>
- <footer>
- <button name="action_next" string="Print" type="object" class="oe_highlight"/>
- or
- <button string="Cancel" class="oe_link" special="cancel" />
- </footer>
- </form>
- </field>
- </record>
-
- <!-- Survey Print answer action -->
-
- <record id="action_view_survey_print_answer"
- model="ir.actions.act_window">
- <field name="name">Print Answer</field>
- <field name="res_model">survey.print.answer</field>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
-
- <menuitem name="Surveys Answers" action="action_view_survey_print_answer" id="menu_print_survey_answer"
- parent="base.next_id_10" icon="STOCK_PRINT" groups="base.group_tool_manager"/>
-
- </data>
-</openerp>
diff --git a/addons/survey/wizard/survey_print_statistics.xml b/addons/survey/wizard/survey_print_statistics.xml
deleted file mode 100644
index 6d63cf8b9bf..00000000000
--- a/addons/survey/wizard/survey_print_statistics.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
-
- <!-- Survey Print Statistics Form View -->
-
- <record id="view_survey_print_statistics" model="ir.ui.view">
- <field name="name">Survey Print Statistics</field>
- <field name="model">survey.print.statistics</field>
- <field name="arch" type="xml">
- <form string="Survey Print Statistics" version="7.0">
- <field name="survey_ids"/>
- <footer>
- <button name="action_next" string="Print" type="object" class="oe_highlight"/>
- or
- <button string="Cancel" class="oe_link" special="cancel" />
- </footer>
- </form>
- </field>
- </record>
-
- <!-- Survey Print Statistics action -->
-
- <record id="action_view_survey_print_statistics"
- model="ir.actions.act_window">
- <field name="name">Survey Print Statistics</field>
- <field name="res_model">survey.print.statistics</field>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
-
- <menuitem name="Surveys Statistics" action="action_view_survey_print_statistics" id="menu_print_survey_statistics"
- parent="base.next_id_10" icon="STOCK_PRINT" groups="base.group_tool_manager"/>
-
- </data>
-</openerp>
diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py
deleted file mode 100644
index a8f83ba0361..00000000000
--- a/addons/survey/wizard/survey_selection.py
+++ /dev/null
@@ -1,105 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
-#
-# 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/>.
-#
-##############################################################################
-
-from lxml import etree
-
-from openerp.osv import fields, osv
-from openerp.tools.translate import _
-
-class survey_name_wiz(osv.osv_memory):
- _name = 'survey.name.wiz'
-
- _columns = {
- 'survey_id': fields.many2one('survey', 'Survey', required=True, ondelete='cascade', domain= [('state', '=', 'open')]),
- 'page_no': fields.integer('Page Number'),
- 'note': fields.text("Description"),
- 'page': fields.char('Page Position',size = 12),
- 'transfer': fields.boolean('Page Transfer'),
- 'store_ans': fields.text('Store Answer'),
- 'response': fields.char('Answer',size=16)
- }
- _defaults = {
- 'page_no': -1,
- 'page': 'next',
- 'transfer': 1,
- 'response': 0,
- 'survey_id': lambda self,cr,uid,context:context.get('survey_id',False),
- 'store_ans': '{}' #Setting the default pattern as '{}' as the field is of type text. The field always gets the value in dict format
- }
-
- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- res = super(survey_name_wiz, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
- if uid != 1:
- survey_obj = self.pool.get('survey')
- line_ids = survey_obj.search(cr, uid, [('invited_user_ids','in',uid)], context=context)
- domain = str([('id', 'in', line_ids)])
- doc = etree.XML(res['arch'])
- nodes = doc.xpath("//field[@name='survey_id']")
- for node in nodes:
- node.set('domain', domain)
- res['arch'] = etree.tostring(doc)
- return res
-
- def action_next(self, cr, uid, ids, context=None):
- """
- Start the survey, Increment in started survey field but if set the max_response_limit of
- survey then check the current user how many times start this survey. if current user max_response_limit
- is reach then this user can not start this survey(Raise Exception).
- """
- survey_obj = self.pool.get('survey')
- search_obj = self.pool.get('ir.ui.view')
- if context is None: context = {}
-
- this = self.browse(cr, uid, ids, context=context)[0]
- survey_id = this.survey_id.id
- context.update({'survey_id': survey_id, 'sur_name_id': this.id})
- cr.execute('select count(id) from survey_history where user_id=%s\
- and survey_id=%s' % (uid,survey_id))
-
- res = cr.fetchone()[0]
- sur_rec = survey_obj.browse(cr,uid,survey_id,context=context)
- if sur_rec.response_user and res >= sur_rec.response_user:
- raise osv.except_osv(_('Warning!'),_("You cannot give response for this survey more than %s times.") % (sur_rec.response_user))
-
- if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey:
- raise osv.except_osv(_('Warning!'),_("You cannot give more responses. Please contact the author of this survey for further assistance."))
-
- search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.question.wiz',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'search_view_id': search_id[0],
- 'context': context
- }
-
- def on_change_survey(self, cr, uid, ids, survey_id, context=None):
- """
- on change event of survey_id field, if note is available in selected survey then display this note in note fields.
- """
- if not survey_id:
- return {}
- notes = self.pool.get('survey').read(cr, uid, survey_id, ['note'])['note']
- return {'value': {'note': notes}}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/wizard/survey_selection.xml b/addons/survey/wizard/survey_selection.xml
deleted file mode 100644
index 56f5f5cda33..00000000000
--- a/addons/survey/wizard/survey_selection.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
- <!--
- 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="arch" type="xml">
- <form string="Survey" version="7.0">
- <group>
- <field name="survey_id" on_change="on_change_survey(survey_id)"/>
- </group>
- <field name="note" placeholder="Add Description" attrs="{'readonly': [('survey_id','=',False)]}"/>
- <footer>
- <button name="action_next" string="Start" type="object" class="oe_highlight"/>
- or
- <button string="Cancel" class="oe_link" special="cancel" />
- </footer>
- </form>
- </field>
- </record>
-
- <record id="action_view_survey_name"
- model="ir.actions.act_window">
- <field name="name">Give Survey Answer</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>
diff --git a/addons/survey/wizard/survey_send_invitation.py b/addons/survey/wizard/survey_send_invitation.py
deleted file mode 100644
index e16d0d6ce77..00000000000
--- a/addons/survey/wizard/survey_send_invitation.py
+++ /dev/null
@@ -1,233 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 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 random import choice
-import string
-import os
-import datetime
-import socket
-
-from openerp import tools
-from openerp.modules.module import get_module_resource
-from openerp.osv import fields, osv
-import openerp.report
-from openerp.tools.translate import _
-
-
-class survey_send_invitation(osv.osv_memory):
- _name = 'survey.send.invitation'
- _columns = {
- 'partner_ids': fields.many2many('res.partner','survey_res_partner','partner_id',\
- 'survey_id', "Answer", required=1),
- 'send_mail': fields.boolean('Send Mail for New User'),
- 'send_mail_existing': fields.boolean('Send Reminder for Existing User'),
- 'mail_subject': fields.char('Subject', size=256),
- 'mail_subject_existing': fields.char('Subject', size=256),
- 'mail_from': fields.char('From', size=256, required=1),
- 'mail': fields.text('Body')
- }
-
- _defaults = {
- 'send_mail': lambda *a: 1,
- 'send_mail_existing': lambda *a: 1,
- }
-
- def genpasswd(self):
- chars = string.letters + string.digits
- return ''.join([choice(chars) for i in range(6)])
-
- def default_get(self, cr, uid, fields_list, context=None):
- if context is None:
- context = {}
- data = super(survey_send_invitation, self).default_get(cr, uid, fields_list, context)
- survey_obj = self.pool.get('survey')
- msg = ""
- name = ""
- for sur in survey_obj.browse(cr, uid, context.get('active_ids', []), context=context):
- name += "\n --> " + sur.title + "\n"
- if sur.state != 'open':
- msg += sur.title + "\n"
- data['mail_subject'] = _("Invitation for %s") % (sur.title)
- data['mail_subject_existing'] = _("Invitation for %s") % (sur.title)
- data['mail_from'] = sur.responsible_id.email
- if msg:
- raise osv.except_osv(_('Warning!'), _('The following surveys are not in open state: %s') % msg)
- data['mail'] = _('''
-Hello %%(name)s, \n\n
-Would you please spent some of your time to fill-in our survey: \n%s\n
-You can access this survey with the following parameters:
- URL: %s
- Your login ID: %%(login)s\n
- Your password: %%(passwd)s\n
-\n\n
-Thanks,''') % (name, self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context))
- return data
-
- def create_report(self, 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 = get_module_resource('survey', 'report') + file_name + '.pdf'
- result, format = openerp.report.render_report(cr, uid, res_ids, report_name[len('report.'):], {}, {})
- 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)
-
-
- def action_send(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
- record = self.read(cr, uid, ids, [],context=context)
- survey_ids = context.get('active_ids', [])
- record = record and record[0]
- partner_ids = record['partner_ids']
- user_ref= self.pool.get('res.users')
- survey_ref= self.pool.get('survey')
- mail_message = self.pool.get('mail.message')
-
- model_data_obj = self.pool.get('ir.model.data')
- group_id = model_data_obj._get_id(cr, uid, 'base', 'group_survey_user')
- group_id = model_data_obj.browse(cr, uid, group_id, context=context).res_id
-
- act_id = self.pool.get('ir.actions.act_window')
- act_id = act_id.search(cr, uid, [('res_model', '=' , 'survey.name.wiz'), \
- ('view_type', '=', 'form')])
- out = "login,password\n"
- skipped = 0
- existing = ""
- created = ""
- error = ""
- new_user = []
- attachments = {}
- current_sur = survey_ref.browse(cr, uid, context.get('active_id'), context=context)
- exist_user = current_sur.invited_user_ids
- if exist_user:
- for use in exist_user:
- new_user.append(use.id)
- for id in survey_ref.browse(cr, uid, survey_ids):
- result, format = openerp.report.render_report(cr, uid, [id.id], 'survey.form', {}, {})
- attachments[id.title +".pdf"] = result
-
- for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids):
- if not partner.email:
- skipped+= 1
- continue
- user = user_ref.search(cr, uid, [('partner_id', "=", partner.id)])
- if user:
- if user[0] not in new_user:
- new_user.append(user[0])
- user = user_ref.browse(cr, uid, user[0])
- user_ref.write(cr, uid, user.id, {'survey_id':[[6, 0, survey_ids]]})
- mail = record['mail']%{'login':partner.email, 'passwd':user.password, \
- 'name' : partner.name}
- if record['send_mail_existing']:
- vals = {
- 'state': 'outgoing',
- 'subject': record['mail_subject_existing'],
- 'body_html': '<pre>%s</pre>' % mail,
- 'email_to': partner.email,
- 'email_from': record['mail_from'],
- }
- self.pool.get('mail.mail').create(cr, uid, vals, context=context)
- existing+= "- %s (Login: %s, Password: %s)\n" % (user.name, partner.email, \
- user.password)
- continue
-
- passwd= self.genpasswd()
- out+= partner.email + ',' + passwd + '\n'
- mail= record['mail'] % {'login' : partner.email, 'passwd' : passwd, 'name' : partner.name}
- if record['send_mail']:
- vals = {
- 'state': 'outgoing',
- 'subject': record['mail_subject'],
- 'body_html': '<pre>%s</pre>' % mail,
- 'email_to': partner.email,
- 'email_from': record['mail_from'],
- }
- if attachments:
- vals['attachment_ids'] = [(0,0,{'name': a_name,
- 'datas_fname': a_name,
- 'datas': str(a_content).encode('base64')})
- for a_name, a_content in attachments.items()]
- ans = self.pool.get('mail.mail').create(cr, uid, vals, context=context)
- if ans:
- res_data = {'name': partner.name or _('Unknown'),
- 'login': partner.email,
- 'email': partner.email,
- 'partner_id': partner.id,
- 'password': passwd,
- 'address_id': partner.id,
- 'groups_id': [[6, 0, [group_id]]],
- 'action_id': act_id[0],
- 'survey_id': [[6, 0, survey_ids]]
- }
- create_ctx = dict(context, no_reset_password=True)
- user = user_ref.create(cr, uid, res_data, context=create_ctx)
- if user not in new_user:
- new_user.append(user)
- created+= "- %s (Login: %s, Password: %s)\n" % (partner.name or _('Unknown'),\
- partner.email, passwd)
- else:
- error+= "- %s (Login: %s, Password: %s)\n" % (partner.name or _('Unknown'),\
- partner.email, passwd)
-
- new_vals = {}
- new_vals.update({'invited_user_ids':[[6,0,new_user]]})
- survey_ref.write(cr, uid, context.get('active_id'),new_vals)
- 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 += 'Email not send successfully:\n====================\n%s\n' % (error)
- context.update({'note' : note})
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'survey.send.invitation.log',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'context': context
- }
-
-class survey_send_invitation_log(osv.osv_memory):
- _name = 'survey.send.invitation.log'
- _columns = {
- 'note' : fields.text('Log', readonly=1)
- }
-
- def default_get(self, cr, uid, fields_list, context=None):
- if context is None:
- context = {}
- data = super(survey_send_invitation_log, self).default_get(cr, uid, fields_list, context)
- data['note'] = context.get('note', '')
- return data
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey/wizard/survey_send_invitation.xml b/addons/survey/wizard/survey_send_invitation.xml
deleted file mode 100644
index fb3d7edf856..00000000000
--- a/addons/survey/wizard/survey_send_invitation.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
- <data>
-
- <!-- Survey send invitation Form View -->
-
- <record id="view_survey_send_invitation" model="ir.ui.view">
- <field name="name">Send Invitation</field>
- <field name="model">survey.send.invitation</field>
- <field name="arch" type="xml">
- <form string="Send Invitation" version="7.0">
- <group col="4">
- <separator string="Select Partner" colspan="4"/>
- <field name="partner_ids" nolabel="1" colspan="4" widget="many2many_tags"/>
- <separator colspan="4" string="Send Mail for New User"/>
- <field name="send_mail" nolabel="1"/>
- <field name="mail_subject" colspan="3"/>
- <separator colspan="4" string="Send Reminder for Existing User"/>
- <field name="send_mail_existing" nolabel="1"/>
- <field name="mail_subject_existing" colspan="3"/>
- <separator colspan="4"/>
- <field name="mail_from" colspan="4"/>
- <separator string="Message" colspan="4"/>
- <field name="mail" nolabel="1" colspan="4"/>
- </group>
- <footer>
- <button name="action_send" string="_Send" type="object" class="oe_highlight"/>
- or
- <button string="Cancel" class="oe_link" special="cancel" />
- </footer>
- </form>
- </field>
- </record>
-
- <!-- Survey send invitation action -->
-
- <record id="action_view_survey_send_invitation" model="ir.actions.act_window">
- <field name="name">Send Invitation</field>
- <field name="res_model">survey.send.invitation</field>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
-
- <act_window id="action_act_view_survey_send_invitation"
- key2="client_action_multi" name="Send Invitations"
- res_model="survey.send.invitation" src_model="survey"
- view_mode="form" target="new" view_type="form" />
-
- <!-- Survey send invitation Display Log Form View -->
-
- <record id="view_survey_send_invitation_log" model="ir.ui.view">
- <field name="name">survey send invitation log</field>
- <field name="model">survey.send.invitation.log</field>
- <field name="arch" type="xml">
- <form string="User creation" version="7.0">
- <group string="Results :">
- <field name="note"/>
- </group>
- </form>
- </field>
- </record>
-
- <!-- Survey send invitation action -->
-
- <record id="action_view_survey_send_invitation_log" model="ir.actions.act_window">
- <field name="name">survey.send.invitation.log</field>
- <field name="res_model">survey.send.invitation.log</field>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
- </data>
-</openerp>
diff --git a/addons/survey_crm/__init__.py b/addons/survey_crm/__init__.py
new file mode 100644
index 00000000000..e31f63c9bd2
--- /dev/null
+++ b/addons/survey_crm/__init__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
+#
+# 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 survey
diff --git a/addons/survey/wizard/survey_print_statistics.py b/addons/survey_crm/__openerp__.py
index d005dbee31a..1b9fba3d680 100644
--- a/addons/survey/wizard/survey_print_statistics.py
+++ b/addons/survey_crm/__openerp__.py
@@ -1,8 +1,8 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
+# Copyright (C) 2004-2010 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
@@ -19,31 +19,23 @@
#
##############################################################################
-from openerp.osv import fields, osv
-from openerp.tools.translate import _
-
-class survey_print_statistics(osv.osv_memory):
- _name = 'survey.print.statistics'
- _columns = {
- 'survey_ids': fields.many2many('survey', string="Survey", required="1"),
- }
-
- def action_next(self, cr, uid, ids, context=None):
- """
- Print Survey Statistics in pdf format.
- """
- if context is None:
- context = {}
- datas = {'ids': context.get('active_ids', [])}
- res = self.read(cr, uid, ids, ['survey_ids'], context=context)
- res = res and res[0] or {}
- datas['form'] = res
- datas['model'] = 'survey.print.statistics'
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'survey.analysis',
- 'datas': datas,
- }
-
+{
+ 'name': 'Survey CRM',
+ 'version': '2.0',
+ 'category': 'Marketing',
+ 'complexity': 'easy',
+ 'description': """
+Survey - CRM (bridge module)
+=================================================================================
+This module adds a Survey mass mailing button inside the more option of lead/customers views
+""",
+ 'author': 'OpenERP SA',
+ 'depends': ['crm', 'survey'],
+ 'data': [
+ 'crm_view.xml',
+ ],
+ 'installable': True,
+ 'auto_install': True
+}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/survey_crm/crm_view.xml b/addons/survey_crm/crm_view.xml
new file mode 100644
index 00000000000..d28840643f6
--- /dev/null
+++ b/addons/survey_crm/crm_view.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <!-- Replace the default mass-mailing wizard in base with the composition wizard -->
+ <act_window name="Partner Survey Mailing"
+ res_model="survey.mail.compose.message"
+ src_model="crm.lead"
+ view_mode="form"
+ multi="True"
+ target="new"
+ key2="client_action_multi"
+ id="survey.action_partner_survey_mail_crm"
+ context="{
+ 'default_use_template': True,
+ 'default_template_id': ref('survey.email_template_survey'),
+ }" />
+ </data>
+</openerp>
diff --git a/addons/survey_crm/survey.py b/addons/survey_crm/survey.py
new file mode 100644
index 00000000000..6c7c22bcf11
--- /dev/null
+++ b/addons/survey_crm/survey.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
+#
+# 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/>.
+#
+##############################################################################
+
+from openerp.osv import osv
+
+
+class survey_mail_compose_message(osv.TransientModel):
+ _inherit = 'survey.mail.compose.message'
+
+ def default_get(self, cr, uid, fields, context=None):
+ res = super(survey_mail_compose_message, self).default_get(cr, uid, fields, context=context)
+ if context.get('active_model') == 'crm.lead' and context.get('active_ids'):
+ partner_ids = []
+ emails_list = []
+ for lead in self.pool.get('crm.lead').browse(cr, uid, context.get('active_ids'), context=context):
+ if lead.partner_id:
+ partner_ids.append(lead.partner_id.id)
+ else:
+ email = lead.contact_name and "%s <%s>" % (lead.contact_name, lead.email_from or "") or lead.email_from or None
+ if email and email not in emails_list:
+ emails_list.append(email)
+ multi_email = "\n".join(emails_list)
+
+ res.update({'partner_ids': list(set(partner_ids)), 'multi_email': multi_email})
+ return res
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js
index 5d8d7a29b1d..0d4ab7157fa 100644
--- a/addons/web_linkedin/static/src/js/linkedin.js
+++ b/addons/web_linkedin/static/src/js/linkedin.js
@@ -56,12 +56,12 @@ openerp.web_linkedin = function(instance) {
this.linkedin_def.reject();
this.auth_def.reject();
IN = false;
- instance.web.dialog($(QWeb.render("LinkedIn.DisabledWarning", {'error': error})), {
+ var dialog = new instance.web.Dialog(this, {
title: _t("LinkedIn is not enabled"),
buttons: [
- {text: _t("Ok"), click: function() { $(this).dialog("close"); }}
- ]
- });
+ {text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }}
+ ],
+ }, QWeb.render('LinkedIn.DisabledWarning', {error: error})).open();
},
test_linkedin: function() {
var self = this;
@@ -369,11 +369,11 @@ openerp.web_linkedin = function(instance) {
},
bind_event: function() {
var self = this;
- this.$el.parent().on("click", ".oe_linkedin_logout", function () {
+ this.$el.parents('.modal').on("click", ".oe_linkedin_logout", function () {
IN.User.logout();
self.destroy();
});
- this.$search = this.$el.parent().find(".oe_linkedin_advanced_search" );
+ this.$search = this.$el.parents('.modal').find(".oe_linkedin_advanced_search" );
this.$url = this.$search.find("input[name='search']" );
this.$button = this.$search.find("button");
@@ -396,7 +396,7 @@ openerp.web_linkedin = function(instance) {
IN.API.Profile("me")
.fields(["firstName", "lastName"])
.result(function (result) {
- $(QWeb.render('LinkedIn.loginInformation', result.values[0])).appendTo(self.$el.parent().find(".ui-dialog-buttonpane"));
+ $(QWeb.render('LinkedIn.loginInformation', result.values[0])).appendTo(self.$el.parents('.modal').find(".oe_dialog_custom_buttons"));
})
},
do_search: function(url) {
diff --git a/addons/website/static/src/css/website.css b/addons/website/static/src/css/website.css
index 9339b5e03b9..91cee76248f 100644
--- a/addons/website/static/src/css/website.css
+++ b/addons/website/static/src/css/website.css
@@ -1,4 +1,3 @@
-@charset "utf-8";
/* THIS CSS FILE IS FOR WEBSITE THEMING CUSTOMIZATION ONLY
*
* css for editor buttons, openerp widget included in the website and other
@@ -108,6 +107,10 @@ header a.navbar-brand img {
}
/* ----- Snippets Styles ----- */
+.para_large {
+ font-size: 120%;
+}
+
.readable {
font-size: 120%;
max-width: 700px;
diff --git a/addons/website/static/src/css/website.sass b/addons/website/static/src/css/website.sass
index e8a7d870623..e3c6bd7a052 100644
--- a/addons/website/static/src/css/website.sass
+++ b/addons/website/static/src/css/website.sass
@@ -76,6 +76,9 @@ header
/* ----- Snippets Styles ----- */
+.para_large
+ font-size: 120%
+
.readable
font-size: 120%
max-width: 700px
diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js
index 1b8dfc0b320..c72e2c3b84e 100644
--- a/addons/website/static/src/js/website.snippets.animation.js
+++ b/addons/website/static/src/js/website.snippets.animation.js
@@ -34,7 +34,6 @@
var $snipped_id = $(this);
if ($snipped_id.data("snippet-view")) {
$snipped_id.data("snippet-view").stop();
- $snipped_id.data("snippet-view", false);
}
});
};
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index fac4f9ab357..d8eee3cbec5 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -151,10 +151,11 @@
$("[data-oe-model] *, [data-oe-type=html] *").off('click');
window.snippets = this.snippets = new website.snippet.BuildingBlock(this);
this.snippets.appendTo(this.$el);
+ website.snippet.stop_animation();
this.on('rte:ready', this, function () {
self.snippets.$button.removeClass("hidden");
- website.snippet.stop_animation();
- website.snippet.start_animation(true, $(".media_iframe_video"));
+ website.snippet.start_animation();
+ $("#wrapwrap *").off('mousedown mouseup click');
});
return this._super.apply(this, arguments);
@@ -1399,6 +1400,9 @@
start : function () {
var self = this;
this._super();
+ if (!self.$target.data("snippet-view")) {
+ this.$target.data("snippet-view", new website.snippet.animationRegistry.parallax(this.$target));
+ }
this.scroll();
this.$target.on('snippet-style-change snippet-style-preview', function () {
self.$target.data("snippet-view").set_values();
diff --git a/addons/website/views/snippets.xml b/addons/website/views/snippets.xml
index 324226dc49b..43c1e488fc8 100644
--- a/addons/website/views/snippets.xml
+++ b/addons/website/views/snippets.xml
@@ -837,6 +837,7 @@
<li class="dropdown-submenu">
<a tabindex="-1" href="#">Style</a>
<ul class="dropdown-menu">
+ <li data-value="para_large"><a>Bigger Text</a></li>
<li data-value="readable"><a>Narrow</a></li>
</ul>
</li>
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index a9a9173099a..5ea48d92a31 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -69,6 +69,7 @@
<script type="text/javascript" src="/web/static/lib/underscore/underscore.js"></script>
<script type="text/javascript" src="/web/static/lib/underscore.string/lib/underscore.string.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>
+ <script type="text/javascript" src="/web/static/lib/jquery.form/jquery.form.js"></script>
<script type="text/javascript">
// Bootstrap and jQuery UI conflicts
$.fn.bstooltip = $.fn.tooltip;
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js
index 202b0a7d90d..870dd1c01c6 100644
--- a/addons/website_forum/static/src/js/website_forum.js
+++ b/addons/website_forum/static/src/js/website_forum.js
@@ -18,7 +18,7 @@ $(document).ready(function () {
} else if (data['error'] == 'anonymous_user'){
var $warning = $('<div class="alert alert-danger alert-dismissable" id="vote_alert" style="position:absolute; margin-top: -30px; margin-left: 90px;">'+
'<button type="button" class="close notification_close" data-dismiss="alert" aria-hidden="true">&times;</button>'+
- 'Sorry, anonymous users cannot vote'+
+ 'Sorry you must be logged to vote'+
'</div>');
}
else if (data['error'] == 'lessthen_10_karma')
diff --git a/addons/website_quote/security/ir.model.access.csv b/addons/website_quote/security/ir.model.access.csv
index 1dbe5afbe34..88137036caa 100644
--- a/addons/website_quote/security/ir.model.access.csv
+++ b/addons/website_quote/security/ir.model.access.csv
@@ -6,3 +6,4 @@ access_sale_quote_line_manager,sale.quote.line,model_sale_quote_line,base.group_
access_sale_quote_option,sale.quote.option,model_sale_quote_option,base.group_sale_salesman,1,0,0,0
access_sale_quote_option_manager,sale.quote.option,model_sale_quote_option,base.group_sale_manager,1,1,1,1
access_sale_order_option,sale.order.option,model_sale_order_option,base.group_sale_salesman,1,1,1,1
+access_sale_order_option_all,sale.order.option,model_sale_order_option,,1,0,0,0
diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py
index bdf1ca7eaf2..374f17dcf06 100644
--- a/addons/website_sale/controllers/main.py
+++ b/addons/website_sale/controllers/main.py
@@ -43,7 +43,7 @@ class CheckoutInfo(object):
result = dict((prefix + field_name, getattr(partner, field_name)) for field_name in self.string_billing_fields if getattr(partner, field_name))
result[prefix + 'state_id'] = partner.state_id and partner.state_id.id or ''
result[prefix + 'country_id'] = partner.country_id and partner.country_id.id or ''
- result[prefix + 'company'] = partner.parent_id and partner.parent_id.name or ''
+ result[prefix + 'company'] = partner.commercial_partner_id and partner.commercial_partner_id.is_company and partner.commercial_partner_id.name or ''
return result
def from_post(self, post):
@@ -383,6 +383,8 @@ class Ecommerce(http.Controller):
def add_cart(self, product_id, remove=None, **kw):
request.registry['website']._ecommerce_add_product_to_cart(request.cr, request.uid,
product_id=int(product_id),
+ number=float(kw.get('number',1)),
+ set_number=float(kw.get('set_number',-1)),
context=request.context)
return request.redirect("/shop/mycart")
diff --git a/addons/website_twitter/__init__.py b/addons/website_twitter/__init__.py
new file mode 100644
index 00000000000..396c76fe87a
--- /dev/null
+++ b/addons/website_twitter/__init__.py
@@ -0,0 +1,2 @@
+import models
+import controllers
diff --git a/addons/website_twitter/__openerp__.py b/addons/website_twitter/__openerp__.py
new file mode 100644
index 00000000000..96e17ff9356
--- /dev/null
+++ b/addons/website_twitter/__openerp__.py
@@ -0,0 +1,25 @@
+{
+ 'name': 'Twitter Roller',
+ 'category': 'Website',
+ 'summary': 'Add twitter scroller snippet in website builder',
+ 'version': '1.0',
+ 'description': """
+Display best tweets
+========================
+
+ """,
+ 'author': 'OpenERP SA',
+ 'depends': ['website'],
+ 'data': [
+ 'security/ir.model.access.csv',
+ 'data/twitter_data.xml',
+ 'views/twitter_view.xml',
+ 'views/twitter_snippet.xml'
+ ],
+ 'demo': [],
+ 'qweb': [],
+ 'js': [],
+ 'css': [],
+ 'installable': True,
+ 'application': True,
+}
diff --git a/addons/website_twitter/controllers/__init__.py b/addons/website_twitter/controllers/__init__.py
new file mode 100644
index 00000000000..8ee9bae18d9
--- /dev/null
+++ b/addons/website_twitter/controllers/__init__.py
@@ -0,0 +1 @@
+import main
diff --git a/addons/website_twitter/controllers/main.py b/addons/website_twitter/controllers/main.py
new file mode 100644
index 00000000000..afd636a26c4
--- /dev/null
+++ b/addons/website_twitter/controllers/main.py
@@ -0,0 +1,32 @@
+from openerp.addons.web import http
+from openerp.addons.web.http import request
+from openerp.tools.translate import _
+
+import json
+
+class Twitter(http.Controller):
+ @http.route(['/twitter_reload'], type='json', auth="user", website=True)
+ def twitter_reload(self):
+ return request.website.fetch_favorite_tweets()
+
+ @http.route(['/get_favorites'], type='json', auth="public", website=True)
+ def get_tweets(self, limit=20):
+ key = request.website.twitter_api_key
+ secret = request.website.twitter_api_secret
+ screen_name = request.website.twitter_screen_name
+ if not key or not secret:
+ return {"error": _("Please set the Twitter API Key and Secret in the Website Settings.")}
+ if not screen_name:
+ return {"error": _("Please set a Twitter screen name to load favorites from, "
+ "in the Website Settings (it does not have to be yours)")}
+ twitter_tweets = request.registry['website.twitter.tweet']
+ tweets = twitter_tweets.search_read(
+ request.cr, request.uid,
+ [('website_id','=', request.website.id),
+ ('screen_name','=', screen_name)],
+ ['tweet'], limit=int(limit), order="tweet_id desc", context=request.context)
+ if len(tweets) < 12:
+ return {"error": _("Twitter user @%(username)s has less than 12 favorite tweets. "
+ "Please add more or choose a different screen name.") % \
+ {'username': screen_name}}
+ return [json.loads(tweet['tweet']) for tweet in tweets]
diff --git a/addons/website_twitter/data/twitter_data.xml b/addons/website_twitter/data/twitter_data.xml
new file mode 100644
index 00000000000..b7ca4281504
--- /dev/null
+++ b/addons/website_twitter/data/twitter_data.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="ir_cron_twitter_actions" model="ir.cron">
+ <field name="name">Fetch new Twitter favorites</field>
+ <field name="interval_number">2</field>
+ <field name="interval_type">hours</field>
+ <field name="numbercall">-1</field>
+ <field name="doall" eval="False"/>
+ <field name="model">website</field>
+ <field name="function">_refresh_favorite_tweets</field>
+ <field name="args">()</field>
+ </record>
+ </data>
+</openerp>
+
diff --git a/addons/website_twitter/models/__init__.py b/addons/website_twitter/models/__init__.py
new file mode 100644
index 00000000000..8c34d4f968e
--- /dev/null
+++ b/addons/website_twitter/models/__init__.py
@@ -0,0 +1,3 @@
+import twitter
+import twitter_config
+
diff --git a/addons/website_twitter/models/twitter.py b/addons/website_twitter/models/twitter.py
new file mode 100644
index 00000000000..7c1c417040b
--- /dev/null
+++ b/addons/website_twitter/models/twitter.py
@@ -0,0 +1,115 @@
+from urllib2 import urlopen, Request, HTTPError
+
+import base64
+import json
+import logging
+import werkzeug
+
+from openerp.osv import fields, osv
+
+API_ENDPOINT = 'https://api.twitter.com'
+API_VERSION = '1.1'
+REQUEST_TOKEN_URL = '%s/oauth2/token' % API_ENDPOINT
+REQUEST_FAVORITE_LIST_URL = '%s/%s/favorites/list.json' % (API_ENDPOINT, API_VERSION)
+URLOPEN_TIMEOUT = 10
+
+_logger = logging.getLogger(__name__)
+
+class TwitterClient(osv.osv):
+ _inherit = "website"
+
+ _columns = {
+ 'twitter_api_key': fields.char('Twitter API key', help="Twitter API Key"),
+ 'twitter_api_secret': fields.char('Twitter API secret', help="Twitter API Secret"),
+ 'twitter_screen_name': fields.char('Get favorites from this screen name'),
+ }
+
+ def _request(self, website, url, params=None):
+ """Send an authenticated request to the Twitter API."""
+ access_token = self._get_access_token(website)
+ if params:
+ params = werkzeug.url_encode(params)
+ url = url + '?' + params
+ try:
+ request = Request(url)
+ request.add_header('Authorization', 'Bearer %s' % access_token)
+ return json.load(urlopen(request, timeout=URLOPEN_TIMEOUT))
+ except HTTPError, e:
+ _logger.debug("Twitter API request failed with code: %r, msg: %r, content: %r",
+ e.code, e.msg, e.fp.read())
+ raise
+
+ def _refresh_favorite_tweets(self, cr, uid, context=None):
+ ''' called by cron job '''
+ website = self.pool['website']
+ ids = self.pool['website'].search(cr, uid, [('twitter_api_key', '!=', False),
+ ('twitter_api_secret', '!=', False),
+ ('twitter_screen_name', '!=', False)],
+ context=context)
+ _logger.debug("Refreshing tweets for website IDs: %r", ids)
+ website.fetch_favorite_tweets(cr, uid, ids, context=context)
+
+ def fetch_favorite_tweets(self, cr, uid, ids, context=None):
+ website_tweets = self.pool['website.twitter.tweet']
+ tweet_ids = []
+ for website in self.browse(cr, uid, ids, context=context):
+ if not all((website.twitter_api_key, website.twitter_api_secret,
+ website.twitter_screen_name)):
+ _logger.debug("Skip fetching favorite tweets for unconfigured website %s",
+ website)
+ continue
+ params = {'screen_name': website.twitter_screen_name}
+ last_tweet = website_tweets.search_read(
+ cr, uid, [('website_id', '=', website.id),
+ ('screen_name', '=', website.twitter_screen_name)],
+ ['tweet_id'],
+ limit=1, order='tweet_id desc', context=context)
+ if last_tweet:
+ params['since_id'] = int(last_tweet[0]['tweet_id'])
+ _logger.debug("Fetching favorite tweets using params %r", params)
+ response = self._request(website, REQUEST_FAVORITE_LIST_URL, params=params)
+ for tweet_dict in response:
+ tweet_id = tweet_dict['id'] # unsigned 64-bit snowflake ID
+ tweet_ids = website_tweets.search(cr, uid, [('tweet_id', '=', tweet_id)])
+ if not tweet_ids:
+ new_tweet = website_tweets.create(
+ cr, uid,
+ {
+ 'website_id': website.id,
+ 'tweet': json.dumps(tweet_dict),
+ 'tweet_id': tweet_id, # stored in NUMERIC PG field
+ 'screen_name': website.twitter_screen_name,
+ },
+ context=context)
+ _logger.debug("Found new favorite: %r, %r", tweet_id, tweet_dict)
+ tweet_ids.append(new_tweet)
+ return tweet_ids
+
+ def _get_access_token(self, website):
+ """Obtain a bearer token."""
+ bearer_token_cred = '%s:%s' % (website.twitter_api_key, website.twitter_api_secret)
+ encoded_cred = base64.b64encode(bearer_token_cred)
+ request = Request(REQUEST_TOKEN_URL)
+ request.add_header('Content-Type',
+ 'application/x-www-form-urlencoded;charset=UTF-8')
+ request.add_header('Authorization',
+ 'Basic %s' % encoded_cred)
+ request.add_data('grant_type=client_credentials')
+ data = json.load(urlopen(request, timeout=URLOPEN_TIMEOUT))
+ access_token = data['access_token']
+ return access_token
+
+class WebsiteTwitterTweet(osv.osv):
+ _name = "website.twitter.tweet"
+ _description = "Twitter Tweets"
+ _columns = {
+ 'website_id': fields.many2one('website', string="Website"),
+ 'screen_name': fields.char("Screen Name"),
+ 'tweet': fields.text('Tweets'),
+
+ # Twitter IDs are 64-bit unsigned ints, so we need to store them in
+ # unlimited precision NUMERIC columns, which can be done with a
+ # float field. Used digits=(0,0) to indicate unlimited.
+ # Using VARCHAR would work too but would have sorting problems.
+ 'tweet_id': fields.float("Tweet ID", digits=(0,0)), # Twitter
+ }
diff --git a/addons/website_twitter/models/twitter_config.py b/addons/website_twitter/models/twitter_config.py
new file mode 100644
index 00000000000..3330a5b0424
--- /dev/null
+++ b/addons/website_twitter/models/twitter_config.py
@@ -0,0 +1,42 @@
+import logging
+
+from openerp.osv import fields, osv
+from openerp.tools.translate import _
+
+_logger = logging.getLogger(__name__)
+
+class twitter_config_settings(osv.osv_memory):
+ _inherit = 'website.config.settings'
+
+ _columns = {
+ 'twitter_api_key': fields.related(
+ 'website_id', 'twitter_api_key', type="char",
+ string='Twitter API Key',
+ help="Twitter API key you can get it from https://apps.twitter.com/app/new"),
+ 'twitter_api_secret': fields.related(
+ 'website_id', 'twitter_api_secret', type="char",
+ string='Twitter API secret',
+ help="Twitter API secret you can get it from https://apps.twitter.com/app/new"),
+ 'twitter_tutorial': fields.dummy(
+ type="boolean", string="Show me how to obtain the Twitter API Key and Secret"),
+ 'twitter_screen_name': fields.related(
+ 'website_id', 'twitter_screen_name',
+ type="char", string='Get favorites from this screen name',
+ help="Screen Name of the Twitter Account from which you want to load favorites."
+ "It does not have to match the API Key/Secret."),
+ }
+
+ def _check_twitter_authorization(self, cr, uid, config_id, context=None):
+ website_obj = self.pool['website']
+ website_config = self.browse(cr, uid, config_id, context=context)
+ try:
+ website_obj.fetch_favorite_tweets(cr, uid, [website_config.website_id.id], context=context)
+ except Exception:
+ _logger.warning('Failed to verify twitter API authorization', exc_info=True)
+ raise osv.except_osv(_('Twitter authorization error!'), _('Please double-check your Twitter API Key and Secret'))
+
+ def create(self, cr, uid, vals, context=None):
+ res_id = super(twitter_config_settings, self).create(cr, uid, vals, context=context)
+ if vals.get('twitter_api_key') and vals.get('twitter_api_secret'):
+ self._check_twitter_authorization(cr, uid, res_id, context=context)
+ return res_id \ No newline at end of file
diff --git a/addons/website_twitter/security/ir.model.access.csv b/addons/website_twitter/security/ir.model.access.csv
new file mode 100644
index 00000000000..eb88063e9c5
--- /dev/null
+++ b/addons/website_twitter/security/ir.model.access.csv
@@ -0,0 +1,2 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_website_twitter_tweet_public,access of twitter snippet,website_twitter.model_website_twitter_tweet,,1,0,0,0
diff --git a/addons/website_twitter/static/src/css/Makefile b/addons/website_twitter/static/src/css/Makefile
new file mode 100644
index 00000000000..21d0e6cdc39
--- /dev/null
+++ b/addons/website_twitter/static/src/css/Makefile
@@ -0,0 +1,3 @@
+sass:
+ sass -t expanded --compass --unix-newlines --watch website.twitter.sass:website.twitter.css
+
diff --git a/addons/website_twitter/static/src/css/website.twitter.css b/addons/website_twitter/static/src/css/website.twitter.css
new file mode 100644
index 00000000000..b44bf800bd7
--- /dev/null
+++ b/addons/website_twitter/static/src/css/website.twitter.css
@@ -0,0 +1,110 @@
+.wrap-row {
+ position: relative;
+ overflow: hidden;
+ height: 310px;
+}
+.wrap-row .twitter-row {
+ position: absolute;
+ width: 100%;
+ height: auto;
+}
+.wrap-row .twitter-row div.scrollWrapper {
+ position: relative;
+ overflow: hidden;
+ width: 100%;
+ height: 100%;
+}
+.wrap-row .twitter-row div.scrollableArea {
+ position: relative;
+ width: auto;
+ height: 100%;
+}
+.wrap-row .twitter-row div .tweet {
+ border: 1px solid #cccccc;
+ max-width: 500px;
+ width: 500px;
+ font-size: 0.8em;
+ padding-top: 12px;
+ padding-right: 10px;
+ padding-bottom: 12px;
+ padding-left: 10px;
+ float: left;
+ display: block;
+ margin: 6px;
+ max-height: 90px;
+ height: 90px;
+ opacity: 0.6;
+}
+.wrap-row .twitter-row div .tweet h4, .wrap-row .twitter-row div .tweet p {
+ padding: 0;
+ margin: 0;
+}
+.wrap-row .twitter-row div .tweet .left {
+ display: block;
+ float: left;
+ width: 80px;
+}
+.wrap-row .twitter-row div .tweet .left img {
+ width: 65px;
+ height: auto;
+ float: left;
+ display: block;
+ margin: 0px 5px 0px -5px;
+}
+.wrap-row .twitter-row div .tweet .right {
+ display: block;
+ float: left;
+ width: 470px;
+}
+.wrap-row .twitter-row div .tweet .right .top {
+ height: 20px;
+}
+.wrap-row .twitter-row div .tweet h4 {
+ font-size: 14px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-weight: bold;
+ color: black;
+ float: left;
+ display: block;
+ position: relative;
+ margin-left: 70px;
+ margin-top: -65px;
+}
+.wrap-row .twitter-row div .tweet h4 span {
+ color: #cccccc;
+ font-weight: bold;
+ font-size: 14px;
+}
+.wrap-row .twitter-row div .tweet p {
+ line-height: 1.5em;
+ float: left;
+ position: relative;
+ display: block;
+}
+.wrap-row .twitter-row div .tweet .date {
+ float: right;
+ line-height: 0.5em;
+ margin-top: -60px;
+ margin-right: -10px;
+}
+.wrap-row .twitter-row div .tweet .right .bottom p {
+ margin-top: -65px;
+ margin-left: 70px;
+ font-size: 12px;
+ word-break: break-word;
+}
+.wrap-row .twitter-row div .tweet:hover {
+ -webkit-box-shadow: 0.5px 0.5px 0.5px 1px #428bca;
+ -moz-box-shadow: 0.5px 0.5px 0.5px 1px #428bca;
+ box-shadow: 0.5px 0.5px 0.5px 1px #428bca;
+ cursor: pointer;
+ opacity: 1;
+}
+
+@media screen and (max-width: 580px) {
+ .wrap-row {
+ position: relative;
+ overflow: hidden;
+ height: 100px;
+ }
+}
diff --git a/addons/website_twitter/static/src/css/website.twitter.sass b/addons/website_twitter/static/src/css/website.twitter.sass
new file mode 100644
index 00000000000..9eca59eb6ce
--- /dev/null
+++ b/addons/website_twitter/static/src/css/website.twitter.sass
@@ -0,0 +1,94 @@
+.wrap-row
+ position: relative
+ overflow: hidden
+ height: 310px
+ .twitter-row
+ position: absolute
+ width: 100%
+ height: auto
+ div
+ &.scrollWrapper
+ position: relative
+ overflow: hidden
+ width: 100%
+ height: 100%
+ &.scrollableArea
+ position: relative
+ width: auto
+ height: 100%
+ .tweet
+ border: 1px solid #ccc
+ max-width: 500px
+ width: 500px
+ font-size: 0.8em
+ padding-top: 12px
+ padding-right: 10px
+ padding-bottom: 12px
+ padding-left: 10px
+ float: left
+ display: block
+ margin: 6px
+ max-height: 90px
+ height: 90px
+ opacity: 0.6
+ h4, p
+ padding: 0
+ margin: 0
+ .left
+ display: block
+ float: left
+ width: 80px
+ img
+ width: 65px
+ height: auto
+ float: left
+ display: block
+ margin: 0px 5px 0px -5px
+ .right
+ display: block
+ float: left
+ width: 470px
+ .top
+ height: 20px
+ h4
+ font-size: 14px
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif
+ font-weight: bold
+ color: #000
+ float: left
+ display: block
+ position: relative
+ margin-left: 70px
+ margin-top: -65px
+ span
+ color: #ccc
+ font-weight: bold
+ font-size: 14px
+ p
+ line-height: 1.5em
+ float: left
+ position: relative
+ display: block
+ &.date
+ float: right
+ line-height: 0.5em
+ margin-top: -60px
+ margin-right: -10px
+ .right .bottom p
+ margin-top: -65px
+ margin-left: 70px
+ font-size: 12px
+ word-break: break-word
+ &:hover
+ -webkit-box-shadow: 0.5px 0.5px 0.5px 1px #428BCA
+ -moz-box-shadow: 0.5px 0.5px 0.5px 1px #428BCA
+ box-shadow: 0.5px 0.5px 0.5px 1px #428BCA
+ cursor: pointer
+ opacity: 1
+
+
+@media screen and (max-width: 580px)
+ .wrap-row
+ position: relative
+ overflow: hidden
+ height: 100px
diff --git a/addons/website_twitter/static/src/img/api_key.png b/addons/website_twitter/static/src/img/api_key.png
new file mode 100644
index 00000000000..8f53f9649fa
--- /dev/null
+++ b/addons/website_twitter/static/src/img/api_key.png
Binary files differ
diff --git a/addons/website_twitter/static/src/img/loadtweet.gif b/addons/website_twitter/static/src/img/loadtweet.gif
new file mode 100644
index 00000000000..f8a0a6179bd
--- /dev/null
+++ b/addons/website_twitter/static/src/img/loadtweet.gif
Binary files differ
diff --git a/addons/website_twitter/static/src/img/twitter_scroll.png b/addons/website_twitter/static/src/img/twitter_scroll.png
new file mode 100644
index 00000000000..b8d602d519a
--- /dev/null
+++ b/addons/website_twitter/static/src/img/twitter_scroll.png
Binary files differ
diff --git a/addons/website_twitter/static/src/js/website.twitter.animation.js b/addons/website_twitter/static/src/js/website.twitter.animation.js
new file mode 100644
index 00000000000..bb19fd5e66a
--- /dev/null
+++ b/addons/website_twitter/static/src/js/website.twitter.animation.js
@@ -0,0 +1,144 @@
+(function () {
+ 'use strict';
+ var website = openerp.website,
+ qweb = openerp.qweb;
+
+ qweb.add_template('/website_twitter/static/src/xml/website.twitter.xml');
+ if (!website.snippet) website.snippet = {};
+ website.snippet.animationRegistry.twitter = website.snippet.Animation.extend({
+ selector: ".twitter",
+ start: function () {
+ var self = this;
+ var timeline = this.$target.find(".twitter_timeline");
+
+ this.$target.on('click', '.twitter_timeline .tweet', function($event) {
+ if ($event.target.tagName.toLowerCase() !== "a") {
+ var url = $($event.currentTarget).data('url');
+ if (url) {
+ window.open(url, '_blank');
+ }
+ else {
+ debugger;
+ }
+ }
+ });
+ $("<center><div><img src='/website_twitter/static/src/img/loadtweet.gif'></div></center>").appendTo(timeline);
+ openerp.jsonRpc('/get_favorites','call', {}).then(function(data) {
+ self.$target.find(".twitter_timeline").empty();
+ if (data.error) {
+ self.error(data);
+ }
+ else {
+ self.render(data);
+ self.setupMouseEvents();
+ }
+ });
+ },
+ stop: function() {
+ $(this).find('.scrollWrapper').each(function(index, el){
+ self.stop_scrolling($(el));
+ });
+ this.clearMouseEvents();
+ },
+ error: function(data){
+ var $error = $(qweb.render("website.Twitter.Error", {'data': data}));
+ $error.appendTo(this.$target.find(".twitter_timeline"));
+ },
+ parse_tweet: function (tweet) {
+ var create_link = function (url, text) {
+ var c = $("<a>", {
+ text: text,
+ href: url,
+ target: "_blank"
+ });
+ return c.prop("outerHTML");
+ };
+ return tweet.text.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&~\?\/.=]+/g,
+ function (url) { return create_link(url, url) })
+ .replace(/[@]+[A-Za-z0-9_]+/g,
+ function (screen_name) { return create_link("http://twitter.com/" + screen_name.replace("@",""), screen_name); })
+ .replace(/[#]+[A-Za-z0-9_]+/g,
+ function (hashtag) { return create_link("http://twitter.com/search?q="+hashtag.replace("#",""), hashtag); });
+ },
+ parse_date: function(tweet) {
+ var d = new Date(tweet.created_at);
+ return d.toDateString();
+ },
+ setupMouseEvents: function() {
+ var self = this;
+ this.$scroller.mouseenter(function() {
+ $(this).find('.scrollWrapper').each(function(index, el){
+ self.stop_scrolling($(el));
+ });
+ }).mouseleave(function() {
+ $(this).find('.scrollWrapper').each(function(index, el){
+ self.start_scrolling($(el));
+ });
+ });
+ },
+ clearMouseEvents: function() {
+ if (this.$scroller) {
+ this.$scroller.off('mouseenter')
+ .off('mouseleave');
+ }
+ },
+ render: function(data){
+ var self = this;
+ var timeline = this.$target.find(".twitter_timeline");
+ var tweets = [];
+ $.each(data, function (e, tweet) {
+ tweet.created_at = self.parse_date(tweet);
+ tweet.text = self.parse_tweet(tweet);
+ tweets.push(qweb.render("website.Twitter.Tweet", {'tweet': tweet}));
+ });
+
+ var f = Math.floor(tweets.length / 3);
+ var tweet_slice = [tweets.slice(0, f).join(" "), tweets.slice(f, f * 2).join(" "), tweets.slice(f * 2, tweets.length).join(" ")];
+
+ this.$scroller = $(qweb.render("website.Twitter.Scroller"));
+ this.$scroller.appendTo(this.$target.find(".twitter_timeline"));
+ this.$scroller.find("div[id^='scroller']").each(function(index, element){
+ var scrollWrapper = $('<div class="scrollWrapper"></div>');
+ var scrollableArea = $('<div class="scrollableArea"></div>');
+ scrollWrapper.append(scrollableArea)
+ .data('scrollableArea', scrollableArea);
+ scrollableArea.append(tweet_slice[index]);
+ $(element).append(scrollWrapper);
+ scrollableArea.width(self.get_wrapper_width(scrollableArea));
+ scrollWrapper.scrollLeft(index*180);
+ self.start_scrolling(scrollWrapper);
+ });
+ },
+ get_wrapper_width: function(wrapper){
+ var total_width = 0;
+ wrapper.children().each(function(){
+ total_width += $(this).outerWidth(true);
+ });
+ return total_width;
+ },
+ start_scrolling: function(wrapper){
+ var self = this;
+ wrapper.data("getNextElementWidth", true);
+ wrapper.data("autoScrollingInterval", setInterval(function () {
+ wrapper.scrollLeft(wrapper.scrollLeft() + 1);
+ self.swap_right(wrapper);
+ }, 20));
+ },
+ stop_scrolling: function(wrapper){
+ clearInterval(wrapper.data('autoScrollingInterval'));
+ },
+ swap_right: function(wrapper){
+ if (wrapper.data("getNextElementWidth")) {
+ wrapper.data("swapAt", wrapper.data("scrollableArea").children(":first").outerWidth(true));
+ wrapper.data("getNextElementWidth", false);
+ }
+ if (wrapper.data("swapAt") <= wrapper.scrollLeft()){
+ var swap_el = wrapper.data("scrollableArea").children(":first").detach();
+ wrapper.data("scrollableArea").append(swap_el);
+ wrapper.scrollLeft(wrapper.scrollLeft() - swap_el.outerWidth(true));
+ wrapper.data("getNextElementWidth", true);
+ }
+ },
+ });
+
+})();
diff --git a/addons/website_twitter/static/src/js/website.twitter.editor.js b/addons/website_twitter/static/src/js/website.twitter.editor.js
new file mode 100644
index 00000000000..69a1896695a
--- /dev/null
+++ b/addons/website_twitter/static/src/js/website.twitter.editor.js
@@ -0,0 +1,51 @@
+(function () {
+ 'use strict';
+ var website = openerp.website,
+ qweb = openerp.qweb;
+
+ website.snippet.options["twitter"] = website.snippet.options.marginAndResize.extend({
+ start: function(){
+ this._super();
+ this.make_hover_config();
+ this.$target.find('.lnk_configure').click(function(e){
+ window.location = e.target.href;
+ });
+ if (this.$target.data("snippet-view")) {
+ this.$target.data("snippet-view").stop();
+ }
+ },
+ twitter_reload: function(){
+ openerp.jsonRpc('/twitter_reload','call', {});
+ },
+ make_hover_config: function(){
+ var self = this;
+ var $configuration = $(qweb.render("website.Twitter.Reload")).hide().appendTo(document.body).click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ self.twitter_reload();
+ });
+ this.$target.on('mouseover', '', function () {
+ var $selected = $(this);
+ var position = $selected.offset();
+ $configuration.show().offset({
+ top: $selected.outerHeight() / 2
+ + position.top
+ - $configuration.outerHeight() / 2,
+ left: $selected.outerWidth() / 2
+ + position.left
+ - $configuration.outerWidth() / 2,
+ })
+ }).on('mouseleave', '', function (e) {
+ var current = document.elementFromPoint(e.clientX, e.clientY);
+ if (current === $configuration[0]) {
+ return;
+ }
+ $configuration.hide();
+ });
+ },
+ clean_for_save: function () {
+ this.$target.find(".twitter_timeline").empty();
+ },
+ });
+
+})();
diff --git a/addons/website_twitter/static/src/xml/website.twitter.xml b/addons/website_twitter/static/src/xml/website.twitter.xml
new file mode 100644
index 00000000000..25c6121e166
--- /dev/null
+++ b/addons/website_twitter/static/src/xml/website.twitter.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="website.Twitter.Tweet">
+ <div class="tweet" t-attf-data-url="http://twitter.com/#{tweet.user.screen_name}/status/#{tweet.id_str}" t-attf-data-tweet-id="#{tweet.id_str}">
+ <div class="left">
+ <img t-att-src="tweet.user.profile_image_url"/>
+ </div>
+ <div class="right">
+ <div class="top">
+ <h4>
+ <t t-esc="tweet.user.name"/>
+ <span>
+ <a t-att-href="'https://twitter.com/' + tweet.user.screen_name" target="_blank"><t t-esc="'@' + tweet.user.screen_name "/></a>
+ </span>
+ </h4>
+ <a class="date" target="_blank" t-attf-href="http://twitter.com/#{tweet.user.screen_name}/status/#{tweet.id_str}"><t t-esc="tweet.created_at"/></a>
+ </div>
+ <div class="bottom"><p><t t-raw="tweet.text"/></p></div>
+ </div>
+ </div>
+ </t>
+ <t t-name="website.Twitter.Scroller">
+ <div class="wrap-row" contenteditable="false">
+ <div class="twitter-row">
+ <div class="twitter-scroller">
+ <div id="scroller1" ></div>
+ <div id="scroller2" ></div>
+ <div id="scroller3" ></div>
+ </div>
+ </div>
+ </div>
+ </t>
+ <t t-name="website.Twitter.Reload">
+ <button type="button" contenteditable="false" class="btn btn-primary hover-edition-button">Reload</button>
+ </t>
+ <t t-name="website.Twitter.Error">
+ <div class="alert alert-info" contenteditable="false">
+ <t t-esc="data.error"/>
+ <i t-if='!data.nodata' class="fa fa-plus-circle">
+ <a class="lnk_configure" href="/web#action=website.action_website_configuration">Twitter Configuration</a>
+ </i>
+ </div>
+ </t>
+</templates>
diff --git a/addons/website_twitter/views/twitter_snippet.xml b/addons/website_twitter/views/twitter_snippet.xml
new file mode 100644
index 00000000000..bc039d71c61
--- /dev/null
+++ b/addons/website_twitter/views/twitter_snippet.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+ <template id="website_twitter_snippet" name="Twitter snippet" inherit_id="website.snippets">
+ <xpath expr="//div[@id='snippet_feature']" position="inside">
+ <div>
+ <div class="oe_snippet_thumbnail">
+ <img class="oe_snippet_thumbnail_img" src="/website_twitter/static/src/img/twitter_scroll.png"/>
+ <span class="oe_snippet_thumbnail_title">Twitter Scroller</span>
+ </div>
+ <section class="oe_snippet_body twitter" data-screen-name="OpenERP" data-limit="15">
+ <div class="twitter_timeline" contenteditable="false"></div>
+ </section>
+ </div>
+ </xpath>
+ </template>
+ <template id="website_twitter_options" name="Twitter Options" inherit_id="website.snippet_options">
+ <xpath expr="//div" position="after">
+ <div data-snippet-option-id='twitter'
+ data-selector=".twitter"
+ data-selector-children=".oe_structure, [data-oe-type=html]">
+ </div>
+ </xpath>
+ </template>
+ <template id="twitter" inherit_id="website.layout" name="Twitter Snippet">
+ <xpath expr="//head" position="inside">
+ <link rel="stylesheet" href="/website_twitter/static/src/css/website.twitter.css" type="text/css"/>
+ <script type="text/javascript" src="/website_twitter/static/src/js/website.twitter.animation.js"></script>
+ <script type="text/javascript" src="/website_twitter/static/src/js/website.twitter.editor.js" groups="base.group_website_publisher"></script>
+ </xpath>
+ </template>
+</data>
+</openerp>
diff --git a/addons/website_twitter/views/twitter_view.xml b/addons/website_twitter/views/twitter_view.xml
new file mode 100644
index 00000000000..8600ceca039
--- /dev/null
+++ b/addons/website_twitter/views/twitter_view.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_website_config_settings" model="ir.ui.view">
+ <field name="name">Twitter settings</field>
+ <field name="model">website.config.settings</field>
+ <field name="inherit_id" ref="website.view_website_config_settings"/>
+ <field name="arch" type="xml">
+ <xpath expr="//div[@name='social_twitter']" position="after">
+ <label for="id" string="Twitter API"/>
+ <div>
+ <p>Set your Twitter API access below to be able to use the Twitter Scroller Website snippet.<br/>
+ You can get your API credentials from <a href="https://apps.twitter.com/app/new" target="new">https://apps.twitter.com/app/new</a>
+ </p>
+ <div>
+ <field name="twitter_tutorial" class="oe_inline"/><label for="twitter_tutorial"/>
+
+ <blockquote class="small" attrs="{'invisible':[('twitter_tutorial','=',False)]}">
+ <h2>How to configure the Twitter API access</h2>
+ <ol>
+ <li>Create a new Twitter application on <a href="https://apps.twitter.com/app/new" target="new">https://apps.twitter.com/app/new</a>
+ with the following values:
+ <ul>
+ <li><strong>Name: </strong> OpenERP Tweet Scroller</li>
+ <li><strong>Description: </strong> OpenERP Tweet Scroller </li>
+ <li><strong>Website: </strong> <tt>http://www.openerp.com</tt></li>
+ <li><strong>Callback URL: </strong> leave it blank</li>
+ <li>Accept terms of use and click on the Create button at the bottom</li>
+ </ul>
+ </li>
+ <li>Switch to the API Keys tab: <br/>
+ <img src='/website_twitter/static/src/img/api_key.png'/>
+ </li>
+ <li>Copy/Paste API Key and Secret below</li>
+ <li>Enter the screen name from which you want to load favorite Tweets (does not need to be the same as the API keys)</li>
+ </ol>
+ </blockquote>
+ </div>
+ <div>
+ <label for="twitter_api_key"/>
+ <field name="twitter_api_key" class="oe_inline"/>
+ </div>
+ <div>
+ <label for="twitter_api_secret"/>
+ <field name="twitter_api_secret" class="oe_inline"/>
+ </div>
+ <div>
+ <label for="twitter_screen_name"/>
+ <field name="twitter_screen_name" class="oe_inline"/>
+ </div>
+ </div>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>