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