[IMP] Tour cleanup
[odoo/odoo.git] / addons / survey / survey_view.xml
index ef3366e..f6973a5 100644 (file)
@@ -2,14 +2,14 @@
 <openerp>
     <data>
         <!-- Top menu item -->
-        <menuitem name="Tools" id="base.menu_tools" sequence="160"/>
+        <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" />
+        <menuitem id="base.next_id_10" name="Survey" parent="base.menu_reporting" sequence="1" groups="base.group_survey_user"/>
 
         <!--
             Survey
@@ -23,7 +23,7 @@
                 <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" states="open" type="object"/>
+                    <button name="survey_cancel" string="Cancel Survey" states="open" type="object"/>
                     <field name="state" widget="statusbar" statusbar_visible="open,close"/>
                 </header>
                 <sheet>
@@ -31,8 +31,8 @@
                         <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="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
-                            string="Edit Survey" type="action" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
+                        <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">
@@ -44,9 +44,9 @@
                     <group>
                         <group>
                             <field name="id" invisible="1"/>
-                            <field name="responsible_id" class="oe_inline" attrs="{'readonly':[('state','=','close')]}"/>
+                            <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')]}"/>
-                            <field name="type" attrs="{'readonly':[('state','=','close')]}"/>
                         </group>
                         <group>
                             <field name="max_response_limit" attrs="{'readonly':[('state','=','close')]}"/>
                             <field name="note" placeholder="Survey description..." attrs="{'readonly':[('state','=','close')]}"/>
                         </page>
                         <page string="Invited User">
-                            <field name="invited_user_ids" attrs="{'readonly':[('state','=','close')]}"/>
+                            <field name="invited_user_ids" readonly="1"/>
                         </page>
                         <page string="History">
                             <group>
             <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)"/>
                 <form string="Survey Answer">
                     <field name="survey_id"/>
                     <field name="date_create"/>
-                    <field name="user_id"/>
+                    <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"/>
                     <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" states="waiting_answer" type="object"/>
+                    <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)"/>
+                    <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"/>
                     </group>