[IMP] survey, hr_evalution, hr_recruitment: improvement
[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" sequence="15"/>
7                         <menuitem name="Define Surveys" id="menu_define_survey"
8                                  groups="group_survey_manager"
9                                  parent="base.menu_tools" />
10                         <menuitem id="menu_answer_surveys" name="Answer Surveys" parent="base.menu_tools" groups="group_survey_manager,group_survey_user"/>
11 <!--        <menuitem name="Configuration" id="menu_survey_config" parent="main_menu_survey" groups="group_survey_manager"/>-->
12                         <menuitem name="Reporting" parent="base.menu_tools"
13                                 id="menu_reporting" groups="group_survey_manager"/>
14         <!--
15             Survey
16         -->
17         <record model="ir.ui.view" id="survey_form">
18             <field name="name">survey_form</field>
19             <field name="model">survey</field>
20             <field name="type">form</field>
21             <field name="arch" type="xml">
22                 <form string="Survey">
23                         <field name="title" select="1"/>
24                         <group col="6" colspan="6">
25                             <field name="responsible_id"/>
26                                 <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
27                                 string="Test Survey" type="action" icon="gtk-new"
28                                 context="{'active':True,'survey_id': active_id}"/>
29                                                 <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
30                                 string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
31                                                 <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
32                                 string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
33                                         </group>
34                     <notebook colspan="4">
35                         <page string="Survey">
36                             <field name="page_ids" colspan="4" nolabel="1" mode="form,tree" context="{'line_order': page_ids}">
37                                 <form string="Survey Page">
38                                     <field name="title" select="1"/>
39                                     <field name="sequence"/>
40                                     <field name="note" colspan="4" nolabel="1"/>
41                                     <field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
42                                         <form string="Survey Question">
43                                             <field name="question" colspan="4" select="1"/>
44                                             <field name="sequence"/>
45                                             <field name="tot_resp" select="2"/>
46                                             <field name="type" on_change="on_change_type(type)"/>
47                                                                     <field name="in_visible_rating_weight" invisible="1"/>
48                                                                     <field name="in_visible_menu_choice" invisible="1"/>
49                                                                     <field name="in_visible_answer_type" invisible="1"/>
50                                                                     <notebook colspan="4">
51                                                                         <page string="Options">
52                                                                                                         <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')]}">
53                                                                                   <separator string="Answer" colspan="4"/>
54                                                                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
55                                                                                            <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}"/>
56                                                                                        </group>
57                                                                                        <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')]}">
58                                                                                            <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}"/>
59                                                                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
60                                                                                                                            <field name="no_of_rows"/>
61                                                                                                                         </group>
62                                                                                        </group>
63                                                                                 </group>
64                                                                                 <newline/>
65                                                                                                         <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')]}">
66                                                                                     <separator string="Comment Field" colspan="4"/>
67                                                                                     <group colspan="4">
68                                                                                                                         <field name="is_comment_require"/>
69                                                                                                                 </group>
70                                                                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
71                                                                                             <group col="4" colspan="4">
72                                                                                                     <field name="comment_field_type" colspan="1"/>
73                                                                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
74                                                                                                         <field colspan="2" name="comment_label" />
75                                                                                                     </group>
76                                                                                                                         </group>
77                                                                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
78                                                                                                 <field name="comment_valid_type" colspan="2"/>
79                                                                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
80                                                                                                     <field name="comment_minimum_no" string="Between"/>
81                                                                                                     <field name="comment_maximum_no" string="and"/>
82                                                                                                 </group>
83                                                                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
84                                                                                                     <field name="comment_minimum_float" string="Between"/>
85                                                                                                     <field name="comment_maximum_float" string="and"/>
86                                                                                                 </group>
87                                                                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
88                                                                                                     <field name="comment_minimum_date" string="Between"/>
89                                                                                                     <field name="comment_maximum_date" string="and"/>
90                                                                                                 </group>
91                                                                                                 <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')]}">
92                                                                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
93                                                                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
94                                                                                                 </group>
95                                                                                             </group>
96                                                                                                                 </group>
97                                                                                 </group>
98                                                                                                         <newline/>
99                                                                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
100                                                                                     <field name="comment_column"/>
101                                                                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
102                                                                                         <field name="column_name" colspan="2"/>
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="date"/>
213                                     <field name="user_id"/>
214                                 </tree>
215                                 <form string="History">
216                                     <field name="date"/>
217                                     <field name="user_id"/>
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_question_message)d" states="open,draft,close,cancel"
240                         string="Test Survey" type="action" icon="gtk-new"
241                         context="{'active':True,'survey_id': active_id}"/>
242                                         <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
243                         string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
244                                         <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
245                         string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
246                                         <button name="action_print_survey" states="open,draft,close,cancel"
247                                         string="Print Answer" type="object" icon="gtk-print"/>
248                 </tree>
249             </field>
250         </record>
251
252        <record id="survey_search" model="ir.ui.view">
253             <field name="name">survey_search</field>
254             <field name="model">survey</field>
255             <field name="type">search</field>
256             <field name="arch" type="xml">
257                 <search string="Search Survey">
258                    <group col='10' colspan='4'>
259                         <filter icon="terp-crm" string="Draft" domain="[('state','=','draft')]"/>
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" widget="selection"/>
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_define_survey"
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>
357                                         </group>
358                                         <newline/>
359                                     <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
360                                             <field name="comment_column"/>
361                                             <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
362                                                 <field name="column_name" colspan="2"/>
363                                             </group>
364                                                                 </group>
365                                         <newline/>
366                                         <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
367                                             <separator string="Validation" colspan="4"/>
368                                             <group colspan="4">
369                                                                                 <field name="is_validation_require"/>
370                                                                         </group>
371                                             <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
372                                                 <field name="validation_type" colspan="2"/>
373                                                 <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
374                                                     <field name="validation_minimum_no" string="Between"/>
375                                                     <field name="validation_maximum_no" string="and"/>
376                                                 </group>
377                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
378                                                     <field name="validation_minimum_float" string="Between"/>
379                                                     <field name="validation_maximum_float" string="and"/>
380                                                 </group>
381                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
382                                                     <field name="validation_minimum_date" string="Between"/>
383                                                     <field name="validation_maximum_date" string="and"/>
384                                                 </group>
385                                             </group>
386                                             <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')]}">
387                                                 <label string="When the comment is an invalid format, display this error message" colspan="4"/>
388                                                 <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
389                                             </group>
390                                         </group>
391                                         <newline/>
392                                         <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')]}">
393                                             <separator string="Required Answer" colspan="4"/>
394                                             <newline/>
395                                         <field name="is_require_answer"/>
396                                                                         <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
397                                                     <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')]}">
398                                                         <field name="required_type"/>
399                                                         <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
400                                                             <field name="req_ans" />
401                                                         </group>
402                                                         <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
403                                                             <field name="minimum_req_ans"/>
404                                                             <field name="maximum_req_ans"/>
405                                                         </group>
406                                                     </group>
407                                                     <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)]}">
408                                                         <label string="When the question is not answered, display this error message:"/>
409                                                         <field name="req_error_msg" colspan="4" nolabel="1"/>
410                                                     </group>
411                                                     <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
412                                                         <group colspan="2" >
413                                                             <field name="numeric_required_sum"/>
414                                                         </group>
415                                                         <newline/>
416                                                         <label string="When the choices do not add up correctly, display this error message"/>
417                                                         <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
418                                                     </group>
419                                                     <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
420                                                         <field name="rating_allow_one_column_require"/>
421                                                     </group>
422                                                                         </group>
423                                         </group>
424                                         <newline/>
425                                         <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
426                                             <separator string="Descriptive Text" colspan="4"/>
427                                             <field name="descriptive_text" colspan="4" nolabel="1"/>
428                                         </group>
429                                 </page>
430                             </notebook>
431
432                     </form>
433                     <tree string="Survey Question">
434                         <field name="sequence" string="Seq"/>
435                         <field name="question" colspan="4" select="1"/>
436                         <field name="answer_choice_ids"/>
437                     </tree>
438                     </field>
439                 </form>
440             </field>
441         </record>
442
443
444         <record model="ir.ui.view" id="survey_page_tree">
445             <field name="name">survey_page_tree</field>
446             <field name="model">survey.page</field>
447             <field name="type">tree</field>
448             <field name="arch" type="xml">
449                 <tree string="Survey Page">
450                     <field name="sequence" string="Seq"/>
451                     <field name="title"/>
452                     <field name="survey_id"/>
453                     <field name="question_ids" string="#Questions"/>
454                 </tree>
455             </field>
456         </record>
457
458         <record model="ir.actions.act_window" id="action_survey_page_form">
459             <field name="name">Survey Pages</field>
460             <field name="res_model">survey.page</field>
461             <field name="view_type">form</field>
462             <field name="view_mode">tree,form</field>
463             <field name="view_id" ref="survey_page_tree"></field>
464         </record>
465
466         <menuitem name="Pages" id="menu_survey_page_form1"
467             action="action_survey_page_form" parent='menu_define_survey'
468             groups="group_survey_manager"/>
469
470         <record model="ir.ui.view" id="survey_page_wizard_test1">
471             <field name="name">survey_page_wizard_test</field>
472             <field name="model">survey.page</field>
473             <field name="type">form</field>
474             <field name="arch" type="xml">
475                 <form string="Survey Pages">
476                     <field name="title" colspan="4" select="1"/>
477                     <field name="sequence"/>
478                     <separator string="Description" colspan="4"/>
479                     <field name="note" colspan="4" nolabel="1"/>
480                         <group colspan="4">
481                                 <label string="" colspan="3"/>
482                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-go-back"/>
483                                         </group>
484                                 </form>
485                         </field>
486                 </record>
487
488         <!--
489             Survey Question
490         -->
491
492         <record model="ir.ui.view" id="survey_question_form">
493             <field name="name">survey_question_form</field>
494             <field name="model">survey.question</field>
495             <field name="type">form</field>
496             <field name="arch" type="xml">
497                 <form string="Survey Question">
498                     <field name="question" colspan="4"/>
499                     <field name="page_id"/>
500                     <field name="sequence"/>
501                     <field name="tot_resp"/>
502                     <field name="type" on_change="on_change_type(type)"/>
503                     <field name="in_visible_rating_weight" invisible="1"/>
504                     <field name="in_visible_menu_choice" invisible="1"/>
505                     <field name="in_visible_answer_type" invisible="1"/>
506                     <notebook colspan="4">
507                         <page string="Options">
508                                                         <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')]}">
509                                   <separator string="Answer" colspan="4"/>
510                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
511                                            <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}"/>
512                                        </group>
513                                        <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')]}">
514                                            <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}"/>
515                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
516                                                                            <field name="no_of_rows"/>
517                                                                         </group>
518                                        </group>
519                                 </group>
520                                 <newline/>
521                                                         <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')]}">
522                                     <separator string="Comment Field" colspan="4"/>
523                                     <group colspan="4">
524                                                                         <field name="is_comment_require"/>
525                                                                 </group>
526                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
527                                             <group col="4" colspan="4">
528                                                     <field name="comment_field_type" colspan="1"/>
529                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
530                                                         <field colspan="2" name="comment_label" />
531                                                     </group>
532                                                                         </group>
533                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
534                                                 <field name="comment_valid_type" colspan="2"/>
535                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
536                                                     <field name="comment_minimum_no" string="Between"/>
537                                                     <field name="comment_maximum_no" string="and"/>
538                                                 </group>
539                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
540                                                     <field name="comment_minimum_float" string="Between"/>
541                                                     <field name="comment_maximum_float" string="and"/>
542                                                 </group>
543                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
544                                                     <field name="comment_minimum_date" string="Between"/>
545                                                     <field name="comment_maximum_date" string="and"/>
546                                                 </group>
547                                                 <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')]}">
548                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
549                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
550                                                 </group>
551                                             </group>
552                                                                 </group>
553                                 </group>
554                                 <newline/>
555                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
556                                     <field name="comment_column"/>
557                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
558                                         <field name="column_name" colspan="2"/>
559                                     </group>
560                                                         </group>
561                                 <newline/>
562                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
563                                     <separator string="Validation" colspan="4"/>
564                                     <group colspan="4">
565                                                                         <field name="is_validation_require"/>
566                                                                 </group>
567                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
568                                         <field name="validation_type" colspan="2"/>
569                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
570                                             <field name="validation_minimum_no" string="Between"/>
571                                             <field name="validation_maximum_no" string="and"/>
572                                         </group>
573                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
574                                             <field name="validation_minimum_float" string="Between"/>
575                                             <field name="validation_maximum_float" string="and"/>
576                                         </group>
577                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
578                                             <field name="validation_minimum_date" string="Between"/>
579                                             <field name="validation_maximum_date" string="and"/>
580                                         </group>
581                                     </group>
582                                     <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')]}">
583                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
584                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
585                                     </group>
586                                 </group>
587                                 <newline/>
588                                 <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')]}">
589                                     <separator string="Required Answer" colspan="4"/>
590                                     <newline/>
591                                 <field name="is_require_answer"/>
592                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
593                                             <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')]}">
594                                                 <field name="required_type"/>
595                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
596                                                     <field name="req_ans" />
597                                                 </group>
598                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
599                                                     <field name="minimum_req_ans"/>
600                                                     <field name="maximum_req_ans"/>
601                                                 </group>
602                                             </group>
603                                             <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)]}">
604                                                 <label string="When the question is not answered, display this error message:"/>
605                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
606                                             </group>
607                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
608                                                 <group colspan="2" >
609                                                     <field name="numeric_required_sum"/>
610                                                 </group>
611                                                 <newline/>
612                                                 <label string="When the choices do not add up correctly, display this error message"/>
613                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
614                                             </group>
615                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
616                                                 <field name="rating_allow_one_column_require"/>
617                                             </group>
618                                                                 </group>
619                                 </group>
620                                 <newline/>
621                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
622                                     <separator string="Descriptive Text" colspan="4"/>
623                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
624                                 </group>
625                         </page>
626                     </notebook>
627                 </form>
628             </field>
629         </record>
630
631         <record model="ir.ui.view" id="survey_question_tree">
632             <field name="name">survey_question_tree</field>
633             <field name="model">survey.question</field>
634             <field name="type">tree</field>
635             <field name="arch" type="xml">
636                 <tree string="Survey Question">
637                                         <field name="sequence" string="Seq"/>
638                     <field name="question"/>
639                     <field name="page_id"/>
640                     <field name="survey"/>
641                     <field name="type"/>
642                 </tree>
643             </field>
644         </record>
645
646        <record id="survey_question_search" model="ir.ui.view">
647             <field name="name">survey_question_search</field>
648             <field name="model">survey.question</field>
649             <field name="type">search</field>
650             <field name="arch" type="xml">
651                 <search string="Search Question">
652                     <field name="question"/>
653                     <field name="page_id"/>
654                     <field name="survey" widget="selection"/>
655                     <field name="type"/>
656                </search>
657             </field>
658         </record>
659
660         <record model="ir.actions.act_window" id="action_survey_question_form">
661             <field name="name">Survey Questions</field>
662             <field name="res_model">survey.question</field>
663             <field name="view_type">form</field>
664             <field name="view_mode">tree,form</field>
665             <field name="view_id" ref="survey_question_tree"></field>
666              <field name="search_view_id" ref="survey_question_search"/>
667         </record>
668
669         <!--menuitem name="Survey Question" id="menu_survey_question_form1"
670             action="action_survey_question_form" parent='menu_defination'
671             groups="group_survey_manager"/-->
672
673         <record model="ir.ui.view" id="survey_question_wizard_test">
674             <field name="name">survey_question_wizard_test</field>
675             <field name="model">survey.question</field>
676             <field name="type">form</field>
677             <field name="arch" type="xml">
678                 <form string="Survey Question">
679                     <field name="question" colspan="4"/>
680                     <field name="sequence"/>
681                     <field name="tot_resp"/>
682                     <field name="type" on_change="on_change_type(type)"/>
683                     <field name="in_visible_rating_weight" invisible="1"/>
684                     <field name="in_visible_menu_choice" invisible="1"/>
685                     <field name="in_visible_answer_type" invisible="1"/>
686                     <notebook colspan="4">
687                         <page string="Options">
688                                                         <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')]}">
689                                   <separator string="Answer" colspan="4"/>
690                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
691                                            <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}"/>
692                                        </group>
693                                        <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')]}">
694                                            <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}"/>
695                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
696                                                                            <field name="no_of_rows"/>
697                                                                         </group>
698                                        </group>
699                                 </group>
700                                 <newline/>
701                                                         <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')]}">
702                                     <separator string="Comment Field" colspan="4"/>
703                                     <group colspan="4">
704                                                                         <field name="is_comment_require"/>
705                                                                 </group>
706                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
707                                             <group col="4" colspan="4">
708                                                     <field name="comment_field_type" colspan="1"/>
709                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
710                                                         <field colspan="2" name="comment_label" />
711                                                     </group>
712                                                                         </group>
713                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
714                                                 <field name="comment_valid_type" colspan="2"/>
715                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
716                                                     <field name="comment_minimum_no" string="Between"/>
717                                                     <field name="comment_maximum_no" string="and"/>
718                                                 </group>
719                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
720                                                     <field name="comment_minimum_float" string="Between"/>
721                                                     <field name="comment_maximum_float" string="and"/>
722                                                 </group>
723                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
724                                                     <field name="comment_minimum_date" string="Between"/>
725                                                     <field name="comment_maximum_date" string="and"/>
726                                                 </group>
727                                                 <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')]}">
728                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
729                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
730                                                 </group>
731                                             </group>
732                                                                 </group>
733                                 </group>
734                                 <newline/>
735                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
736                                     <field name="comment_column"/>
737                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
738                                         <field name="column_name" colspan="2"/>
739                                     </group>
740                                                         </group>
741                                 <newline/>
742                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
743                                     <separator string="Validation" colspan="4"/>
744                                     <group colspan="4">
745                                                                         <field name="is_validation_require"/>
746                                                                 </group>
747                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
748                                         <field name="validation_type" colspan="2"/>
749                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
750                                             <field name="validation_minimum_no" string="Between"/>
751                                             <field name="validation_maximum_no" string="and"/>
752                                         </group>
753                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
754                                             <field name="validation_minimum_float" string="Between"/>
755                                             <field name="validation_maximum_float" string="and"/>
756                                         </group>
757                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
758                                             <field name="validation_minimum_date" string="Between"/>
759                                             <field name="validation_maximum_date" string="and"/>
760                                         </group>
761                                     </group>
762                                     <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')]}">
763                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
764                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
765                                     </group>
766                                 </group>
767                                 <newline/>
768                                 <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')]}">
769                                     <separator string="Required Answer" colspan="4"/>
770                                     <newline/>
771                                 <field name="is_require_answer"/>
772                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
773                                             <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')]}">
774                                                 <field name="required_type"/>
775                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
776                                                     <field name="req_ans" />
777                                                 </group>
778                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
779                                                     <field name="minimum_req_ans"/>
780                                                     <field name="maximum_req_ans"/>
781                                                 </group>
782                                             </group>
783                                             <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)]}">
784                                                 <label string="When the question is not answered, display this error message:"/>
785                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
786                                             </group>
787                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
788                                                 <group colspan="2" >
789                                                     <field name="numeric_required_sum"/>
790                                                 </group>
791                                                 <newline/>
792                                                 <label string="When the choices do not add up correctly, display this error message"/>
793                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
794                                             </group>
795                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
796                                                 <field name="rating_allow_one_column_require"/>
797                                             </group>
798                                                                 </group>
799                                 </group>
800                                 <newline/>
801                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
802                                     <separator string="Descriptive Text" colspan="4"/>
803                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
804                                 </group>
805                         </page>
806                     </notebook>
807                         <group colspan="4">
808                                 <label string="" colspan="3"/>
809                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-ok"/>
810                                         </group>
811                 </form>
812             </field>
813         </record>
814
815         <!--
816             Survey Answer
817         -->
818
819         <record model ="ir.ui.view" id="survey_answer_form">
820             <field name="name">survey_answer_form</field>
821             <field name="model">survey.answer</field>
822             <field name="type">form</field>
823             <field name="arch" type="xml">
824                 <form string="Survey Answer">
825                     <field name="answer" colspan="4" select="1"/>
826                     <field name="sequence"/>
827                     <field name="in_visible_answer_type" invisible="1"/>
828                         <group colspan="4" attrs="{'invisible':[('in_visible_answer_type','=',True)]}">
829                         <field name="type" colspan="2"/>
830                         <group colspan="4" attrs="{'invisible':[('type','!=','selection')]}">
831                                 <separator string="Menu Choices (each choice on separate by lines)" colspan="4"/>
832                                 <field name="menu_choice" colspan="4" nolabel="1"/>
833                         </group>
834                     </group>
835                 </form>
836             </field>
837         </record>
838
839
840         <record model="ir.ui.view" id= "survey_answer_tree">
841             <field name="name">survey_answer_tree</field>
842             <field name="model">survey.answer</field>
843             <field name="type">tree</field>
844             <field name="arch" type="xml">
845                 <tree editable="top" string="Survey Answer">
846                     <field name="sequence" string="Seq"/>
847                     <field name="answer" select="1"/>
848                 </tree>
849             </field>
850         </record>
851
852         <!--
853             Survey Response Line
854         -->
855
856         <record model ="ir.ui.view" id= "survey_response_line_form">
857             <field name="name">survey_response_line_form</field>
858             <field name="model">survey.response.line</field>
859             <field name="type">form</field>
860             <field name="arch" type="xml">
861                 <form string="Survey Answer">
862                         <field name="question_id"/>
863                     <field name="date_create" select="1"/>
864                     <notebook colspan="4">
865                         <page string="Answer">
866                             <field name="response_answer_ids" colspan="4" nolabel="1"/>
867                             <group col="5" colspan="4">
868                                 <field name="state"/>
869                             </group>
870                         </page>
871                         <page string="Single Textboxes">
872                             <field name="single_text" colspan="4"/>
873                         </page>
874                         <page string="Comment">
875                             <separator string="Description" colspan="4"/>
876                             <field name="comment" nolabel="1" colspan="4"/>
877                         </page>
878                         <page string="Table Answer">
879                             <field name="response_table_ids" colspan="4" nolabel="1">
880                             <form string="Table">
881                                 <field name="column_id"/>
882                                 <field name="name"/>
883                                 <field name="value"/>
884                             </form>
885                             <tree string="Table">
886                                 <field name="column_id"/>
887                                 <field name="name"/>
888                                 <field name="value"/>
889                             </tree>
890                             </field>
891                         </page>
892                     </notebook>
893                 </form>
894             </field>
895         </record>
896
897         <record model="ir.ui.view" id="survey_response_line_tree">
898             <field name="name">survey_response_line_tree</field>
899             <field name="model">survey.response.line</field>
900             <field name="type">tree</field>
901             <field name="arch" type="xml">
902                 <tree string="Survey Answer Line">
903                         <field name="page_id"/>
904                     <field name="question_id"/>
905                     <field name="date_create" select="1"/>
906                     <field name="state"/>
907                 </tree>
908             </field>
909         </record>
910
911         <!--
912             Survey Response
913         -->
914
915         <record model="ir.ui.view" id="survey_response_form">
916             <field name="name">survey_response_form</field>
917             <field name="model">survey.response</field>
918             <field name="type">form</field>
919             <field name="arch" type="xml">
920                 <form string="Survey Answer">
921                                         <field name="survey_id" select="1"/>
922                     <field name="date_create" select="1"/>
923                     <field name="user_id" select="1"/>
924                     <field name="response_type" select="1"/>
925                     <field name="question_ids" nolabel="1" colspan="4" />
926                     <field name="state" select="1"/>
927                 </form>
928             </field>
929         </record>
930
931         <record model="ir.ui.view" id="survey_response_tree">
932             <field name="name">survey_response_tree</field>
933             <field name="model">survey.response</field>
934             <field name="type">tree</field>
935             <field name="arch" type="xml">
936                 <tree string="Survey Answer">
937                         <field name="survey_id" select="1"/>
938                     <field name="date_create" select="1"/>
939                     <field name="user_id" select="1"/>
940                     <field name="response_type" select="1"/>
941                     <field name="state" select="1"/>
942                 </tree>
943             </field>
944         </record>
945
946         <!--
947             Survey Response Answer
948         -->
949
950         <record model="ir.ui.view" id="survey_response_answer_form">
951             <field name="name">survey_response_answer_form</field>
952             <field name="model">survey.response.answer</field>
953             <field name="type">form</field>
954             <field name="arch" type="xml">
955                 <form string="Survey Answer">
956                     <group colspan="4">
957                         <field name="answer_id"/>
958                         <field name="answer" />
959                     </group>
960                     <field name="value_choice"/>
961                     <label string="(Use Only Question Type is matrix_of_drop_down_menus)" align="0.0"/>
962                     <group colspan="4" col="4">
963                             <field name="comment_field"/>
964                             <field name="column_id"/>
965                         </group>
966                 </form>
967             </field>
968         </record>
969
970         <record model="ir.ui.view" id="survey_response_answer_tree">
971             <field name="name">survey_response_answer_tree</field>
972             <field name="model">survey.response.answer</field>
973             <field name="type">tree</field>
974             <field name="arch" type="xml">
975                 <tree editable="top" string="Survey Answer">
976                     <field name="answer_id"/>
977                     <field name="answer" />
978                     <field name="value_choice" />
979                     <field name="column_id"/>
980                     <field name="comment_field"/>
981                 </tree>
982             </field>
983         </record>
984
985         <!--
986             Survey Question Column Heading
987     -->
988
989         <record model="ir.ui.view" id="survey_question_column_heading_form">
990             <field name="name">survey_question_column_heading_form</field>
991             <field name="model">survey.question.column.heading</field>
992             <field name="type">form</field>
993             <field name="arch" type="xml">
994                 <form string="Column Heading">
995                     <field name="title"/>
996                     <field name="in_visible_rating_weight" invisible="1"/>
997                     <field name="in_visible_menu_choice" invisible="1"/>
998                     <group colspan="4" attrs="{'invisible':[('in_visible_rating_weight','!=',False)]}">
999                         <field name="rating_weight"/>
1000                         <label align="0.0" string="Use if question type is rating_scale" />
1001                     </group>
1002                     <group colspan="4" attrs="{'invisible':[('in_visible_menu_choice','!=',False)]}">
1003                         <separator string="Menu Choices (each choice on separate lines)" colspan="4"/>
1004                         <field name="menu_choice" nolabel="1" colspan="4"/>
1005                     </group>
1006                 </form>
1007             </field>
1008         </record>
1009
1010         <record model="ir.ui.view" id="survey_question_column_heading_tree">
1011             <field name="name">survey_question_column_heading_tree</field>
1012             <field name="model">survey.question.column.heading</field>
1013             <field name="type">tree</field>
1014             <field name="arch" type="xml">
1015                 <tree editable="bottom" string="Column Heading">
1016                     <field name="title"/>
1017                 </tree>
1018             </field>
1019         </record>
1020
1021         <!--
1022             Survey Request
1023         -->
1024
1025         <record model="ir.ui.view" id="survey_request_form">
1026             <field name="name">survey_request_form</field>
1027             <field name="model">survey.request</field>
1028             <field name="type">form</field>
1029             <field name="arch" type="xml">
1030                                 <form string="Survey Request">
1031                     <field name="date_deadline"/>
1032                     <field name="survey_id"/>
1033                     <field name="user_id" on_change="on_change_user(user_id)"/>
1034 <!--                    <field name="email"/>-->
1035                                 <field name="response" readonly="1"/>
1036                     <group colspan="4" col="6">
1037                      <field name="state"/>
1038                         <button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object" icon="gtk-new"/>
1039                         <button name="survey_req_waiting_answer" string="Watting Answer" states="draft" type="object" icon="gtk-new"/>
1040                         <button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
1041                         <button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>
1042                     </group>
1043                 </form>
1044             </field>
1045         </record>
1046
1047         <record model="ir.ui.view" id="survey_request_tree">
1048             <field name="name">survey_request_tree</field>
1049             <field name="model">survey.request</field>
1050             <field name="type">tree</field>
1051             <field name="arch" type="xml">
1052                 <tree string="Evaluation Plan Phase">
1053                     <field name="date_deadline"/>
1054                                         <field name="user_id"/>
1055                     <field name="survey_id"/>
1056                     <field name="response" />
1057                     <field name="state" />
1058                 </tree>
1059             </field>
1060         </record>
1061
1062        <record id="survey_request_search" model="ir.ui.view">
1063             <field name="name">survey_request_search</field>
1064             <field name="model">survey.request</field>
1065             <field name="type">search</field>
1066             <field name="arch" type="xml">
1067                 <search string="Search Survey">
1068                    <group col='10' colspan='4'>
1069                         <filter icon="terp-crm" string="Unanswered" domain="[('state','=','waiting_answer')]"/>
1070                         <filter icon="terp-stock" string="Late" domain="[('date_deadline','&lt;',current_date)]"/>
1071                         <separator orientation="vertical"/>
1072                         <field name="survey_id" widget="selection" select="1"/>
1073                         <field name="email" select="1"/>
1074                         <field name="user_id" select="1" widget="selection" >
1075                         <filter string="MY" icon="terp-partner" domain="[('user_id','=',uid)]"/>
1076                         </field>
1077                    </group>
1078                </search>
1079             </field>
1080         </record>
1081
1082         <record model="ir.actions.act_window" id="action_survey_request_tree">
1083             <field name="name">Survey Request</field>
1084             <field name="res_model">survey.request</field>
1085             <field name="view_type">form</field>
1086             <field name="view_mode">tree,form</field>
1087             <field name="view_id" ref="survey_request_tree"></field>
1088             <field name="search_view_id" ref="survey_request_search"/>
1089         </record>
1090
1091         <menuitem name="Survey Requests" id="menu_survey_type_form1"
1092             action="action_survey_request_tree" parent='menu_answer_surveys'
1093             groups="group_survey_manager"/>
1094
1095         <!--
1096             Survey Type
1097         -->
1098
1099         <record model="ir.ui.view" id="survey_type_form">
1100             <field name="name">survey_type_form</field>
1101             <field name="model">survey.type</field>
1102             <field name="type">form</field>
1103             <field name="arch" type="xml">
1104                 <form string="Survey Type">
1105                     <field name="name" select="1"/>
1106                     <field name="code" select="1"/>
1107                 </form>
1108             </field>
1109         </record>
1110
1111         <record model="ir.ui.view" id="survey_type_tree">
1112             <field name="name">survey_type_tree</field>
1113             <field name="model">survey.type</field>
1114             <field name="type">tree</field>
1115             <field name="arch" type="xml">
1116                 <tree string="Survey Type">
1117                     <field name="name" select="1"/>
1118                     <field name="code" select="1"/>
1119                 </tree>
1120             </field>
1121         </record>
1122
1123         <record model="ir.actions.act_window" id="action_survey_type_form">
1124             <field name="name">Survey Type</field>
1125             <field name="res_model">survey.type</field>
1126             <field name="view_type">form</field>
1127             <field name="view_mode">tree,form</field>
1128             <field name="view_id" ref="survey_type_tree"></field>
1129         </record>
1130
1131         <!--menuitem name="Survey Types" id="menu_survey_type_form1"
1132             action="action_survey_type_form" parent='menu_survey_config'
1133             groups="group_survey_manager"/-->
1134
1135         <act_window domain="[('survey_id', '=', active_id)]"
1136             id="act_survey_pages"
1137             name="Survey Pages"
1138             res_model="survey.page"
1139             src_model="survey"/>
1140
1141         <act_window domain="[('survey', '=', active_id)]"
1142             id="act_survey_question"
1143             name="All Questions"
1144             res_model="survey.question"
1145             src_model="survey"/>
1146
1147
1148         <act_window domain="[('page_id', '=', active_id)]"
1149             id="act_survey_page_question"
1150             name="Survey Questions"
1151             res_model="survey.question"
1152             src_model="survey.page"/>
1153
1154         <act_window domain="[('question_id', '=', active_id)]"
1155             id="act_survey_answer"
1156             name="Survey Answers"
1157             res_model="survey.answer"
1158             src_model="survey.question"/>
1159
1160         <act_window domain="[('survey_id', '=', active_id)]"
1161             id="act_survey_response"
1162             name="Survey Answer"
1163             res_model="survey.response"
1164             src_model="survey"/>
1165
1166                 <menuitem name="Answer a Survey" id="menu_run_survey_form" sequence="2"
1167                         action="action_view_survey_name" parent="menu_answer_surveys"
1168                         groups="group_survey_manager,group_survey_user" icon="STOCK_INDEX"/>
1169
1170     </data>
1171 </openerp>