odoo/addons/survey/survey_view.xml

755 lines
43 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--menuitem name="Tools" id="base.menu_tools" sequence="120"/-->
<!-- Top menu item -->
<menuitem name="Survey" id="survey_main" sequence="120"/>
<menuitem name="Survey" id="menu_surveys" parent="survey_main" sequence="10" groups="base.group_survey_user"/>
<menuitem name="Statistics" id="menu_reporting" parent="survey_main" sequence="20" groups="base.group_survey_manager"/>
<menuitem id="base.next_id_10" name="Survey" parent="base.menu_reporting" sequence="1" groups="base.group_survey_manager"/>
<menuitem name="Configuration" id="menu_surveys_configuration" parent="survey_main" sequence="30" groups="base.group_no_one"/>
<!--
Survey Response
-->
<record id="survey_response_search" model="ir.ui.view">
<field name="name">survey_response_search</field>
<field name="model">survey.response</field>
<field name="arch" type="xml">
<search string="Search Survey">
<field name="survey_id"/>
<field name="email"/>
<field name="partner_id"/>
<filter string="Finished" domain="[('state','=', 'done')]"/>
<filter string="Not Finished" domain="[('state','=', 'skip')]"/>
<filter string="Not Started" domain="[('state','=', 'new')]"/>
<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_response_form">
<field name="name">survey_response_form</field>
<field name="model">survey.response</field>
<field name="arch" type="xml">
<form string="Survey Response" 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="date_deadline"/>
<field name="response_type"/>
</group>
<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_response_tree">
<field name="name">survey_response_tree</field>
<field name="model">survey.response</field>
<field name="arch" type="xml">
<tree string="Survey Response" version="7.0">
<field name="survey_id"/>
<field name="date_create"/>
<field name="date_deadline"/>
<field name="partner_id"/>
<field name="email"/>
<field name="response_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_response">
<field name="name">Survey Response</field>
<field name="res_model">survey.response</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="survey_response_tree"></field>
<field name="search_view_id" ref="survey_response_search"/>
<field name="context">{'search_default_group_by_survey': True}</field>
<field name="help" type="html">
<p>
Nobody have reply to your surveys.
</p>
</field>
</record>
<record id="action_selected_survey_response" model="ir.actions.act_window">
<field name="name">Survey Response</field>
<field name="res_model">survey.response</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="survey_response_tree"></field>
<field name="search_view_id" ref="survey_response_search"/>
<field name="context">{'search_default_survey_id': active_id, 'default_survey_id': active_id}</field>
<field name="help" type="html">
<p>
Nobody have reply to your survey.
</p>
</field>
</record>
<menuitem name="Surveys Responses" id="menu_survey_type_form1"
action="action_survey_response" parent="menu_reporting"
groups="base.group_survey_manager" sequence="2"/>
<!--
Survey
-->
<record model="ir.ui.view" id="survey_form">
<field name="name">survey_form</field>
<field name="model">survey</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="Survey" version="7.0">
<header groups="base.group_survey_manager">
<button name="action_edit_survey" states="draft" string="Edit Survey" type="object" class="oe_highlight"/>
<button name="survey_cancel" string="Cancel" states="draft" type="object"/>
<button name="action_survey_sent" string="Invite people" states="open" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar" nolabel="1" clickable="True" statusbar_visible="draft,open,close"/>
</header>
<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"/>
</div>
<div class="oe_title">
<label for="title" class="oe_edit_only"/>
<h1>
<field name="title" attrs="{'readonly':[('state','=','close')]}"/>
</h1>
</div>
<group>
<group colspan="4">
<field name="type" attrs="{'readonly':[('state','in',['close','cancel'])]}" class="oe_inline"/>
<field name="max_response_limit" attrs="{'readonly':[('state','=','close')]}"/>
<field name="visible_to_user"/>
<field name="public_url" widget="url"/>
<div name="authenticate" colspan="4">
<small>
The Public Portal is not activated; users must be authenticated to answer the survey. If you want to make the survey available to everyone, please activate the Public Portal : Settings > General Settings > Activate the public portal.
</small>
</div>
</group>
</group>
<field name="page_ids" colspan="4" mode="tree" attrs="{'readonly':[('state','=','close')]}" context="{'default_survey_id': active_id}">
<tree string="Survey Question">
<field name="sequence" widget="handle"/>
<field name="title"/>
<field name="question_ids"/>
</tree>
</field>
<field name="note" placeholder="Survey description..." attrs="{'readonly':[('state','=','close')]}"/>
</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">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="date_open" string="Open Date"/>
<field name="tot_start_survey" string="Started"/>
<field name="tot_comp_survey" string="Completed"/>
<field name="state"/>
<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')]}"/>
<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"/>
</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 string="New / Draft" domain="[('state','=', 'draft')]"/>
<filter string="Open" domain="[('state','=','open')]"/>
<filter string="Closed" domain="[('state','=','close')]"/>
<filter string="Canceled" domain="[('state','=','cancel')]"/>
<separator/>
<filter string="Survey to fill in" name="unread_message" domain="['&amp;', ('response_ids.state', 'in', ['new', 'skip']), ('response_ids.partner_id.user_id', '=', uid)]"/>
<group expand="0" string="Group By...">
<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="color"/>
<field name="state"/>
<field name="authenticate"/>
<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_test_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.authenticate.raw_value" title="Open for authentified people" class="oe_kanban_status_green"> </a>
<a t-if="record.state.raw_value === 'open' and !record.authenticate.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>
</span>
<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_sent" 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_response)d" type="action">Get responses (<field name="tot_comp_survey"/><t t-if="record.max_response_limit.raw_value > 0"> / <field name="max_response_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.max_response_limit.raw_value > 0"> / <field name="max_response_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>
</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"
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 class="oe_survey">
<group col="2" invisible="context.get('edit')" attrs="{'invisible': [('survey_id','!=',None)]}">
<field name="survey_id"/>
</group>
<label for="title" class="oe_edit_only"/>
<h1>
<field name="title"/>
</h1>
<group colspan="4" col="1">
<field name="note" nolabel="1" placeholder="Description on the survey page..."/>
<field name="question_ids" nolabel="1" mode="tree" context="{'default_page_id': active_id}">
<tree string="Survey Question">
<field name="sequence" widget="handle"/>
<field name="question"/>
<field name="type"/>
</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" widget="handle"/>
<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 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">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>
<field name="context">{'search_default_group_by_survey': True}</field>
</record>
<menuitem name="Survey Pages" id="menu_survey_page_form1"
action="action_survey_page_form" parent="menu_surveys_configuration"
sequence="1"/>
<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"/>
<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" version="7.0">
<sheet class="oe_survey">
<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 colspan="4" col="1">
<group col="2" invisible="context.get('edit')" attrs="{'invisible': [('page_id','!=',None)]}">
<field name="tot_resp"/>
<field name="survey_id" readonly="1"/>
<field name="page_id" on_change="on_change_page_id(page_id)"/>
</group>
<group col="2">
<field name="type" on_change="on_change_type(type)"/>
<field name="question" nolabel="1" colspan="2"/>
<field name="descriptive_text" nolabel="1" colspan="2"/>
</group>
<group string="Answer" attrs="{'invisible':[('type','not in',['multiple_textboxes_diff_type', 'multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'rating_scale', 'multiple_textboxes', 'numerical_textboxes', 'date', 'date_and_time', 'table'])]}">
<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','not in',['matrix_of_choices_only_multi_ans', 'matrix_of_choices_only_one_ans', 'rating_scale', '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','not in',['table'])]}">
<field name="no_of_rows"/>
</group>
</group>
</group>
<group string="Comment Field" attrs="{'invisible':[('type','not in',['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_choices_only_one_ans', 'rating_scale'])]}">
<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>
<group attrs="{'invisible':[('type','not in',['matrix_of_choices_only_one_ans', 'rating_scale'])]}">
<field name="comment_column"/>
<group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
<field name="column_name" colspan="2"/>
</group>
</group>
<group string="Validation" attrs="{'invisible':[('type','not in',['single_textbox', 'multiple_textboxes'])]}">
<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>
<group string="Required Answer" attrs="{'invisible':[('type','not in',['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'rating_scale', 'multiple_textboxes', 'numerical_textboxes', 'date', 'date_and_time', 'single_textbox', 'comment', 'multiple_textboxes_diff_type'])]}">
<field name="is_require_answer"/>
<group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
<group colspan="4" attrs="{'invisible':[('type','not in', ['multiple_choice_multiple_ans', 'matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'rating_scale', 'multiple_textboxes', 'numerical_textboxes', 'date', 'date_and_time', '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','not in',['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','not in',['rating_scale'])]}">
<field name="rating_allow_one_column_require"/>
</group>
</group>
</group>
</group>
</sheet>
</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" widget="handle"/>
<field name="question"/>
<field name="page_id"/>
<field name="survey_id"/>
<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_id"/>
<field name="type"/>
<field name="page_id"/>
<group expand="0" string="Group By...">
<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'}"/>
</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"/>
<field name="context">{'search_default_group_by_survey': True, 'search_default_group_by_page': True}</field>
</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="inherit_id" ref="survey_question_form"/>
<field name="arch" type="xml">
<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>
</field>
</record>
<menuitem name="Survey Questions" id="menu_survey_question_form1"
action="action_survey_question_form" parent="menu_surveys_configuration"
sequence="2"/>
<!--
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="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','not in',['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" widget="handle"/>
<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>
</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 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">
<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="sequence" widget="handle"/>
<field name="title"/>
</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"/>
</data>
</openerp>