[MERGE] Merge with main branch
[odoo/odoo.git] / addons / hr_evaluation / hr_evaluation_view.xml
1 <?xml version="1.0" ?>
2 <openerp>
3     <data>
4         <record model="ir.ui.view" id="view_hr_evaluation_plan_form">
5             <field name="name">hr_evaluation.plan.form</field>
6             <field name="model">hr_evaluation.plan</field>
7             <field name="type">form</field>
8             <field name="arch" type="xml">
9                 <form string="Evaluation Plan">
10                     <group col="6" colspan="4">
11                         <field name="name" select="1"/>
12                         <field name="company_id" select="1" widget="selection"/>
13                         <field name="active"/>
14                         <field name="month_first"/>
15                         <field name="month_next"/>
16                         <label string="(months)" align="0.0"/>
17                     </group>
18                      <notebook colspan="4">
19                          <page string="Evaluation Phases">
20                             <field name="phase_ids" nolabel="1" colspan="4"/>
21                          </page>
22                      </notebook>
23                 </form>
24             </field>
25         </record>
26         <record model="ir.ui.view" id="view_hr_evaluation_plan_tree">
27             <field name="name">hr_evaluation.plan.form</field>
28             <field name="model">hr_evaluation.plan</field>
29             <field name="type">tree</field>
30             <field name="arch" type="xml">
31                 <tree string="Evaluation Plan">
32                     <field name="name"/>
33                     <field name="month_first"/>
34                     <field name="month_next"/>
35                     <field name="company_id"/>
36                 </tree>
37             </field>
38         </record>
39         <record model="ir.actions.act_window" id="open_view_hr_evaluation_plan_tree">
40             <field name="name">Evaluation Plans</field>
41             <field name="res_model">hr_evaluation.plan</field>
42             <field name="view_type">form</field>
43             <field name="view_mode">tree,form</field>
44         </record>
45         <menuitem name="Evaluations" parent="hr.menu_hr_root" id="menu_eval_hr" sequence="3"/>
46
47        <menuitem
48             name="Periodic Evaluations" parent="hr.menu_hr_configuration" id="menu_eval_hr_config" sequence="3"/>
49         <menuitem
50             parent="menu_eval_hr_config"
51             id="menu_open_view_hr_evaluation_plan_tree"
52             action="open_view_hr_evaluation_plan_tree"/>
53
54         <record model="ir.ui.view" id="view_hr_evaluation_plan_phase_form">
55             <field name="name">hr_evaluation.plan.phase.form</field>
56             <field name="model">hr_evaluation.plan.phase</field>
57             <field name="type">form</field>
58             <field name="arch" type="xml">
59                 <form string="Evaluation Plan Phase">
60                  <notebook>
61                    <page string="General">
62                     <field name="plan_id" invisible="1"/>
63                     <group col="6" colspan="4">
64                         <field name="name"/>
65                         <field name="wait"/>
66                         <field name="sequence"/>
67                     </group>
68                     <group col="4" colspan="4">
69                         <separator string="Action to Perform" colspan="4"/>
70                         <field name="action"/>
71                         <field name="survey_id"/>
72                     </group>
73                     <group col="4" colspan="4">
74                         <group col="4" colspan="2">
75                             <separator string="Send to Managers" colspan="2"/>
76                             <newline/>
77                             <field name="send_answer_manager"/>
78                             <newline/>
79                             <field name="send_anonymous_manager"/>
80                         </group>
81                         <group col="4" colspan="2">
82                             <separator string="Send to Employees" colspan="2"/>
83                             <newline/>
84                             <field name="send_answer_employee"/>
85                             <newline/>
86                             <field name="send_anonymous_employee"/>
87                         </group>
88                     </group>
89                     </page>
90                     <page string="Mail Settings">
91                         <field name="mail_feature" colspan="4"/>
92                         <newline/>
93                         <separator string="Mail Body"/>
94                         <newline/>
95                         <field name="mail_body" colspan="4" nolabel="1"/>
96                         <newline/>
97                         <separator string="Legend" colspan ="4"/>
98                           <label string=" (employee_name)s: Partner name" colspan="2"/>
99                           <label string="(user_signature)s: User name" colspan="2"/>
100                           <label string="(date)s: Current Date" colspan="2"/>
101                           <label string="(eval_name)s:Evaluation Name" colspan="2"/>
102                     </page>
103                   </notebook>
104                 </form>
105             </field>
106         </record>
107         <record model="ir.ui.view" id="view_hr_evaluation_plan_phase_tree">
108             <field name="name">hr_evaluation.plan.phase.form</field>
109             <field name="model">hr_evaluation.plan.phase</field>
110             <field name="type">tree</field>
111             <field name="arch" type="xml">
112                 <tree string="Evaluation Plan Phase" editable="bottom" >
113                     <field name="sequence"/>
114                     <field name="name"/>
115                     <field name="action"/>
116                     <field name="survey_id"/>
117                     <field name="wait"/>
118                 </tree>
119             </field>
120         </record>
121
122         <record id="hr_hr_employee_view_form" model="ir.ui.view">
123             <field name="name">hr.hr.employee.view.form</field>
124             <field name="model">hr.employee</field>
125             <field name="inherit_id" ref="hr.view_employee_form"/>
126             <field name="arch" type="xml">
127                 <notebook position="inside">
128                     <page string="Evaluation">
129                         <field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
130                         <field name="evaluation_date"/>
131                     </page>
132                 </notebook>
133             </field>
134         </record>
135
136         <record model="ir.ui.view" id="view_hr_evaluation_form">
137             <field name="name">hr_evaluation.evaluation.form</field>
138             <field name="model">hr_evaluation.evaluation</field>
139             <field name="type">form</field>
140             <field name="arch" type="xml">
141                 <form string="Evaluation">
142                     <group col="4" colspan="3">
143                         <separator string="Evaluation Data" colspan="4"/>
144                         <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
145                         <field name="plan_id"/>
146                         <field name="date"/>
147                         <field name="progress" widget="progressbar"/>
148                     </group>
149                     <group col="2" colspan="1">
150                         <separator string="Ending Summary" colspan="2"/>
151                         <field name="rating" attrs="{'readonly':[('state','&lt;&gt;','progress')],'required':[('state','=','progress')]}"/>
152                         <field name="date_close" readonly="1"/>
153                     </group>
154                     <notebook colspan="4">
155                         <page string="Appraisal">
156                             <field name="survey_request_ids" context="{'phase_id': phase_id}" nolabel="1" colspan="4" widget="one2many"/>
157                         </page>
158                         <page string="Internal Notes">
159                             <field name="note_action" colspan="4" nolabel="1"
160                                 groups="hr.group_hr_manager"/>
161                         </page>
162                         <page string="Public Notes">
163                             <field name="note_summary" colspan="4" nolabel="1"/>
164                         </page>
165                     </notebook>
166                     <newline/>
167                     <group col="6" colspan="4">
168                     <field name="state"/>
169                     <button name="button_plan_in_progress"
170                             string="Start Evaluation"
171                             states="draft"
172                             type="object"/>
173                     <button name="button_final_validation"
174                             string="Final Validation"
175                             states="wait"
176                             type="object"/>
177                     <button name="button_done"
178                             string="Done"
179                             states="progress"
180                             type="object"/>
181                     <button name="button_cancel"
182                             string="Cancel"
183                             states="draft,wait,progress"
184                             type="object"/>
185                     </group>
186               </form>
187             </field>
188         </record>
189         <record model="ir.ui.view" id="view_hr_evaluation_tree">
190             <field name="name">hr_evaluation.evaluation.tree</field>
191             <field name="model">hr_evaluation.evaluation</field>
192             <field name="type">tree</field>
193             <field name="arch" type="xml">
194                 <tree string="Evaluation">
195                     <!--field name="create_date"/-->
196                     <field name="employee_id"/>
197                     <field name="plan_id"/>
198                     <field name="date"/>
199                     <field name="progress" widget="progressbar"/>
200                     <field name="rating"/>
201                     <field name="state"/>
202                 </tree>
203             </field>
204         </record>
205
206        <record id="hr_evaluation.evaluation_search" model="ir.ui.view">
207             <field name="name">hr_evaluation.evaluation_search</field>
208             <field name="model">hr_evaluation.evaluation</field>
209             <field name="type">search</field>
210             <field name="arch" type="xml">
211                 <search string="Search Evaluation">
212                         <group>
213                         <filter icon="terp-hr" string="Draft" domain="[('state','=','draft')]"/>
214                         <filter icon="terp-crm" string="In progress" domain="[('state','=','wait')]"/>
215                         <filter icon="terp-mrp" string="Final Step" domain="[('state','=','progress')]"/>
216                         <separator orientation="vertical"/>
217                         <filter icon="gtk-media-rewind" string="7 Days"
218                             help="Evaluations to close within the next 7 days"
219                             domain="[('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
220                         />
221                         <filter icon="gtk-media-rewind" string="Overpassed"
222                             help="Evaluations that overpassed the deadline"
223                             domain="[('date','&gt;=',(datetime.date.today()))]"
224                         />
225
226                         <separator orientation="vertical"/>
227                         <field name="employee_id" widget="selection" select="1"/>
228                         <field name="plan_id" widget="selection" select="1"/>
229                                             </group>
230                                             <newline/>
231                         <group expand='1' string='Group by...'>
232                         <filter string='Employee' icon="terp-stock" domain="[]" context="{'group_by' : 'employee_id'}" />
233                         <filter string='Plan' icon="terp-stock" domain="[]" context="{'group_by' : 'plan_id'}" />
234                         <filter string='State' icon="terp-stock" domain="[]" context="{'group_by' : 'state'}" />
235                         <separator orientation="vertical"/>
236                         <filter string='Date' icon="terp-stock" domain="[]" context="{'group_by' : 'date'}" />
237                    </group>
238                </search>
239             </field>
240         </record>
241
242         <record model="ir.actions.act_window" id="open_view_hr_evaluation_tree">
243             <field name="res_model">hr_evaluation.evaluation</field>
244             <field name="view_type">form</field>
245             <field name="view_mode">tree,form</field>
246             <field name="search_view_id" ref="hr_evaluation.evaluation_search"/>
247         </record>
248         <menuitem
249             name="Evaluation" parent="menu_eval_hr"
250             id="menu_open_view_hr_evaluation_tree"
251             action="open_view_hr_evaluation_tree"/>
252
253         <record model="ir.ui.view" id="view_hr_evaluation_interview_form">
254             <field name="name">hr_evaluation.interview.form</field>
255             <field name="model">hr.evaluation.interview</field>
256             <field name="type">form</field>
257             <field name="arch" type="xml">
258                 <form string="Interview Evaluation">
259                     <group col="4" colspan="4">
260                         <field name="survey_id"  colspan="3"/>
261                         <group  colspan="1">
262                             <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel"
263                                 icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
264                             <button name="action_print_survey" string="Print Interview" type="object" states="waiting_answer,done,cancel"
265                                 icon="gtk-print"  attrs="{'readonly':[('survey_id','=',False)]}" />
266                         </group>
267                     </group>
268                     <group col="4" colspan="4">
269                         <field name="date_deadline"/>
270                         <field name="response" readonly="1"/>
271                         <field name="user_to_review_id"/>
272                         <field name="user_id"/>
273                     </group>
274                     <newline/>
275                     <separator string="State" colspan="4"/>
276                     <group colspan="4" col="6">
277                          <field name="state"/>
278                          <!--<button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object" icon="gtk-new"/>
279                         <button name="survey_req_waiting_answer" string="Waiting Answer" states="draft" type="object" icon="gtk-new"/>
280                         <button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
281                         <button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>-->
282                     </group>
283                 </form>
284             </field>
285         </record>
286
287         <record model="ir.ui.view" id="view_hr_evaluation_interview_tree">
288             <field name="name">hr_evaluation.interview.tree</field>
289             <field name="model">hr.evaluation.interview</field>
290             <field name="type">tree</field>
291             <field name="arch" type="xml">
292                 <tree string="Interview Evaluation">
293                     <field name="date_deadline"/>
294                     <field name="survey_id"/>
295                     <field name="user_id" string="Interviewer"/>
296                     <field name="user_to_review_id"/>
297                     <field name="response" readonly="1" invisible="True"/>
298                     <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel"
299                         icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
300                     <button name="action_print_survey" string="Print Interview" type="object" states="waiting_answer,done,cancel"
301                         icon="gtk-print" attrs="{'readonly':[('survey_id','=',False)]}"/>
302                     <field name="state"/>
303                 </tree>
304             </field>
305         </record>
306
307        <record id="view_hr_evaluation_interview_search" model="ir.ui.view">
308             <field name="name">view_hr_evaluation_interview_search</field>
309             <field name="model">hr.evaluation.interview</field>
310             <field name="type">search</field>
311             <field name="arch" type="xml">
312                 <search string="Search Evaluation">
313                    <group col='10' colspan='4'>
314                         <filter icon="terp-crm" string="To Do" name="todo" domain="[('state','=','waiting_answer')]"/>
315                         <separator orientation="vertical"/>
316                         <filter string="My" icon="terp-partner" name="my" domain="[('user_id','=',uid)]"/>
317                         <separator orientation="vertical"/>
318                         <filter icon="terp-stock" string="Late" domain="[('date_deadline','&lt;',current_date)]"/>
319                         <separator orientation="vertical"/>
320                         <field name="user_to_review_id" widget="selection"/>
321                         <field name="user_id" widget="selection"/>
322                    </group>
323                </search>
324             </field>
325         </record>
326
327         <record model="ir.actions.act_window" id="action_hr_evaluation_interview_tree">
328             <field name="res_model">hr.evaluation.interview</field>
329             <field name="view_type">form</field>
330             <field name="view_mode">tree,form</field>
331             <field name="domain">[('is_evaluation' ,'=', True)]</field>
332             <field name="context">{"search_default_todo":1,"search_default_my":1}</field>
333             <field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
334         </record>
335
336         <menuitem
337             name="Interview Requests" parent="menu_eval_hr"
338             id="menu_open_hr_evaluation_interview_requests"
339             action="action_hr_evaluation_interview_tree"/>
340
341       <menuitem name="Evaluation Reminders" parent="menu_eval_hr"
342            id="menu_eval_send_mail"
343            action="action_hr_evaluation_send_mail"
344            sequence="45"/>
345
346       <!-- Evaluation Interviews Button on Employee Form -->
347       <act_window domain="[('user_to_review_id', '=', active_id)]" id="act_hr_employee_2_hr__evaluation_interview" name="Evaluation Interviews" res_model="hr.evaluation.interview" src_model="hr.employee"/>
348
349     </data>
350 </openerp>