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