[IMP]:survey,hr_evaluation,crm_hr--(Ref-YSA,APA)
[odoo/odoo.git] / addons / survey / survey_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5 <!--        <menuitem name="Survey Management" id="main_menu_survey" icon="terp-crm" sequence="1" groups="group_survey_manager,group_survey_user"/>-->
6                     <menuitem icon="STOCK_PREFERENCES" id="base.menu_tools" name="Tools"/>
7                         <menuitem name="Survey" id="main_menu_survey"
8                                  sequence="3" groups="group_survey_manager,group_survey_user"
9                                  parent="base.menu_tools" />
10                         <menuitem id="menu_defination" name="Defination" parent="main_menu_survey" sequence="1"/>
11 <!--        <menuitem name="Configuration" id="menu_survey_config" parent="main_menu_survey" groups="group_survey_manager"/>-->
12                         <menuitem name="Configuration" parent="base.menu_tools"
13                                 id="base.menu_lunch_survey_root" groups="group_survey_manager" sequence="6"/>
14                     <menuitem name="Surveys" id="menu_survey_config"
15                         parent="base.menu_lunch_survey_root" groups="group_survey_manager" sequence="2"/>
16         <!--
17             Survey
18         -->
19         <record model="ir.ui.view" id="survey_form">
20             <field name="name">survey_form</field>
21             <field name="model">survey</field>
22             <field name="type">form</field>
23             <field name="arch" type="xml">
24                 <form string="Survey">
25                         <field name="title" select="1"/>
26                         <group col="6" colspan="6">
27                             <field name="responsible_id"/>
28                                 <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
29                                 string="Test Survey" type="action" icon="gtk-new" context="{'active':True,'survey_id': active_id}"/>
30                                                 <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
31                                 string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'readonly':[('state','!=','open')]}"/>
32                                                 <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
33                                 string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
34                                         </group>
35                     <notebook colspan="4">
36                         <page string="Survey">
37                             <field name="page_ids" colspan="4" nolabel="1" mode="form,tree" context="{'line_order': page_ids}">
38                                 <form string="Survey Page">
39                                     <field name="title" select="1"/>
40                                     <field name="sequence"/>
41                                     <field name="note" colspan="4" nolabel="1"/>
42                                     <field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
43                                         <form string="Survey Question">
44                                             <field name="question" colspan="4" select="1"/>
45                                             <field name="sequence"/>
46                                             <field name="tot_resp" select="2"/>
47                                             <field name="type" on_change="on_change_type(type)"/>
48                                                                     <field name="in_visible_rating_weight" invisible="1"/>
49                                                                     <field name="in_visible_menu_choice" invisible="1"/>
50                                                                     <field name="in_visible_answer_type" invisible="1"/>
51                                                                     <notebook colspan="4">
52                                                                         <page string="Options">
53                                                                                                         <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')]}">
54                                                                                   <separator string="Answer" colspan="4"/>
55                                                                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
56                                                                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
57                                                                                        </group>
58                                                                                        <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')]}">
59                                                                                            <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
60                                                                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
61                                                                                                                            <field name="no_of_rows"/>
62                                                                                                                         </group>
63                                                                                        </group>
64                                                                                 </group>
65                                                                                 <newline/>
66                                                                                                         <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')]}">
67                                                                                     <separator string="Comment Field" colspan="4"/>
68                                                                                     <group colspan="4">
69                                                                                                                         <field name="is_comment_require"/>
70                                                                                                                 </group>
71                                                                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
72                                                                                             <group col="4" colspan="4">
73                                                                                                     <field name="comment_field_type" colspan="1"/>
74                                                                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
75                                                                                                         <field colspan="2" name="comment_label" />
76                                                                                                     </group>
77                                                                                                                         </group>
78                                                                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
79                                                                                                 <field name="comment_valid_type" colspan="2"/>
80                                                                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
81                                                                                                     <field name="comment_minimum_no" string="Between"/>
82                                                                                                     <field name="comment_maximum_no" string="and"/>
83                                                                                                 </group>
84                                                                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
85                                                                                                     <field name="comment_minimum_float" string="Between"/>
86                                                                                                     <field name="comment_maximum_float" string="and"/>
87                                                                                                 </group>
88                                                                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
89                                                                                                     <field name="comment_minimum_date" string="Between"/>
90                                                                                                     <field name="comment_maximum_date" string="and"/>
91                                                                                                 </group>
92                                                                                                 <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')]}">
93                                                                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
94                                                                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
95                                                                                                 </group>
96                                                                                             </group>
97                                                                                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
98                                                                                                     <field name="comment_column"/>
99                                                                                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
100                                                                                                         <field name="column_name" colspan="2"/>
101                                                                                                     </group>
102                                                                                                                         </group>
103                                                                                                                 </group>
104                                                                                 </group>
105                                                                                 <newline/>
106                                                                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
107                                                                                     <separator string="Validation" colspan="4"/>
108                                                                                     <group colspan="4">
109                                                                                                                         <field name="is_validation_require"/>
110                                                                                                                 </group>
111                                                                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
112                                                                                         <field name="validation_type" colspan="2"/>
113                                                                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
114                                                                                             <field name="validation_minimum_no" string="Between"/>
115                                                                                             <field name="validation_maximum_no" string="and"/>
116                                                                                         </group>
117                                                                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
118                                                                                             <field name="validation_minimum_float" string="Between"/>
119                                                                                             <field name="validation_maximum_float" string="and"/>
120                                                                                         </group>
121                                                                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
122                                                                                             <field name="validation_minimum_date" string="Between"/>
123                                                                                             <field name="validation_maximum_date" string="and"/>
124                                                                                         </group>
125                                                                                     </group>
126                                                                                     <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')]}">
127                                                                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
128                                                                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
129                                                                                     </group>
130                                                                                 </group>
131                                                                                 <newline/>
132                                                                                 <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')]}">
133                                                                                     <separator string="Required Answer" colspan="4"/>
134                                                                                     <newline/>
135                                                                                 <field name="is_require_answer"/>
136                                                                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
137                                                                                             <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')]}">
138                                                                                                 <field name="required_type"/>
139                                                                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
140                                                                                                     <field name="req_ans" />
141                                                                                                 </group>
142                                                                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
143                                                                                                     <field name="minimum_req_ans"/>
144                                                                                                     <field name="maximum_req_ans"/>
145                                                                                                 </group>
146                                                                                             </group>
147                                                                                             <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)]}">
148                                                                                                 <label string="When the question is not answered, display this error message:"/>
149                                                                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
150                                                                                             </group>
151                                                                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
152                                                                                                 <group colspan="2" >
153                                                                                                     <field name="numeric_required_sum"/>
154                                                                                                 </group>
155                                                                                                 <newline/>
156                                                                                                 <label string="When the choices do not add up correctly, display this error message"/>
157                                                                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
158                                                                                             </group>
159                                                                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
160                                                                                                 <field name="rating_allow_one_column_require"/>
161                                                                                             </group>
162                                                                                                                 </group>
163                                                                                 </group>
164                                                                                 <newline/>
165                                                                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
166                                                                                     <separator string="Descriptive Text" colspan="4"/>
167                                                                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
168                                                                                 </group>
169                                                                         </page>
170                                                                     </notebook>
171                                         </form>
172                                         <tree string="Survey Question">
173                                             <field name="sequence" string="Seq"/>
174                                             <field name="question" colspan="4" select="1"/>
175                                             <field name="answer_choice_ids"/>
176                                         </tree>
177                                     </field>
178                                 </form>
179                             </field>
180                             <group col="9" colspan="4">
181                                 <field name="state"/>
182                                 <button name="survey_draft"
183                                     string="Set to draft" states="cancel,close" type="object"
184                                     icon="gtk-new"/>
185                                 <button name="survey_open" string="Open"
186                                     states="draft" type="object" icon="gtk-go-forward"/>
187                                 <button name="survey_close"
188                                     string="Close" states="open" type="object" icon="gtk-close"/>
189                                 <button name="survey_cancel"
190                                     string="Cancel" states="open" type="object" icon="gtk-cancel"/>
191                             </group>
192                         </page>
193                         <page string="Other">
194                                 <group colspan="6" col='4'>
195                                     <field name="max_response_limit" select="1"
196                                         attrs="{'readonly':[('state','in',('open','close'))]}"/>
197                                     <field name="response_user" select="2"
198                                         attrs="{'readonly':[('state','in',('open','close'))]}"/>
199                                                                 <field name="type"/>
200                                     <field name="send_response"/>
201                                                         </group>
202                             <separator colspan="4" string="Survey Details"/>
203                             <field name="note" colspan="4" nolabel="1"/>
204                         </page>
205                         <page string="History">
206                             <field name="date_open" select="1"/>
207                             <field name="date_close" select="2"/>
208                             <field name="tot_start_survey" select="1"/>
209                             <field name="tot_comp_survey" select="1"/>
210                             <field name="history" colspan="4" nolabel="1">
211                                 <tree string="History">
212                                     <field name="user_id"/>
213                                     <field name="date"/>
214                                 </tree>
215                                 <form string="History">
216                                     <field name="user_id"/>
217                                     <field name="date"/>
218                                 </form>
219                                </field>
220                            </page>
221                     </notebook>
222                 </form>
223             </field>
224         </record>
225
226         <record model ="ir.ui.view" id= "survey_tree">
227             <field name="name">survey_tree</field>
228             <field name="model">survey</field>
229             <field name="type">tree</field>
230             <field name="arch" type="xml">
231                 <tree string="Survey">
232                     <field name="title" select="1"/>
233                     <field name="type" select="1"/>
234                     <field name="date_open" select="1" string="Open Date"/>
235                                         <field name="responsible_id" select="2"/>
236                     <field name="tot_start_survey" select="2" string="Started"/>
237                     <field name="tot_comp_survey" select="2" string="Completed"/>
238                     <field name="state" select="1"/>
239                                         <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
240                                         string="Test Survey" type="action" icon="gtk-execute" context="{'active':True,'survey_id': active_id}"/>
241                                         <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
242                                         string="Answer Survey" type="action" icon="gtk-new" context="{'survey_id': active_id}"/>
243                                         <button name="%(wizard_print_survey)d" states="open,draft,close,cancel"
244                                         string="Print Survey" type="action" icon="gtk-print" context="{'active':True,'survey_id': active_id}"/>
245                                         <button name="%(survey_browse_response)d" states="open,draft,close,cancel"
246                                         string="Print Answer" type="action" icon="gtk-print"/>
247                 </tree>
248             </field>
249         </record>
250
251        <record id="survey_search" model="ir.ui.view">
252             <field name="name">survey_search</field>
253             <field name="model">survey</field>
254             <field name="type">search</field>
255             <field name="arch" type="xml">
256                 <search string="Search Survey">
257                    <group col='10' colspan='4'>
258                         <filter icon="terp-crm" string="Draft" domain="[('state','=','draft')]"/>
259                         <separator orientation="vertical"/>
260                         <filter string="Open" icon="terp-stock" domain="[('state','=','open')]"/>
261                         <separator orientation="vertical"/>
262                         <field name="title" select="1"/>
263                         <field name="type" select="1"/>
264                         <field name="responsible_id" select="1" widget="selection">
265                         <filter string="MY" icon="terp-partner" domain="[('responsible_id','=',uid)]"/>
266                         </field>
267                    </group>
268                </search>
269             </field>
270         </record>
271
272         <record model="ir.actions.act_window" id="action_survey_form1">
273             <field name="name">Surveys</field>
274             <field name="res_model">survey</field>
275             <field name="view_type">form</field>
276             <field name="view_mode">tree,form</field>
277             <field name="view_id" ref="survey_tree"></field>
278             <field name="search_view_id" ref="survey_search"/>
279         </record>
280
281
282         <menuitem name="Surveys" id="menu_survey_form"
283             action="action_survey_form1" parent="menu_defination"
284             groups="group_survey_manager"/>
285
286         <!--
287             Survey Pages
288         -->
289
290         <record model="ir.ui.view" id="survey_page_form">
291             <field name="name">survey_page_form</field>
292             <field name="model">survey.page</field>
293             <field name="type">form</field>
294             <field name="arch" type="xml">
295                 <form string="Survey Page">
296                     <field name="title" colspan="4" select="1"/>
297                     <field name="survey_id" select="1"/>
298                     <field name="sequence"/>
299                     <separator string="Description" colspan="4"/>
300                     <field name="note" colspan="4" nolabel="1"/>
301                     <field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
302                     <form string="Survey Question">
303                         <field name="question" colspan="4" select="1"/>
304                         <field name="sequence"/>
305                         <field name="tot_resp" select="2"/>
306                         <field name="type" on_change="on_change_type(type)"/>
307                             <field name="in_visible_rating_weight" invisible="1"/>
308                             <field name="in_visible_menu_choice" invisible="1"/>
309                             <field name="in_visible_answer_type" invisible="1"/>
310                         <notebook colspan="4">
311                                 <page string="Options">
312                                                                 <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')]}">
313                                           <separator string="Answer" colspan="4"/>
314                                                                    <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
315                                                    <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
316                                                </group>
317                                                <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')]}">
318                                                    <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
319                                                                                 <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
320                                                                                    <field name="no_of_rows"/>
321                                                                                 </group>
322                                                </group>
323                                         </group>
324                                         <newline/>
325                                                                 <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')]}">
326                                             <separator string="Comment Field" colspan="4"/>
327                                             <group colspan="4">
328                                                                                 <field name="is_comment_require"/>
329                                                                         </group>
330                                             <group attrs="{'invisible':[('is_comment_require','=',False)]}">
331                                                     <group col="4" colspan="4">
332                                                             <field name="comment_field_type" colspan="1"/>
333                                                             <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
334                                                                 <field colspan="2" name="comment_label" />
335                                                             </group>
336                                                                                 </group>
337                                                     <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
338                                                         <field name="comment_valid_type" colspan="2"/>
339                                                         <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
340                                                             <field name="comment_minimum_no" string="Between"/>
341                                                             <field name="comment_maximum_no" string="and"/>
342                                                         </group>
343                                                         <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
344                                                             <field name="comment_minimum_float" string="Between"/>
345                                                             <field name="comment_maximum_float" string="and"/>
346                                                         </group>
347                                                         <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
348                                                             <field name="comment_minimum_date" string="Between"/>
349                                                             <field name="comment_maximum_date" string="and"/>
350                                                         </group>
351                                                         <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')]}">
352                                                             <label string="When the comment is an invalid format, display this error message" colspan="4"/>
353                                                             <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
354                                                         </group>
355                                                     </group>
356                                                     <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
357                                                             <field name="comment_column"/>
358                                                             <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
359                                                                 <field name="column_name" colspan="2"/>
360                                                             </group>
361                                                                                 </group>
362                                                                         </group>
363                                         </group>
364                                         <newline/>
365                                         <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
366                                             <separator string="Validation" colspan="4"/>
367                                             <group colspan="4">
368                                                                                 <field name="is_validation_require"/>
369                                                                         </group>
370                                             <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
371                                                 <field name="validation_type" colspan="2"/>
372                                                 <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
373                                                     <field name="validation_minimum_no" string="Between"/>
374                                                     <field name="validation_maximum_no" string="and"/>
375                                                 </group>
376                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
377                                                     <field name="validation_minimum_float" string="Between"/>
378                                                     <field name="validation_maximum_float" string="and"/>
379                                                 </group>
380                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
381                                                     <field name="validation_minimum_date" string="Between"/>
382                                                     <field name="validation_maximum_date" string="and"/>
383                                                 </group>
384                                             </group>
385                                             <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')]}">
386                                                 <label string="When the comment is an invalid format, display this error message" colspan="4"/>
387                                                 <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
388                                             </group>
389                                         </group>
390                                         <newline/>
391                                         <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')]}">
392                                             <separator string="Required Answer" colspan="4"/>
393                                             <newline/>
394                                         <field name="is_require_answer"/>
395                                                                         <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
396                                                     <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')]}">
397                                                         <field name="required_type"/>
398                                                         <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
399                                                             <field name="req_ans" />
400                                                         </group>
401                                                         <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
402                                                             <field name="minimum_req_ans"/>
403                                                             <field name="maximum_req_ans"/>
404                                                         </group>
405                                                     </group>
406                                                     <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)]}">
407                                                         <label string="When the question is not answered, display this error message:"/>
408                                                         <field name="req_error_msg" colspan="4" nolabel="1"/>
409                                                     </group>
410                                                     <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
411                                                         <group colspan="2" >
412                                                             <field name="numeric_required_sum"/>
413                                                         </group>
414                                                         <newline/>
415                                                         <label string="When the choices do not add up correctly, display this error message"/>
416                                                         <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
417                                                     </group>
418                                                     <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
419                                                         <field name="rating_allow_one_column_require"/>
420                                                     </group>
421                                                                         </group>
422                                         </group>
423                                         <newline/>
424                                         <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
425                                             <separator string="Descriptive Text" colspan="4"/>
426                                             <field name="descriptive_text" colspan="4" nolabel="1"/>
427                                         </group>
428                                 </page>
429                             </notebook>
430
431                     </form>
432                     <tree string="Survey Question">
433                         <field name="sequence" string="Seq"/>
434                         <field name="question" colspan="4" select="1"/>
435                         <field name="answer_choice_ids"/>
436                     </tree>
437                     </field>
438                 </form>
439             </field>
440         </record>
441
442
443         <record model="ir.ui.view" id="survey_page_tree">
444             <field name="name">survey_page_tree</field>
445             <field name="model">survey.page</field>
446             <field name="type">tree</field>
447             <field name="arch" type="xml">
448                 <tree string="Survey Page">
449                     <field name="sequence" string="Seq"/>
450                     <field name="title"/>
451                     <field name="survey_id"/>
452                     <field name="question_ids" string="#Questions"/>
453                 </tree>
454             </field>
455         </record>
456
457         <record model="ir.actions.act_window" id="action_survey_page_form">
458             <field name="name">Survey Pages</field>
459             <field name="res_model">survey.page</field>
460             <field name="view_type">form</field>
461             <field name="view_mode">tree,form</field>
462             <field name="view_id" ref="survey_page_tree"></field>
463         </record>
464
465         <menuitem name="Survey Pages" id="menu_survey_page_form1"
466             action="action_survey_page_form" parent='menu_defination'
467             groups="group_survey_manager"/>
468
469         <record model="ir.ui.view" id="survey_page_wizard_test1">
470             <field name="name">survey_page_wizard_test</field>
471             <field name="model">survey.page</field>
472             <field name="type">form</field>
473             <field name="arch" type="xml">
474                 <form string="Survey Pages">
475                     <field name="title" colspan="4" select="1"/>
476                     <field name="sequence"/>
477                     <separator string="Description" colspan="4"/>
478                     <field name="note" colspan="4" nolabel="1"/>
479                         <group colspan="4">
480                                 <label string="" colspan="3"/>
481                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-go-back"/>
482                                         </group>
483                                 </form>
484                         </field>
485                 </record>
486
487         <!--
488             Survey Question
489         -->
490
491         <record model="ir.ui.view" id="survey_question_form">
492             <field name="name">survey_question_form</field>
493             <field name="model">survey.question</field>
494             <field name="type">form</field>
495             <field name="arch" type="xml">
496                 <form string="Survey Question">
497                     <field name="question" colspan="4" select="1"/>
498                     <field name="page_id" select="1"/>
499                     <field name="sequence"/>
500                     <field name="tot_resp" select="2"/>
501                     <field name="type" on_change="on_change_type(type)"/>
502                     <field name="in_visible_rating_weight" invisible="1"/>
503                     <field name="in_visible_menu_choice" invisible="1"/>
504                     <field name="in_visible_answer_type" invisible="1"/>
505                     <notebook colspan="4">
506                         <page string="Options">
507                                                         <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')]}">
508                                   <separator string="Answer" colspan="4"/>
509                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
510                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
511                                        </group>
512                                        <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')]}">
513                                            <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
514                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
515                                                                            <field name="no_of_rows"/>
516                                                                         </group>
517                                        </group>
518                                 </group>
519                                 <newline/>
520                                                         <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')]}">
521                                     <separator string="Comment Field" colspan="4"/>
522                                     <group colspan="4">
523                                                                         <field name="is_comment_require"/>
524                                                                 </group>
525                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
526                                             <group col="4" colspan="4">
527                                                     <field name="comment_field_type" colspan="1"/>
528                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
529                                                         <field colspan="2" name="comment_label" />
530                                                     </group>
531                                                                         </group>
532                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
533                                                 <field name="comment_valid_type" colspan="2"/>
534                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
535                                                     <field name="comment_minimum_no" string="Between"/>
536                                                     <field name="comment_maximum_no" string="and"/>
537                                                 </group>
538                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
539                                                     <field name="comment_minimum_float" string="Between"/>
540                                                     <field name="comment_maximum_float" string="and"/>
541                                                 </group>
542                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
543                                                     <field name="comment_minimum_date" string="Between"/>
544                                                     <field name="comment_maximum_date" string="and"/>
545                                                 </group>
546                                                 <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')]}">
547                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
548                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
549                                                 </group>
550                                             </group>
551                                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
552                                                     <field name="comment_column"/>
553                                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
554                                                         <field name="column_name" colspan="2"/>
555                                                     </group>
556                                                                         </group>
557                                                                 </group>
558                                 </group>
559                                 <newline/>
560                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
561                                     <separator string="Validation" colspan="4"/>
562                                     <group colspan="4">
563                                                                         <field name="is_validation_require"/>
564                                                                 </group>
565                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
566                                         <field name="validation_type" colspan="2"/>
567                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
568                                             <field name="validation_minimum_no" string="Between"/>
569                                             <field name="validation_maximum_no" string="and"/>
570                                         </group>
571                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
572                                             <field name="validation_minimum_float" string="Between"/>
573                                             <field name="validation_maximum_float" string="and"/>
574                                         </group>
575                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
576                                             <field name="validation_minimum_date" string="Between"/>
577                                             <field name="validation_maximum_date" string="and"/>
578                                         </group>
579                                     </group>
580                                     <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')]}">
581                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
582                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
583                                     </group>
584                                 </group>
585                                 <newline/>
586                                 <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')]}">
587                                     <separator string="Required Answer" colspan="4"/>
588                                     <newline/>
589                                 <field name="is_require_answer"/>
590                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
591                                             <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')]}">
592                                                 <field name="required_type"/>
593                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
594                                                     <field name="req_ans" />
595                                                 </group>
596                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
597                                                     <field name="minimum_req_ans"/>
598                                                     <field name="maximum_req_ans"/>
599                                                 </group>
600                                             </group>
601                                             <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)]}">
602                                                 <label string="When the question is not answered, display this error message:"/>
603                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
604                                             </group>
605                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
606                                                 <group colspan="2" >
607                                                     <field name="numeric_required_sum"/>
608                                                 </group>
609                                                 <newline/>
610                                                 <label string="When the choices do not add up correctly, display this error message"/>
611                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
612                                             </group>
613                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
614                                                 <field name="rating_allow_one_column_require"/>
615                                             </group>
616                                                                 </group>
617                                 </group>
618                                 <newline/>
619                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
620                                     <separator string="Descriptive Text" colspan="4"/>
621                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
622                                 </group>
623                         </page>
624                     </notebook>
625                 </form>
626             </field>
627         </record>
628
629         <record model="ir.ui.view" id="survey_question_tree">
630             <field name="name">survey_question_tree</field>
631             <field name="model">survey.question</field>
632             <field name="type">tree</field>
633             <field name="arch" type="xml">
634                 <tree string="Survey Question">
635                                         <field name="sequence" string="Seq"/>
636                     <field name="question" colspan="4" select="1"/>
637                     <field name="page_id" select="1"/>
638                     <field name="survey" select="1"/>
639                     <field name="type" select="2" />
640                 </tree>
641             </field>
642         </record>
643
644         <record model="ir.actions.act_window" id="action_survey_question_form">
645             <field name="name">Survey Questions</field>
646             <field name="res_model">survey.question</field>
647             <field name="view_type">form</field>
648             <field name="view_mode">tree,form</field>
649             <field name="view_id" ref="survey_question_tree"></field>
650         </record>
651
652         <menuitem name="Survey Question" id="menu_survey_question_form1"
653             action="action_survey_question_form" parent='menu_defination'
654             groups="group_survey_manager"/>
655
656
657         <record model="ir.ui.view" id="survey_question_wizard_test">
658             <field name="name">survey_question_wizard_test</field>
659             <field name="model">survey.question</field>
660             <field name="type">form</field>
661             <field name="arch" type="xml">
662                 <form string="Survey Question">
663                     <field name="question" colspan="4" select="1"/>
664                     <field name="sequence"/>
665                     <field name="tot_resp" select="2"/>
666                     <field name="type" on_change="on_change_type(type)"/>
667                     <field name="in_visible_rating_weight" invisible="1"/>
668                     <field name="in_visible_menu_choice" invisible="1"/>
669                     <field name="in_visible_answer_type" invisible="1"/>
670                     <notebook colspan="4">
671                         <page string="Options">
672                                                         <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')]}">
673                                   <separator string="Answer" colspan="4"/>
674                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
675                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
676                                        </group>
677                                        <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')]}">
678                                            <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
679                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
680                                                                            <field name="no_of_rows"/>
681                                                                         </group>
682                                        </group>
683                                 </group>
684                                 <newline/>
685                                                         <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')]}">
686                                     <separator string="Comment Field" colspan="4"/>
687                                     <group colspan="4">
688                                                                         <field name="is_comment_require"/>
689                                                                 </group>
690                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
691                                             <group col="4" colspan="4">
692                                                     <field name="comment_field_type" colspan="1"/>
693                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
694                                                         <field colspan="2" name="comment_label" />
695                                                     </group>
696                                                                         </group>
697                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
698                                                 <field name="comment_valid_type" colspan="2"/>
699                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
700                                                     <field name="comment_minimum_no" string="Between"/>
701                                                     <field name="comment_maximum_no" string="and"/>
702                                                 </group>
703                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
704                                                     <field name="comment_minimum_float" string="Between"/>
705                                                     <field name="comment_maximum_float" string="and"/>
706                                                 </group>
707                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
708                                                     <field name="comment_minimum_date" string="Between"/>
709                                                     <field name="comment_maximum_date" string="and"/>
710                                                 </group>
711                                                 <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')]}">
712                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
713                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
714                                                 </group>
715                                             </group>
716                                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
717                                                     <field name="comment_column"/>
718                                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
719                                                         <field name="column_name" colspan="2"/>
720                                                     </group>
721                                                                         </group>
722                                                                 </group>
723                                 </group>
724                                 <newline/>
725                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
726                                     <separator string="Validation" colspan="4"/>
727                                     <group colspan="4">
728                                                                         <field name="is_validation_require"/>
729                                                                 </group>
730                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
731                                         <field name="validation_type" colspan="2"/>
732                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
733                                             <field name="validation_minimum_no" string="Between"/>
734                                             <field name="validation_maximum_no" string="and"/>
735                                         </group>
736                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
737                                             <field name="validation_minimum_float" string="Between"/>
738                                             <field name="validation_maximum_float" string="and"/>
739                                         </group>
740                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
741                                             <field name="validation_minimum_date" string="Between"/>
742                                             <field name="validation_maximum_date" string="and"/>
743                                         </group>
744                                     </group>
745                                     <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')]}">
746                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
747                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
748                                     </group>
749                                 </group>
750                                 <newline/>
751                                 <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')]}">
752                                     <separator string="Required Answer" colspan="4"/>
753                                     <newline/>
754                                 <field name="is_require_answer"/>
755                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
756                                             <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')]}">
757                                                 <field name="required_type"/>
758                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
759                                                     <field name="req_ans" />
760                                                 </group>
761                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
762                                                     <field name="minimum_req_ans"/>
763                                                     <field name="maximum_req_ans"/>
764                                                 </group>
765                                             </group>
766                                             <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)]}">
767                                                 <label string="When the question is not answered, display this error message:"/>
768                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
769                                             </group>
770                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
771                                                 <group colspan="2" >
772                                                     <field name="numeric_required_sum"/>
773                                                 </group>
774                                                 <newline/>
775                                                 <label string="When the choices do not add up correctly, display this error message"/>
776                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
777                                             </group>
778                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
779                                                 <field name="rating_allow_one_column_require"/>
780                                             </group>
781                                                                 </group>
782                                 </group>
783                                 <newline/>
784                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
785                                     <separator string="Descriptive Text" colspan="4"/>
786                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
787                                 </group>
788                         </page>
789                     </notebook>
790                         <group colspan="4">
791                                 <label string="" colspan="3"/>
792                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-ok"/>
793                                         </group>
794                 </form>
795             </field>
796         </record>
797
798         <!--
799             Survey Answer
800         -->
801
802         <record model ="ir.ui.view" id="survey_answer_form">
803             <field name="name">survey_answer_form</field>
804             <field name="model">survey.answer</field>
805             <field name="type">form</field>
806             <field name="arch" type="xml">
807                 <form string="Survey Answer">
808                     <field name="answer" colspan="4" select="1"/>
809                     <field name="sequence"/>
810                     <field name="in_visible_answer_type" invisible="1"/>
811                         <group colspan="4" attrs="{'invisible':[('in_visible_answer_type','=',True)]}">
812                         <field name="type"/>
813                     </group>
814                 </form>
815             </field>
816         </record>
817
818
819         <record model="ir.ui.view" id= "survey_answer_tree">
820             <field name="name">survey_answer_tree</field>
821             <field name="model">survey.answer</field>
822             <field name="type">tree</field>
823             <field name="arch" type="xml">
824                 <tree editable="top" string="Survey Answer">
825                     <field name="sequence" string="Seq"/>
826                     <field name="answer" select="1"/>
827                 </tree>
828             </field>
829         </record>
830
831         <!--
832             Survey Response Line
833         -->
834
835         <record model ="ir.ui.view" id= "survey_response_line_form">
836             <field name="name">survey_response_line_form</field>
837             <field name="model">survey.response.line</field>
838             <field name="type">form</field>
839             <field name="arch" type="xml">
840                 <form string="Survey Response">
841                         <field name="question_id"/>
842                     <field name="date_create" select="1"/>
843                     <notebook colspan="4">
844                         <page string="Response">
845                             <field name="response_answer_ids" colspan="4" nolabel="1"/>
846                             <group col="5" colspan="4">
847                                 <field name="state"/>
848                                 <button name="response_draft"
849                                     string="Set to draft" states="done,skip" type="object"
850                                     icon="gtk-new"/>
851                                 <button name="response_done" string="Done"
852                                     states="draft" type="object" icon="gtk-go-forward"/>
853                                 <button name="response_skip" string="Skip"
854                                     states="draft" type="object" icon="gtk-close"/>
855                             </group>
856                         </page>
857                         <page string="Single Textboxes">
858                             <field name="single_text" colspan="4"/>
859                         </page>
860                         <page string="Comment">
861                             <separator string="Description" colspan="4"/>
862                             <field name="comment" nolabel="1" colspan="4"/>
863                         </page>
864                         <page string="Table Answer">
865                             <field name="response_table_ids" colspan="4" nolabel="1">
866                             <form string="Table">
867                                 <field name="column_id"/>
868                                 <field name="name"/>
869                                 <field name="value"/>
870                             </form>
871                             <tree string="Table">
872                                 <field name="column_id"/>
873                                 <field name="name"/>
874                                 <field name="value"/>
875                             </tree>
876                             </field>
877                         </page>
878                     </notebook>
879                 </form>
880             </field>
881         </record>
882
883         <record model="ir.ui.view" id="survey_response_line_tree">
884             <field name="name">survey_response_line_tree</field>
885             <field name="model">survey.response.line</field>
886             <field name="type">tree</field>
887             <field name="arch" type="xml">
888                 <tree string="Survey Response Line">
889                         <field name="page_id"/>
890                     <field name="question_id"/>
891                     <field name="date_create" select="1"/>
892                     <field name="state"/>
893                 </tree>
894             </field>
895         </record>
896
897         <!--
898             Survey Response
899         -->
900
901         <record model="ir.ui.view" id="survey_response_form">
902             <field name="name">survey_response_form</field>
903             <field name="model">survey.response</field>
904             <field name="type">form</field>
905             <field name="arch" type="xml">
906                 <form string="Survey Response Answer">
907                                         <field name="survey_id" select="1"/>
908                     <field name="date_create" select="1"/>
909                     <field name="user_id" select="1"/>
910                     <field name="response_type" select="1"/>
911                     <field name="question_ids" nolabel="1" colspan="4" />
912                     <field name="state" select="1"/>
913                 </form>
914             </field>
915         </record>
916
917         <record model="ir.ui.view" id="survey_response_tree">
918             <field name="name">survey_response_tree</field>
919             <field name="model">survey.response</field>
920             <field name="type">tree</field>
921             <field name="arch" type="xml">
922                 <tree string="Survey Response Answer">
923                         <field name="survey_id" select="1"/>
924                     <field name="date_create" select="1"/>
925                     <field name="user_id" select="1"/>
926                     <field name="response_type" select="1"/>
927                     <field name="state" select="1"/>
928                 </tree>
929             </field>
930         </record>
931
932         <!--
933             Survey Response Answer
934         -->
935
936         <record model="ir.ui.view" id="survey_response_answer_form">
937             <field name="name">survey_response_answer_form</field>
938             <field name="model">survey.response.answer</field>
939             <field name="type">form</field>
940             <field name="arch" type="xml">
941                 <form string="Survey Response Answer">
942                     <group colspan="4">
943                         <field name="answer_id"/>
944                         <field name="answer" />
945                     </group>
946                     <field name="value_choice"/>
947                     <label string="(Use Only Question Type is matrix_of_drop_down_menus)" align="0.0"/>
948                     <group colspan="4" col="4">
949                             <field name="comment_field"/>
950                             <field name="column_id"/>
951                         </group>
952                 </form>
953             </field>
954         </record>
955
956         <record model="ir.ui.view" id="survey_response_answer_tree">
957             <field name="name">survey_response_answer_tree</field>
958             <field name="model">survey.response.answer</field>
959             <field name="type">tree</field>
960             <field name="arch" type="xml">
961                 <tree editable="top" string="Survey Response Answer">
962                     <field name="answer_id"/>
963                     <field name="answer" />
964                     <field name="value_choice" />
965                     <field name="column_id"/>
966                     <field name="comment_field"/>
967                 </tree>
968             </field>
969         </record>
970
971         <!--
972             Survey Question Column Heading
973     -->
974
975         <record model="ir.ui.view" id="survey_question_column_heading_form">
976             <field name="name">survey_question_column_heading_form</field>
977             <field name="model">survey.question.column.heading</field>
978             <field name="type">form</field>
979             <field name="arch" type="xml">
980                 <form string="Column Heading">
981                     <field name="title"/>
982                     <field name="in_visible_rating_weight" invisible="1"/>
983                     <field name="in_visible_menu_choice" invisible="1"/>
984                     <group colspan="4" attrs="{'invisible':[('in_visible_rating_weight','!=',False)]}">
985                         <field name="rating_weight"/>
986                         <label align="0.0" string="Use if question type is rating_scale" />
987                     </group>
988                     <group colspan="4" attrs="{'invisible':[('in_visible_menu_choice','!=',False)]}">
989                         <separator string="Menu Choices (each choice on separate lines)" colspan="4"/>
990                         <field name="menu_choice" nolabel="1" colspan="4"/>
991                     </group>
992                 </form>
993             </field>
994         </record>
995
996         <record model="ir.ui.view" id="survey_question_column_heading_tree">
997             <field name="name">survey_question_column_heading_tree</field>
998             <field name="model">survey.question.column.heading</field>
999             <field name="type">tree</field>
1000             <field name="arch" type="xml">
1001                 <tree editable="bottom" string="Column Heading">
1002                     <field name="title"/>
1003                 </tree>
1004             </field>
1005         </record>
1006
1007         <!--
1008             Survey Request
1009         -->
1010
1011         <record model="ir.ui.view" id="survey_request_form">
1012             <field name="name">survey_request_form</field>
1013             <field name="model">survey.request</field>
1014             <field name="type">form</field>
1015             <field name="arch" type="xml">
1016                 <form string="Survey Request">
1017                     <field name="date_deadline"/>
1018                     <field name="survey_id" widget="selection"/>
1019                     <field name="user_id" on_change="on_change_user(user_id)"/>
1020                     <field name="email"/>
1021                                         <field name="answer_ids" nolabel="1" colspan="4"/>
1022                     <group colspan="4" col="5">
1023                         <field name="state"/>
1024                         <button name="survey_req_waiting_answer" string="Set to Watting Answer" states="cancel,done" type="object" icon="gtk-new"/>
1025                         <button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
1026                         <button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>
1027                     </group>
1028                 </form>
1029             </field>
1030         </record>
1031
1032         <record model="ir.ui.view" id="survey_request_tree">
1033             <field name="name">survey_request_tree</field>
1034             <field name="model">survey.request</field>
1035             <field name="type">tree</field>
1036             <field name="arch" type="xml">
1037                 <tree string="Survey Request">
1038                     <field name="date_deadline"/>
1039                     <field name="survey_id" widget="selection"/>
1040                     <field name="email" />
1041                     <field name="state" />
1042                 </tree>
1043             </field>
1044         </record>
1045
1046         <!--
1047             Survey Type
1048         -->
1049
1050         <record model="ir.ui.view" id="survey_type_form">
1051             <field name="name">survey_type_form</field>
1052             <field name="model">survey.type</field>
1053             <field name="type">form</field>
1054             <field name="arch" type="xml">
1055                 <form string="Survey Type">
1056                     <field name="name" select="1"/>
1057                     <field name="code" select="1"/>
1058                 </form>
1059             </field>
1060         </record>
1061
1062         <record model="ir.ui.view" id="survey_type_tree">
1063             <field name="name">survey_type_tree</field>
1064             <field name="model">survey.type</field>
1065             <field name="type">tree</field>
1066             <field name="arch" type="xml">
1067                 <tree string="Survey Type">
1068                     <field name="name" select="1"/>
1069                     <field name="code" select="1"/>
1070                 </tree>
1071             </field>
1072         </record>
1073
1074         <record model="ir.actions.act_window" id="action_survey_type_form">
1075             <field name="name">Survey Type</field>
1076             <field name="res_model">survey.type</field>
1077             <field name="view_type">form</field>
1078             <field name="view_mode">tree,form</field>
1079             <field name="view_id" ref="survey_type_tree"></field>
1080         </record>
1081
1082         <menuitem name="Survey Types" id="menu_survey_type_form1"
1083             action="action_survey_type_form" parent='menu_survey_config'
1084             groups="group_survey_manager"/>
1085
1086         <act_window domain="[('survey_id', '=', active_id)]"
1087             id="act_survey_pages"
1088             name="Survey Pages"
1089             res_model="survey.page"
1090             src_model="survey"/>
1091
1092         <act_window domain="[('survey', '=', active_id)]"
1093             id="act_survey_question"
1094             name="All Questions"
1095             res_model="survey.question"
1096             src_model="survey"/>
1097
1098
1099         <act_window domain="[('page_id', '=', active_id)]"
1100             id="act_survey_page_question"
1101             name="Survey Questions"
1102             res_model="survey.question"
1103             src_model="survey.page"/>
1104
1105         <act_window domain="[('question_id', '=', active_id)]"
1106             id="act_survey_answer"
1107             name="Survey Answers"
1108             res_model="survey.answer"
1109             src_model="survey.question"/>
1110
1111         <act_window domain="[('survey_id', '=', active_id)]"
1112             id="act_survey_response"
1113             name="Survey Response"
1114             res_model="survey.response"
1115             src_model="survey"/>
1116
1117                 <menuitem name="Answer a Survey" id="menu_run_survey_form" sequence="2"
1118                         action="action_view_survey_name" parent="main_menu_survey"
1119                         groups="group_survey_manager,group_survey_user" icon="STOCK_INDEX"/>
1120
1121                 <menuitem action="wizard_browse_answer" id="menu_wizard_browse_answer"
1122                         parent="main_menu_survey" type="wizard"/>
1123
1124     </data>
1125 </openerp>