Launchpad automatic translations update.
[odoo/odoo.git] / addons / hr_evaluation / hr_evaluation_view.xml
1 <?xml version="1.0" ?>
2 <openerp>
3     <data>
4
5       <record id="view_hr_evaluation_plan_search" model="ir.ui.view">
6             <field name="name">hr_evaluation.plan.search</field>
7             <field name="model">hr_evaluation.plan</field>
8             <field name="type">search</field>
9             <field name="arch" type="xml">
10                 <search string="Search Evaluation Plan">
11                    <group col='15' colspan='4'>
12                        <field name="name"/>
13                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
14                    </group>
15                    <newline/>
16                    <group expand="0" string="Group By..." groups="base.group_multi_company">
17                         <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"/>
18                     </group>
19                </search>
20             </field>
21         </record>
22
23         <record model="ir.ui.view" id="view_hr_evaluation_plan_form">
24             <field name="name">hr_evaluation.plan.form</field>
25             <field name="model">hr_evaluation.plan</field>
26             <field name="type">form</field>
27             <field name="arch" type="xml">
28                 <form string="Evaluation Plan">
29                     <group col="8" colspan="4">
30                         <field name="name" select="1"/>
31                         <field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
32                         <field name="month_first"/>
33                         <field name="month_next"/>
34                         <label string="(months)" align="0.0"/>
35                         <newline/>
36                         <field name="active"/>
37                     </group>
38                      <notebook colspan="4">
39                          <page string="Evaluation Phases">
40                             <field name="phase_ids" nolabel="1" colspan="4"/>
41                          </page>
42                      </notebook>
43                 </form>
44             </field>
45         </record>
46         <record model="ir.ui.view" id="view_hr_evaluation_plan_tree">
47             <field name="name">hr_evaluation.plan.form</field>
48             <field name="model">hr_evaluation.plan</field>
49             <field name="type">tree</field>
50             <field name="arch" type="xml">
51                 <tree string="Evaluation Plan">
52                     <field name="name"/>
53                     <field name="month_first"/>
54                     <field name="month_next"/>
55                     <field name="company_id" groups="base.group_multi_company"/>
56                 </tree>
57             </field>
58         </record>
59         <record model="ir.actions.act_window" id="open_view_hr_evaluation_plan_tree">
60             <field name="name">Evaluation Plans</field>
61             <field name="res_model">hr_evaluation.plan</field>
62             <field name="view_type">form</field>
63             <field name="view_mode">tree,form</field>
64         </record>
65
66         <menuitem name="Evaluations" parent="hr.menu_hr_root" id="menu_eval_hr" sequence="6"/>
67         <menuitem name="Periodic Evaluations" parent="hr.menu_hr_configuration" id="menu_eval_hr_config" sequence="4"/>
68         <menuitem parent="menu_eval_hr_config" id="menu_open_view_hr_evaluation_plan_tree"
69             action="open_view_hr_evaluation_plan_tree"/>
70
71         <record model="ir.ui.view" id="view_hr_evaluation_plan_phase_form">
72             <field name="name">hr_evaluation.plan.phase.form</field>
73             <field name="model">hr_evaluation.plan.phase</field>
74             <field name="type">form</field>
75             <field name="arch" type="xml">
76                 <form string="Evaluation Plan Phases">
77                  <notebook>
78                    <page string="General">
79                     <field name="plan_id" invisible="1"/>
80                     <group col="8" colspan="4">
81                         <field name="name"/>
82                         <field name="wait"/>
83                         <field name="sequence"/>
84                     </group>
85                     <group col="4" colspan="4">
86                         <separator string="Action to Perform" colspan="4"/>
87                         <field name="action"/>
88                         <field name="survey_id" domain="[('state','=','open')]"/>
89                     </group>
90                     <group col="4" colspan="4">
91                         <group col="4" colspan="2">
92                             <separator string="Send to Managers" colspan="2"/>
93                             <newline/>
94                             <field name="send_answer_manager"/>
95                             <newline/>
96                             <field name="send_anonymous_manager"/>
97                         </group>
98                         <group col="4" colspan="2">
99                             <separator string="Send to Employees" colspan="2"/>
100                             <newline/>
101                             <field name="send_answer_employee"/>
102                             <newline/>
103                             <field name="send_anonymous_employee"/>
104                         </group>
105                     </group>
106                     </page>
107                     <page string="Mail Settings">
108                         <field name="mail_feature" colspan="4"/>
109                         <newline/>
110                         <separator string="Mail Body"/>
111                         <newline/>
112                         <field name="mail_body" colspan="4" nolabel="1"/>
113                         <newline/>
114                         <separator string="Legend" colspan ="4"/>
115                           <label string=" (employee_name)s: Partner name" colspan="2"/>
116                           <label string="(user_signature)s: User name" colspan="2"/>
117                           <label string="(date)s: Current Date" colspan="2"/>
118                           <label string="(eval_name)s:Evaluation Name" colspan="2"/>
119                     </page>
120                   </notebook>
121                 </form>
122             </field>
123         </record>
124         <record model="ir.ui.view" id="view_hr_evaluation_plan_phase_tree">
125             <field name="name">hr_evaluation.plan.phase.form</field>
126             <field name="model">hr_evaluation.plan.phase</field>
127             <field name="type">tree</field>
128             <field name="arch" type="xml">
129                 <tree string="Evaluation Plan Phases" editable="bottom" >
130                     <field name="sequence"/>
131                     <field name="name"/>
132                     <field name="action"/>
133                     <field name="survey_id"/>
134                     <field name="wait"/>
135                 </tree>
136             </field>
137         </record>
138
139         <record id="hr_hr_employee_view_form" model="ir.ui.view">
140             <field name="name">hr.hr.employee.view.form</field>
141             <field name="model">hr.employee</field>
142             <field name="inherit_id" ref="hr.view_employee_form"/>
143             <field name="arch" type="xml">
144                 <page string="Notes" position="before">
145                     <page string="Evaluation" groups="base.group_hr_user">
146                         <field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
147                         <field name="evaluation_date"/>
148                     </page>
149                 </page>
150             </field>
151         </record>
152
153         <record model="ir.ui.view" id="view_hr_evaluation_form">
154             <field name="name">hr_evaluation.evaluation.form</field>
155             <field name="model">hr_evaluation.evaluation</field>
156             <field name="type">form</field>
157             <field name="arch" type="xml">
158                 <form string="Evaluation">
159                     <group col="4" colspan="3">
160                         <separator string="Evaluation Data" colspan="4"/>
161                         <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
162                         <field name="plan_id"/>
163                         <field name="date"/>
164                         <field name="progress" widget="progressbar"/>
165                     </group>
166                     <group col="2" colspan="1">
167                         <separator string="Ending Summary" colspan="2"/>
168                         <field name="rating" attrs="{'readonly':[('state','&lt;&gt;','progress')],'required':[('state','=','progress')]}"/>
169                         <field name="date_close" readonly="1"/>
170                     </group>
171                     <notebook colspan="4">
172                         <page string="Appraisal">
173                             <field name="survey_request_ids" context="{'phase_id': phase_id}" nolabel="1" colspan="4" widget="one2many">
174                                 <form string="Interview Evaluation">
175                                     <group col="4" colspan="4">
176                                         <field name="survey_id"/>
177                                         <group col="2" colspan="2">
178                                             <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" 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)]}"/>
179                                             <button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
180                                         </group>
181                                         <field name="date_deadline"/>
182                                         <field name="response" readonly="1"/>
183                                         <field name="user_to_review_id"/>
184                                         <field name="user_id" string="Interviewer"/>
185                                     </group>
186                                     <newline/>
187                                     <separator string="State" colspan="4"/>
188                                     <group colspan="4" col="6">
189                                          <field name="state"/>
190                                     </group>
191                                 </form>
192                             </field>
193                         </page>
194                         <page string="Internal Notes">
195                             <field name="note_action" colspan="4" nolabel="1"
196                                 groups="base.group_hr_manager"/>
197                         </page>
198                         <page string="Public Notes">
199                             <field name="note_summary" colspan="4" nolabel="1"/>
200                         </page>
201                     </notebook>
202                     <newline/>
203                     <group col="8" colspan="4">
204                         <field name="state"/>
205                         <button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
206                                 icon="gtk-cancel"/>
207                         <button name="button_plan_in_progress" string="Start Evaluation" states="draft" type="object"
208                                 icon="gtk-execute"/>
209                         <button name="button_done" string="Done" states="progress" type="object"
210                                 icon="gtk-jump-to"/>
211                         <button name="button_draft" string="Reset to Draft" states="cancel" type="object"
212                                 icon="terp-stock_effects-object-colorize"/>
213                         <button name="button_final_validation" string="Validate Evaluation" states="wait" type="object"
214                                 icon="gtk-go-forward"/>
215                     </group>
216               </form>
217             </field>
218         </record>
219
220         <record model="ir.ui.view" id="view_hr_evaluation_tree">
221             <field name="name">hr_evaluation.evaluation.tree</field>
222             <field name="model">hr_evaluation.evaluation</field>
223             <field name="type">tree</field>
224             <field name="arch" type="xml">
225                 <tree colors="blue:state in ('draft');black:state in ('wait','progress');gray:state in('done','cancel')" string="Evaluation">
226                     <field name="employee_id"/>
227                     <field name="plan_id"/>
228                     <field name="date"/>
229                     <!--field name="progress" widget="progressbar"/-->
230                     <field name="rating"/>
231                     <field name="state"/>
232                 </tree>
233             </field>
234         </record>
235
236         <record model="ir.ui.view" id="view_hr_evaluation_graph">
237             <field name="name">hr_evaluation.evaluation.graph</field>
238             <field name="model">hr_evaluation.evaluation</field>
239             <field name="type">graph</field>
240             <field name="arch" type="xml">
241                 <graph string="Evaluation" type="bar">
242                     <field name="employee_id"/>
243                     <field name="progress"  operator="+"/>
244                 </graph>
245             </field>
246         </record>
247
248        <record id="hr_evaluation.evaluation_search" model="ir.ui.view">
249             <field name="name">hr_evaluation.evaluation_search</field>
250             <field name="model">hr_evaluation.evaluation</field>
251             <field name="type">search</field>
252             <field name="arch" type="xml">
253                 <search string="Search Evaluation">
254                    <group col='10' colspan='4'>
255                     <filter icon="terp-check" string="Current" domain="[('state','=','wait'))]" help="Evaluations that are in waiting state"/>
256                     <filter icon="terp-camera_test" string="In progress" domain="[('state','=','progress')]" help="Evaluations that are in progress state"/>
257                     <separator orientation="vertical"/>
258                     <filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
259                         domain="[('date', '&gt;=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" />
260                     <separator orientation="vertical"/>
261                     <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
262                         help="Evaluations that overpassed the deadline" domain="[('date','&lt;=',(datetime.date.today()).strftime('%%Y-%%m-%%d'))]" />
263                     <separator orientation="vertical"/>
264                     <field name="employee_id" />
265                     <field name="plan_id" widget="selection" />
266                     </group>
267                     <newline/>
268                     <group expand='0' string='Group by...'>
269                     <filter string='Employee' icon="terp-personal" domain="[]" context="{'group_by' : 'employee_id'}" />
270                     <separator orientation="vertical"/>
271                     <filter string='Plan' icon="terp-stock_align_left_24" domain="[]" context="{'group_by' : 'plan_id'}" />
272                     <filter string='State' icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by' : 'state'}" />
273                     <separator orientation="vertical"/>
274                     <filter string='Date' icon="terp-go-month" domain="[]" context="{'group_by' : 'date'}" />
275                    </group>
276                </search>
277             </field>
278         </record>
279
280         <record model="ir.actions.act_window" id="open_view_hr_evaluation_tree">
281             <field name="name">Evaluations</field>
282             <field name="res_model">hr_evaluation.evaluation</field>
283             <field name="view_type">form</field>
284             <field name="view_mode">tree,form,graph</field>
285             <field name="search_view_id" ref="hr_evaluation.evaluation_search"/>
286             <field name="help">Each employee may be assigned an evaluation plan. Such a plan defines the frequency and the way you manage your periodic personnel evaluation. You will be able to define steps and attach interviews to each step. OpenERP manages all kind of evaluations: bottom-up, top-down, self-evaluation and final evaluation by the manager.</field>
287         </record>
288
289         <menuitem name="Evaluations" parent="menu_eval_hr" id="menu_open_view_hr_evaluation_tree"
290             action="open_view_hr_evaluation_tree"/>
291
292         <record model="ir.ui.view" id="view_hr_evaluation_interview_form">
293             <field name="name">hr_evaluation.interview.form</field>
294             <field name="model">hr.evaluation.interview</field>
295             <field name="type">form</field>
296             <field name="arch" type="xml">
297                 <form string="Interview Evaluation">
298                     <group col="4" colspan="4">
299                         <field name="survey_id"/>
300                         <field name="evaluation_id"/>
301                         <group col="2" colspan="2">
302                             <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" 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)]}"/>
303                             <button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
304                         </group>
305                         <field name="date_deadline"/>
306                         <field name="response" readonly="1"/>
307                         <field name="user_to_review_id"/>
308                         <field name="user_id" string="Interviewer"/>
309                     </group>
310                     <newline/>
311                     <separator string="State" colspan="4"/>
312                     <group colspan="4" col="6">
313                          <field name="state"/>
314                     </group>
315                 </form>
316             </field>
317         </record>
318
319         <record model="ir.ui.view" id="view_hr_evaluation_interview_tree">
320             <field name="name">hr_evaluation.interview.tree</field>
321             <field name="model">hr.evaluation.interview</field>
322             <field name="type">tree</field>
323             <field name="arch" type="xml">
324                 <tree string="Interview Evaluation">
325                     <field name="date_deadline" string="Deadline Date"/>
326                     <field name="survey_id"/>
327                     <field name="user_id" string="Interviewer"/>
328                     <field name="user_to_review_id"/>
329                     <field name="response" readonly="1" invisible="True"/>
330                     <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" 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)]}"/>
331                     <button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0}" attrs="{'readonly':[('response','=',False)]}" />
332                     <field name="state"/>
333                 </tree>
334             </field>
335         </record>
336
337        <record id="view_hr_evaluation_interview_search" model="ir.ui.view">
338             <field name="name">view_hr_evaluation_interview_search</field>
339             <field name="model">hr.evaluation.interview</field>
340             <field name="type">search</field>
341             <field name="arch" type="xml">
342                 <search string="Search Evaluation">
343                    <group col='10' colspan='4'>
344                         <filter icon="terp-gtk-go-back-rtl" string="To Do" name="todo" domain="[('state','=','waiting_answer')]"/>
345                         <separator orientation="vertical"/>
346                         <filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="[('date_deadline','&lt;',current_date)]"/>
347                         <separator orientation="vertical"/>
348                         <field name="user_to_review_id"/>
349                         <field name="user_id" string="Interviewer"/>
350                    </group>
351                    <newline/>
352                     <group expand="0" string="Group By...">
353                         <filter string="Interviewer" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
354                         <separator orientation="vertical"/>
355                         <filter string="Survey" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'survey_id'}"/>
356                         <separator orientation="vertical"/>
357                         <filter string="State" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
358                     </group>
359                </search>
360             </field>
361         </record>
362
363         <record id="view_evaluation_calendar" model="ir.ui.view">
364             <field name="name">Interview Request</field>
365             <field name="model">hr.evaluation.interview</field>
366             <field name="type">calendar</field>
367             <field name="arch" type="xml">
368                 <calendar string="Interview Request" color="user_to_review_id" date_start="date_deadline">
369                     <field name="request_id"/>
370                 </calendar>
371             </field>
372         </record>
373
374         <record model="ir.actions.act_window" id="action_hr_evaluation_interview_tree">
375             <field name="name">Interview Requests</field>
376             <field name="res_model">hr.evaluation.interview</field>
377             <field name="view_type">form</field>
378             <field name="view_id" ref="view_hr_evaluation_interview_form"/>
379             <field name="domain">[('is_evaluation' ,'=', True)]</field>
380             <field name="context">{"search_default_todo":1,"search_default_user_id":uid}</field>
381             <field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
382             <field name="help">Interview Requests are generated automatically by OpenERP according to an employee's evaluation plan. Each user receives automatic emails and requests to evaluate their colleagues periodically.</field>
383         </record>
384
385         <record model="ir.actions.act_window.view" id="hr_evaluation_interview_tree">
386             <field name="sequence" eval="1"/>
387             <field name="view_mode">tree</field>
388             <field name="view_id" ref="view_hr_evaluation_interview_tree"/>
389             <field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
390         </record>
391         <record model="ir.actions.act_window.view" id="hr_evaluation_interview_form">
392             <field name="sequence" eval="2"/>
393             <field name="view_mode">form</field>
394             <field name="view_id" ref="view_hr_evaluation_interview_form"/>
395             <field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
396         </record>
397         <record model="ir.actions.act_window.view" id="action_view_evaluation_calendar">
398             <field name="sequence" eval="3"/>
399             <field name="view_mode">calendar</field>
400             <field name="view_id" ref="view_evaluation_calendar"/>
401             <field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
402         </record>
403
404         <menuitem name="Interview Requests" parent="menu_eval_hr" id="menu_open_hr_evaluation_interview_requests"
405             action="action_hr_evaluation_interview_tree"/>
406         <menuitem name="Evaluation Reminders" parent="menu_eval_hr" id="menu_eval_send_mail"
407            action="action_hr_evaluation_send_mail" sequence="45" groups="base.group_hr_manager"/>
408
409       <!-- Evaluation Interviews Button on Employee Form -->
410       <act_window
411       context="{'search_default_user_to_review_id': [active_id], 'default_user_to_review_id': active_id}"
412       id="act_hr_employee_2_hr__evaluation_interview"
413       name="Evaluation Interviews"
414       res_model="hr.evaluation.interview"
415       src_model="hr.employee"/>
416
417     </data>
418 </openerp>