2010-01-20 14:28:28 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<openerp>
|
|
|
|
<data>
|
2012-07-17 16:25:28 +00:00
|
|
|
|
2013-10-21 09:03:19 +00:00
|
|
|
<!--
|
2013-10-29 15:17:31 +00:00
|
|
|
Survey User inputs
|
2013-10-21 09:03:19 +00:00
|
|
|
-->
|
|
|
|
|
2013-10-29 15:17:31 +00:00
|
|
|
<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>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Search Survey">
|
|
|
|
<field name="survey_id"/>
|
|
|
|
<field name="email"/>
|
|
|
|
<field name="partner_id"/>
|
2013-10-29 15:17:31 +00:00
|
|
|
<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')]"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<group expand="0" string="Group By...">
|
2013-11-15 07:51:50 +00:00
|
|
|
<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">
|
|
|
|
<header>
|
|
|
|
<button name="action_cancel" states="new,skip" string="Cancel" type="object" icon="gtk-stop"/>
|
|
|
|
<field name="state" widget="statusbar"/>
|
|
|
|
</header>
|
|
|
|
<sheet>
|
|
|
|
<div class="oe_right oe_button_box" name="button_box">
|
|
|
|
<button name="action_survey_resent" states="new,skip" string="Resent the invitation" type="object" icon="gtk-redo"/><br/>
|
|
|
|
<button name="action_preview" states="done,skip" string="Preview" type="object" icon="gtk-zoom-fit"/>
|
|
|
|
<button name="action_print_response" states="done,skip" string="Print response" type="object" icon="gtk-print"/>
|
|
|
|
</div>
|
|
|
|
<group col="2">
|
|
|
|
<group>
|
|
|
|
<field name="survey_id"/>
|
|
|
|
<field name="date_create"/>
|
|
|
|
<field name="deadline"/>
|
|
|
|
<field name="type"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
</group>
|
2013-11-15 07:51:50 +00:00
|
|
|
<group>
|
|
|
|
<field name="partner_id"/>
|
|
|
|
<field name="email"/>
|
|
|
|
<field name="token" groups="base.group_no_one"/>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</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">
|
|
|
|
<field name="survey_id"/>
|
|
|
|
<field name="date_create"/>
|
|
|
|
<field name="deadline"/>
|
|
|
|
<field name="partner_id"/>
|
|
|
|
<field name="email"/>
|
|
|
|
<field name="type"/>
|
|
|
|
<field name="state"/>
|
|
|
|
<button name="action_survey_resent" states="new,skip" string="Resent the invitation" type="object" icon="gtk-redo"/>
|
|
|
|
<button name="action_preview" states="done,skip" string="Preview" type="object" icon="gtk-zoom-fit"/>
|
|
|
|
<button name="action_print_response" states="done,skip" string="Print response" type="object" icon="gtk-print"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.actions.act_window" id="action_survey_user_input">
|
|
|
|
<field name="name">Survey Response</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>
|
2013-10-21 09:03:19 +00:00
|
|
|
|
2012-07-17 16:25:28 +00:00
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
<!--
|
|
|
|
Survey
|
|
|
|
-->
|
2010-04-16 09:16:25 +00:00
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
<record model="ir.ui.view" id="survey_form">
|
|
|
|
<field name="name">survey_form</field>
|
2013-10-28 14:43:14 +00:00
|
|
|
<field name="model">survey.survey</field>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="priority">1</field>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="arch" type="xml">
|
2012-06-11 16:10:14 +00:00
|
|
|
<form string="Survey" version="7.0">
|
2013-11-15 07:51:50 +00:00
|
|
|
<header groups="base.group_survey_manager">
|
2013-10-31 08:08:56 +00:00
|
|
|
<!-- <button name="action_edit_survey" states="draft" string="Edit Survey" type="object" class="oe_highlight"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<button name="survey_cancel" string="Cancel" states="draft" type="object"/>
|
2013-10-31 08:08:56 +00:00
|
|
|
<button name="action_send_survey" string="Invite people" states="open" type="object" class="oe_highlight"/> -->
|
2013-10-28 16:15:31 +00:00
|
|
|
<field name="state" widget="statusbar" nolabel="1" clickable="false" statusbar_visible="draft,open,close,cancelled"/>
|
2012-06-04 12:11:39 +00:00
|
|
|
</header>
|
2013-10-21 09:03:19 +00:00
|
|
|
<sheet class="oe_survey">
|
|
|
|
<div class="oe_button_box oe_right" 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"/>
|
2012-07-02 06:12:08 +00:00
|
|
|
</div>
|
2012-07-16 21:18:52 +00:00
|
|
|
<div class="oe_title">
|
|
|
|
<label for="title" class="oe_edit_only"/>
|
|
|
|
<h1>
|
2013-10-28 14:43:14 +00:00
|
|
|
<field name="title" attrs="{'readonly':[('state','in',['close','cancel'])]}"/>
|
2012-07-16 21:18:52 +00:00
|
|
|
</h1>
|
|
|
|
</div>
|
2013-11-15 07:51:50 +00:00
|
|
|
<field name="description" attrs="{'readonly': True}"/>
|
|
|
|
<group string="Pages">
|
|
|
|
<field name="page_ids" colspan="4" mode="tree" attrs="{'readonly':[('state','=','close')]}" context="{'default_survey_id': active_id}" nolabel="1">
|
|
|
|
<tree>
|
|
|
|
<field name="sequence" widget="handle"/>
|
|
|
|
<field name="title"/>
|
|
|
|
<field name="question_ids"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
2013-10-21 09:03:19 +00:00
|
|
|
</group>
|
2013-11-15 07:51:50 +00:00
|
|
|
<group string="Survey options">
|
|
|
|
<field name="category" attrs="{'readonly':[('state','in',['close','cancel'])]}"/>
|
|
|
|
<field name="user_input_limit" attrs="{'readonly':[('state','=','close')]}"/>
|
|
|
|
<field name="visible_to_user"/>
|
|
|
|
<field name="auth_required" />
|
|
|
|
<field name="public_url" widget="url"/>
|
|
|
|
</group>
|
|
|
|
<label for="thank_you_message" class="oe_edit_only"/>
|
|
|
|
<field name="thank_you_message" attrs="{'readonly': True}"/>
|
2012-04-26 09:42:17 +00:00
|
|
|
</sheet>
|
2013-10-21 09:03:19 +00:00
|
|
|
<div class="oe_chatter">
|
|
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
|
|
</div>
|
2013-11-15 07:51:50 +00:00
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.ui.view" id= "survey_tree">
|
|
|
|
<field name="name">survey_tree</field>
|
|
|
|
<field name="model">survey.survey</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree colors="gray:state == 'close'" string="Survey">
|
|
|
|
<field name="title" />
|
|
|
|
<field name="category"/>
|
|
|
|
<field name="date_open" string="Opening date" />
|
|
|
|
<field name="date_close" string="Closing date" />
|
|
|
|
<field name="state" />
|
|
|
|
<field name="tot_start_survey" string="Started" />
|
|
|
|
<field name="tot_comp_survey" string="Completed" />
|
|
|
|
<field name="user_input_limit" string="Max closing limit" />
|
|
|
|
<button name="action_fill_survey" states="open"
|
|
|
|
string="Fill in Survey" type="object" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<button name="action_print_survey" string="Print Answer" type="object" icon="gtk-print"/>
|
|
|
|
<button name="print_statistics" string="Print Statistics" states="open,close,cancel" type="object" icon="gtk-print" groups="base.group_survey_manager"/>
|
2013-10-29 15:17:31 +00:00
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2012-07-17 16:25:28 +00:00
|
|
|
<record id="survey_search" model="ir.ui.view">
|
2010-01-27 13:55:23 +00:00
|
|
|
<field name="name">survey_search</field>
|
2013-10-28 14:43:14 +00:00
|
|
|
<field name="model">survey.survey</field>
|
2010-01-27 13:55:23 +00:00
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Search Survey">
|
2012-07-19 11:09:20 +00:00
|
|
|
<field name="title" string="Survey"/>
|
2013-10-28 14:43:14 +00:00
|
|
|
<field name="category"/>
|
|
|
|
<filter string="Draft" domain="[('state','=', 'draft')]"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<filter string="Open" domain="[('state','=','open')]"/>
|
|
|
|
<filter string="Closed" domain="[('state','=','close')]"/>
|
2013-10-28 14:43:14 +00:00
|
|
|
<filter string="Cancelled" domain="[('state','=','cancel')]"/>
|
2012-07-19 11:09:20 +00:00
|
|
|
<separator/>
|
2013-10-28 14:43:14 +00:00
|
|
|
<filter string="Not completed yet" name="unread_message" domain="['&', ('response_ids.state', 'in', ['new', 'skip']), ('response_ids.partner_id.user_id', '=', uid)]"/>
|
2013-11-15 07:51:50 +00:00
|
|
|
<group expand="1" string="Group by...">
|
|
|
|
<filter string="Category" name="group_category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category'}"/>
|
|
|
|
<filter string="Status" name="group_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.survey</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<kanban>
|
|
|
|
<field name="title"/>
|
|
|
|
<field name="date_open"/>
|
|
|
|
<field name="tot_comp_survey"/>
|
|
|
|
<field name="user_input_limit"/>
|
|
|
|
<field name="color"/>
|
|
|
|
<field name="state"/>
|
|
|
|
<field name="auth_required"/>
|
|
|
|
<field name="public_url"/>
|
|
|
|
<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 oe_kanban_global_click">
|
|
|
|
<span class="oe_survey_fill">
|
|
|
|
<t t-if="record.state.raw_value === 'open'"><a name="action_fill_survey" type="object">Fill in Survey</a></t>
|
|
|
|
<t t-if="record.state.raw_value !== 'open'"><a name="action_edit_survey" type="object">Test Survey</a></t>
|
|
|
|
</span>
|
|
|
|
<div class="oe_dropdown_toggle oe_dropdown_kanban" t-if="widget.view.is_action_enabled('edit')">
|
|
|
|
<span class="oe_e">i</span>
|
|
|
|
<ul class="oe_dropdown_menu">
|
|
|
|
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="open">Survey Settings...</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">
|
|
|
|
<span class="oe_kanban_right" t-if="widget.view.is_action_enabled('edit')">
|
|
|
|
<a t-if="record.state.raw_value === 'draft'" title="Draft" class="oe_kanban_status"> </a>
|
|
|
|
<a t-if="record.state.raw_value === 'open' and record.auth_required.raw_value" title="Open for authentified people" class="oe_kanban_status_green"> </a>
|
|
|
|
<a t-if="record.state.raw_value === 'open' and !record.auth_required.raw_value" title="Open to everyone" class="oe_kanban_status_green"> </a>
|
|
|
|
<a t-if="record.state.raw_value === 'close'" title="Close" class="oe_kanban_status_red"> </a>
|
|
|
|
<a t-if="record.state.raw_value === 'cancel'" title="Cancelled" class="oe_kanban_status_red"> </a>
|
2013-10-21 09:03:19 +00:00
|
|
|
</span>
|
2013-11-15 07:51:50 +00:00
|
|
|
<h3 class="oe_kanban_ellipsis"><t t-esc="record.title.raw_value.toString()"></t></h3>
|
|
|
|
<table class="oe_kanban_survey_list" t-if="widget.view.is_action_enabled('edit')">
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<t t-if="record.state.raw_value === 'open'"><a name="action_survey_fill2" type="object">Take survey</a></t>
|
|
|
|
<t t-if="record.state.raw_value !== 'open'"><span class="oe_inactive" title="You can only take open surveys">Take survey</span></t>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<t t-if="record.state.raw_value === 'open'"><a name="action_send_survey" type="object">Invite people</a></t>
|
|
|
|
<t t-if="record.state.raw_value !== 'open'"><span class="oe_inactive" title="You can only collect answers for the open survey">Invite people</span></t>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<t t-if="record.tot_comp_survey.raw_value"><a name="%(action_selected_survey_user_input)d" type="action">Get responses (<field name="tot_comp_survey"/><t t-if="record.user_input_limit.raw_value > 0"> / <field name="user_input_limit"/></t>)</a></t>
|
|
|
|
<t t-if="!record.tot_comp_survey.raw_value"><span class="oe_inactive" title="There is no answer yet">Get responses (<field name="tot_comp_survey"/><t t-if="record.user_input_limit.raw_value > 0"> / <field name="user_input_limit"/></t>)</span></t>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a name="action_print_survey" type="object">Print Survey</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<t t-if="record.tot_comp_survey.raw_value"><a name="print_statistics" type="object">Print Statistics</a></t>
|
|
|
|
<t t-if="!record.tot_comp_survey.raw_value"><span class="oe_inactive" title="There is no answer yet">Print Statistics</span></t>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2012-07-05 12:43:05 +00:00
|
|
|
</div>
|
2013-11-15 07:51:50 +00:00
|
|
|
</div>
|
|
|
|
</t>
|
|
|
|
</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="view_id" ref="view_survey_kanban"></field>
|
|
|
|
<field name="search_view_id" ref="survey_search"/>
|
|
|
|
<field name="context">{'search_default_group_category': 1}</field>
|
|
|
|
<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>
|
2010-01-20 14:28:28 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
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">
|
2012-06-14 06:55:15 +00:00
|
|
|
<form string="Survey Page" version="7.0">
|
2013-10-21 09:03:19 +00:00
|
|
|
<sheet class="oe_survey">
|
2013-11-15 07:51:50 +00:00
|
|
|
<group invisible="context.get('edit')" attrs="{'invisible': [('survey_id','!=',None)]}">
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="survey_id"/>
|
|
|
|
</group>
|
2013-11-15 07:51:50 +00:00
|
|
|
<div class="oe_title">
|
|
|
|
<label for="title" class="oe_edit_only"/>
|
|
|
|
<h1><field name="title"/></h1>
|
|
|
|
</div>
|
|
|
|
<field name="description" attrs="{'readonly': True}"/>
|
|
|
|
<group string="Questions">
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="question_ids" nolabel="1" mode="tree" context="{'default_page_id': active_id}">
|
2013-11-15 07:51:50 +00:00
|
|
|
<tree>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="sequence" widget="handle"/>
|
|
|
|
<field name="question"/>
|
|
|
|
<field name="type"/>
|
2013-11-15 07:51:50 +00:00
|
|
|
<field name="constr_mandatory"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
</tree>
|
2012-06-27 09:24:21 +00:00
|
|
|
</field>
|
|
|
|
</group>
|
2012-06-14 06:55:15 +00:00
|
|
|
</sheet>
|
2010-01-20 14:28:28 +00:00
|
|
|
</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">
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="sequence" widget="handle"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="title"/>
|
2010-01-27 13:55:23 +00:00
|
|
|
<field name="survey_id"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="question_ids" string="#Questions"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2010-06-21 13:02:43 +00:00
|
|
|
<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">
|
2012-06-22 08:05:04 +00:00
|
|
|
<field name="title" string="Page"/>
|
2010-06-21 13:02:43 +00:00
|
|
|
<field name="survey_id"/>
|
2011-03-15 14:08:59 +00:00
|
|
|
<group expand="0" string="Group By...">
|
2013-10-21 09:03:19 +00:00
|
|
|
<filter name="group_by_survey" string="Survey" domain="[]" context="{'group_by':'survey_id'}"/>
|
2010-06-21 13:02:43 +00:00
|
|
|
</group>
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
<record model="ir.actions.act_window" id="action_survey_page_form">
|
2010-01-27 13:55:23 +00:00
|
|
|
<field name="name">Survey Pages</field>
|
2010-01-20 14:28:28 +00:00
|
|
|
<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>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="context">{'search_default_group_by_survey': True}</field>
|
2010-01-20 14:28:28 +00:00
|
|
|
</record>
|
|
|
|
|
2013-10-28 14:43:14 +00:00
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
|
|
|
|
<record model="ir.ui.view" id="survey_page_wizard_test1">
|
|
|
|
<field name="name">survey_page_wizard_test</field>
|
|
|
|
<field name="model">survey.page</field>
|
2011-03-30 06:14:07 +00:00
|
|
|
<field name="priority">20</field>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Survey Pages">
|
2012-06-28 12:18:20 +00:00
|
|
|
<field name="title" colspan="4"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<separator string="Description" colspan="4"/>
|
|
|
|
<field name="note" colspan="4" nolabel="1"/>
|
2013-11-15 07:51:50 +00:00
|
|
|
<group colspan="4">
|
|
|
|
<label string="" colspan="3"/>
|
|
|
|
<button name="survey_save" string="Ok" type="object" icon="gtk-go-forward"/>
|
|
|
|
</group>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
2010-01-20 14:28:28 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
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">
|
2013-10-21 09:03:19 +00:00
|
|
|
<form string="Survey Question" version="7.0">
|
|
|
|
<sheet class="oe_survey">
|
2013-10-31 08:08:56 +00:00
|
|
|
<group colspan="4" col="2">
|
|
|
|
|
|
|
|
<!-- The question -->
|
|
|
|
<group colspan="2">
|
2013-10-31 15:45:33 +00:00
|
|
|
<field name="type"/>
|
2013-10-31 08:08:56 +00:00
|
|
|
<field name="question" />
|
|
|
|
<field name="description" />
|
|
|
|
</group>
|
|
|
|
|
2013-11-15 15:14:35 +00:00
|
|
|
<!-- Labels -->
|
|
|
|
<group colspan="2" string="Choice of answers" attrs="{'invisible':[('type','not in',['simple_choice', 'multiple_choice'])]}">
|
|
|
|
<field colspan="2" name="labels_ids" nolabel="1" context="{'default_question_id': active_id}">
|
2013-10-31 08:08:56 +00:00
|
|
|
<tree string="Suggested answers" editable="bottom">
|
|
|
|
<field name="value" />
|
|
|
|
</tree>
|
2013-11-15 07:51:50 +00:00
|
|
|
</field>
|
2013-11-15 15:14:35 +00:00
|
|
|
<field colspan="2" name="simple_choice_display" string="Display mode"/>
|
2013-10-31 08:08:56 +00:00
|
|
|
</group>
|
|
|
|
|
|
|
|
<!-- Sub-questions -->
|
|
|
|
<group colspan="2" attrs="{'invisible':[('type','not in',['matrix', 'vector'])]}">
|
|
|
|
<field name='children_ids' nolabel='1' context="{'default_parent_id': active_id}"/>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
|
2013-11-08 14:24:06 +00:00
|
|
|
<!-- Question validation -->
|
2013-11-15 07:51:50 +00:00
|
|
|
<group colspan="2" string="Question required">
|
2013-11-08 14:24:06 +00:00
|
|
|
<field name="constr_mandatory" string="Is this question mandatory?"/>
|
2013-11-15 07:51:50 +00:00
|
|
|
<group attrs="{'invisible':[('constr_mandatory','=',False)]}">
|
2013-11-15 15:14:35 +00:00
|
|
|
<group attrs="{'invisible':[('type','not in',['matrix'])]}">
|
2013-11-15 07:51:50 +00:00
|
|
|
<field name="constr_type" string="Users must answer..."/>
|
|
|
|
<group attrs="{'invisible':[('constr_type','not in',['at least','a range'])]}">
|
|
|
|
<field name="constr_minimum_req_ans" nolabel="1" />
|
|
|
|
</group>
|
|
|
|
<group attrs="{'invisible':[('constr_type','not in',['at most','a range', 'exactly'])]}">
|
|
|
|
<field name="constr_maximum_req_ans" nolabel="1" />
|
|
|
|
</group>
|
2013-11-08 14:24:06 +00:00
|
|
|
</group>
|
|
|
|
<field name="constr_error_msg" string="Error message"/>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
|
2013-10-31 08:08:56 +00:00
|
|
|
<!-- Answer validation -->
|
2013-11-15 15:14:35 +00:00
|
|
|
<group colspan="1" string="Answer Validation" attrs="{'invisible':[('type','not in',['textbox'])]}">
|
2013-10-31 08:08:56 +00:00
|
|
|
<group>
|
|
|
|
<field name="validation_required"/>
|
|
|
|
|
2013-10-31 14:05:45 +00:00
|
|
|
<group colspan="2" attrs="{'invisible':[('validation_required','=',False)]}">
|
2013-10-31 08:08:56 +00:00
|
|
|
<field name="validation_type" />
|
2013-10-31 14:05:45 +00:00
|
|
|
<group colspan="2" attrs="{'invisible':[('validation_type','!=','has_length')]}">
|
2013-11-15 07:51:50 +00:00
|
|
|
<field name="validation_length_min" string="between"/>
|
|
|
|
<field name="validation_length_max" string="and"/>
|
2013-10-31 08:08:56 +00:00
|
|
|
</group>
|
2013-10-31 14:05:45 +00:00
|
|
|
<group colspan="2" attrs="{'invisible':[('validation_type','!=','is_decimal')]}">
|
2013-10-31 08:08:56 +00:00
|
|
|
<field name="validation_min_float_value" string="between"/>
|
|
|
|
<field name="validation_max_float_value" string="and"/>
|
|
|
|
</group>
|
2013-10-31 14:05:45 +00:00
|
|
|
<group colspan="2" attrs="{'invisible':[('validation_type','!=','is_integer')]}">
|
2013-10-31 08:08:56 +00:00
|
|
|
<field name="validation_min_int_value" string="between"/>
|
|
|
|
<field name="validation_max_int_value" string="and"/>
|
|
|
|
</group>
|
2013-11-15 07:51:50 +00:00
|
|
|
<group colspan="2" attrs="{'invisible':[('validation_type','!=','is_date')]}">
|
2013-10-31 08:08:56 +00:00
|
|
|
<field name="validation_min_date" string="between"/>
|
|
|
|
<field name="validation_max_date" string="and"/>
|
2013-11-15 07:51:50 +00:00
|
|
|
</group>
|
2013-10-31 14:05:45 +00:00
|
|
|
<field name="validation_error_msg" />
|
2013-10-31 08:08:56 +00:00
|
|
|
</group>
|
2010-04-16 09:16:25 +00:00
|
|
|
</group>
|
|
|
|
</group>
|
2013-10-31 08:08:56 +00:00
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
<!-- Comments -->
|
2013-11-15 15:14:35 +00:00
|
|
|
<group colspan="2" string="Comments" attrs="{'invisible':[('type','not in',['simple_choice','multiple_choice'])]}">
|
2013-11-15 07:51:50 +00:00
|
|
|
<field name='comments_allowed' />
|
|
|
|
<group attrs="{'invisible':[('comments_allowed','=',False)]}">
|
|
|
|
<field name='comment_count_as_answer' />
|
|
|
|
</group>
|
|
|
|
</group>
|
2013-10-31 14:05:45 +00:00
|
|
|
|
2013-10-21 09:03:19 +00:00
|
|
|
</group>
|
|
|
|
</sheet>
|
2010-01-20 14:28:28 +00:00
|
|
|
</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">
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="sequence" widget="handle"/>
|
2010-03-26 09:14:34 +00:00
|
|
|
<field name="question"/>
|
|
|
|
<field name="page_id"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="survey_id"/>
|
2010-03-26 09:14:34 +00:00
|
|
|
<field name="type"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2012-07-17 16:25:28 +00:00
|
|
|
<record id="survey_question_search" model="ir.ui.view">
|
2010-03-26 09:14:34 +00:00
|
|
|
<field name="name">survey_question_search</field>
|
|
|
|
<field name="model">survey.question</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Search Question">
|
2012-06-22 08:05:04 +00:00
|
|
|
<field name="question" string="Question"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="survey_id"/>
|
2012-07-31 11:28:04 +00:00
|
|
|
<field name="page_id"/>
|
2013-10-29 15:17:31 +00:00
|
|
|
<field name="type"/>
|
|
|
|
<group expand="1" string="Group by...">
|
2013-10-21 09:03:19 +00:00
|
|
|
<filter name="group_by_survey" string="Survey" domain="[]" context="{'group_by':'survey_id'}"/>
|
|
|
|
<filter name="group_by_page" string="Page" domain="[]" context="{'group_by':'page_id'}"/>
|
2010-08-27 08:41:03 +00:00
|
|
|
</group>
|
2013-11-15 07:51:50 +00:00
|
|
|
</search>
|
2010-03-26 09:14:34 +00:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2010-01-27 13:55:23 +00:00
|
|
|
<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>
|
2013-10-29 15:17:31 +00:00
|
|
|
<field name="search_view_id" ref="survey_question_search"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="context">{'search_default_group_by_survey': True, 'search_default_group_by_page': True}</field>
|
2010-01-27 13:55:23 +00:00
|
|
|
</record>
|
|
|
|
|
2013-11-15 15:14:35 +00:00
|
|
|
<record model="ir.actions.act_window" id="action_survey_label_form">
|
|
|
|
<field name="name">Survey labels</field>
|
|
|
|
<field name="res_model">survey.label</field>
|
2013-10-28 14:43:14 +00:00
|
|
|
<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"/>
|
2013-11-15 07:51:50 +00:00
|
|
|
<field name="context">{'search_default_group_by_survey': True, 'search_default_group_by_page': True}</field> -->
|
|
|
|
</record>
|
2013-10-28 14:43:14 +00:00
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
<record model="ir.ui.view" id="survey_question_wizard_test">
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="name">survey_question_wizard_test</field>
|
|
|
|
<field name="model">survey.question</field>
|
2011-05-09 06:23:10 +00:00
|
|
|
<field name="priority">20</field>
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="inherit_id" ref="survey_question_form"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="arch" type="xml">
|
2013-10-21 09:03:19 +00:00
|
|
|
<data>
|
|
|
|
<xpath expr="//group[@colspan='4']" position="after">
|
|
|
|
<group colspan="4">
|
|
|
|
<button name="survey_save" string="Ok" type="object" icon="gtk-go-forward" invisible="not context.get('show_button_ok')"/>
|
|
|
|
</group>
|
|
|
|
</xpath>
|
|
|
|
</data>
|
2010-01-20 14:28:28 +00:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2013-10-28 14:43:14 +00:00
|
|
|
|
2013-10-21 09:03:19 +00:00
|
|
|
|
2010-01-20 14:28:28 +00:00
|
|
|
<!--
|
|
|
|
Survey Answer
|
|
|
|
-->
|
|
|
|
|
2013-10-21 09:03:19 +00:00
|
|
|
<record model="ir.ui.view" id="survey_answer_form">
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="name">survey_answer_form</field>
|
|
|
|
<field name="model">survey.answer</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Survey Answer">
|
2012-06-28 12:18:20 +00:00
|
|
|
<field name="answer" colspan="4"/>
|
2010-02-04 10:20:01 +00:00
|
|
|
<field name="in_visible_answer_type" invisible="1"/>
|
2013-11-15 07:51:50 +00:00
|
|
|
<group colspan="4" attrs="{'invisible':[('in_visible_answer_type','=',True)]}">
|
2010-02-05 09:48:02 +00:00
|
|
|
<field name="type" colspan="2"/>
|
2013-10-21 09:03:19 +00:00
|
|
|
<group colspan="4" attrs="{'invisible':[('type','not in',['selection'])]}">
|
2010-04-16 09:16:25 +00:00
|
|
|
<separator string="Menu Choices (each choice on separate by lines)" colspan="4"/>
|
|
|
|
<field name="menu_choice" colspan="4" nolabel="1"/>
|
2010-02-05 09:48:02 +00:00
|
|
|
</group>
|
2010-02-04 10:20:01 +00:00
|
|
|
</group>
|
2010-01-20 14:28:28 +00:00
|
|
|
</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">
|
2010-08-30 09:14:48 +00:00
|
|
|
<tree editable="bottom" string="Survey Answer">
|
2013-10-21 09:03:19 +00:00
|
|
|
<field name="sequence" widget="handle"/>
|
2012-06-28 12:18:20 +00:00
|
|
|
<field name="answer"/>
|
2010-08-31 07:26:33 +00:00
|
|
|
<field name="type"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Survey Response Line
|
|
|
|
-->
|
|
|
|
|
2013-10-21 09:03:19 +00:00
|
|
|
<record model="ir.ui.view" id= "survey_response_line_form">
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="name">survey_response_line_form</field>
|
|
|
|
<field name="model">survey.response.line</field>
|
|
|
|
<field name="arch" type="xml">
|
2010-03-04 09:16:44 +00:00
|
|
|
<form string="Survey Answer">
|
2010-04-16 09:16:25 +00:00
|
|
|
<field name="question_id"/>
|
2012-06-28 12:18:20 +00:00
|
|
|
<field name="date_create"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<notebook colspan="4">
|
2010-03-04 09:16:44 +00:00
|
|
|
<page string="Answer">
|
2010-01-20 14:28:28 +00:00
|
|
|
<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>
|
|
|
|
</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">
|
2010-03-04 09:16:44 +00:00
|
|
|
<tree string="Survey Answer Line">
|
2010-04-16 09:16:25 +00:00
|
|
|
<field name="page_id"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="question_id"/>
|
2012-06-28 12:18:20 +00:00
|
|
|
<field name="date_create"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="state"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Survey Response Answer
|
|
|
|
-->
|
|
|
|
|
|
|
|
<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">
|
2010-03-04 09:16:44 +00:00
|
|
|
<tree editable="top" string="Survey Answer">
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="answer_id"/>
|
|
|
|
<field name="answer" />
|
|
|
|
<field name="value_choice" />
|
2010-02-04 10:20:01 +00:00
|
|
|
<field name="column_id"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
<field name="comment_field"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2012-02-28 06:37:05 +00:00
|
|
|
<act_window
|
2011-01-27 09:49:39 +00:00
|
|
|
context="{'search_default_survey_id': [active_id], 'default_survey_id': active_id}"
|
2010-01-20 14:28:28 +00:00
|
|
|
id="act_survey_pages"
|
2010-08-27 08:41:03 +00:00
|
|
|
name="Pages"
|
2010-01-20 14:28:28 +00:00
|
|
|
res_model="survey.page"
|
2013-10-28 14:43:14 +00:00
|
|
|
src_model="survey.survey"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
<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.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"
|
2013-11-15 15:14:35 +00:00
|
|
|
res_model="survey.label"
|
2013-11-15 07:51:50 +00:00
|
|
|
src_model="survey.question"/>
|
2010-01-20 14:28:28 +00:00
|
|
|
|
2013-10-28 14:43:14 +00:00
|
|
|
<!--
|
|
|
|
|
|
|
|
MENU ELEMENTS
|
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
-->
|
2013-10-28 14:43:14 +00:00
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
<!-- Top menubar item -->
|
|
|
|
<menuitem name="Surveys" id="survey_main" sequence="120"/>
|
2013-10-28 14:43:14 +00:00
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
<!-- Left menu categories-->
|
|
|
|
<menuitem name="Surveys" id="menu_surveys" parent="survey_main" sequence="10" groups="base.group_survey_user"/>
|
|
|
|
<menuitem name="Statistics" id="menu_statistics" parent="survey_main" sequence="20" groups="base.group_survey_manager"/>
|
|
|
|
<menuitem name="Configuration" id="menu_surveys_configuration" parent="survey_main" sequence="30" groups="base.group_survey_manager"/>
|
2013-10-28 14:43:14 +00:00
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
<!-- Left menu elements: Survey -->
|
|
|
|
<menuitem name="Surveys" id="menu_survey_form"
|
|
|
|
action="action_survey_form" parent="menu_surveys"
|
|
|
|
sequence="1"/>
|
2013-10-28 14:43:14 +00:00
|
|
|
|
|
|
|
<!-- Left menu elements: Statistics -->
|
2013-10-29 15:17:31 +00:00
|
|
|
<menuitem name="Surveys User inputs" id="menu_survey_type_form1"
|
|
|
|
action="action_survey_user_input" parent="menu_statistics"
|
2013-10-28 14:43:14 +00:00
|
|
|
sequence="1"/>
|
|
|
|
|
2013-11-15 07:51:50 +00:00
|
|
|
<!-- Left menu elements: Configuration -->
|
|
|
|
<menuitem name="Survey Pages" id="menu_survey_page_form1"
|
|
|
|
action="action_survey_page_form" parent="menu_surveys_configuration"
|
|
|
|
sequence="1"/>
|
|
|
|
|
|
|
|
<menuitem name="Survey Questions" id="menu_survey_question_form1"
|
|
|
|
action="action_survey_question_form" parent="menu_surveys_configuration"
|
|
|
|
sequence="2"/>
|
|
|
|
|
2013-11-15 15:14:35 +00:00
|
|
|
<menuitem name="Survey labels" id="menu_survey_label_form1"
|
|
|
|
action="action_survey_label_form" parent="menu_surveys_configuration"
|
2013-11-15 07:51:50 +00:00
|
|
|
sequence="3"/>
|
|
|
|
|
|
|
|
<!-- web -->
|
|
|
|
<record id="action_survey_fill2" model="ir.actions.client">
|
|
|
|
<field name="res_model">survey.survey</field>
|
|
|
|
<field name="tag">survey.fill2</field>
|
|
|
|
</record>
|
|
|
|
<menuitem id="menu_survey_fill2" name="Survey Fill" parent="menu_surveys"
|
|
|
|
action="action_survey_fill2"/>
|
|
|
|
</data>
|
|
|
|
</openerp>
|