[IMP]:hr_evaluation:Set domain in Phase for particular plan and also improved the...
[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="res_model">hr_evaluation.plan</field>
41                         <field name="view_type">form</field>
42                         <field name="view_mode">tree,form</field>
43                 </record>
44                 <menuitem name="Evaluations" parent="hr.menu_hr_root" id="menu_eval_hr" sequence="3"/>
45                 <!--menuitem name="HR Responsible" parent="menu_eval_hr" id="menu_resp_hr"/-->
46                 <menuitem
47                         name="Evaluation Plan" parent="menu_eval_hr"
48                         id="menu_open_view_hr_evaluation_plan_tree"
49                         action="open_view_hr_evaluation_plan_tree"/>
50
51                 <record model="ir.ui.view" id="view_hr_evaluation_plan_phase_form">
52                         <field name="name">hr_evaluation.plan.phase.form</field>
53                         <field name="model">hr_evaluation.plan.phase</field>
54                         <field name="type">form</field>
55                         <field name="arch" type="xml">
56                                 <form string="Evaluation Plan Phase">
57                                         <field name="plan_id" invisible="1"/>
58                                         <group col="6" colspan="4">
59                                                 <field name="name"/>
60                                                 <field name="wait"/>
61                                                 <field name="sequence"/>
62                                         </group>
63                                         <group col="4" colspan="4">
64                                                 <separator string="Action to Perform" colspan="4"/>
65                                                 <field name="action"/>
66                                                 <field name="survey_id" widget="selection"/>
67                                         </group>
68                                         <group col="4" colspan="4">
69                                                 <group col="4" colspan="2">
70                                                         <separator string="Send to Managers" colspan="2"/>
71                                                         <newline/>
72                                                         <field name="send_answer_manager"/>
73                                                         <newline/>
74                                                         <field name="send_anonymous_manager"/>
75                                                 </group>
76                                                 <group col="4" colspan="2">
77                                                         <separator string="Send to Employees" colspan="2"/>
78                                                         <newline/>
79                                                         <field name="send_answer_employee"/>
80                                                         <newline/>
81                                                         <field name="send_anonymous_employee"/>
82                                                 </group>
83                                         </group>
84                                 </form>
85                         </field>
86                 </record>
87                 <record model="ir.ui.view" id="view_hr_evaluation_plan_phase_tree">
88                         <field name="name">hr_evaluation.plan.phase.form</field>
89                         <field name="model">hr_evaluation.plan.phase</field>
90                         <field name="type">tree</field>
91                         <field name="arch" type="xml">
92                                 <tree string="Evaluation Plan Phase" editable="bottom" >
93                                         <field name="sequence"/>
94                                         <field name="name"/>
95                                         <field name="action"/>
96                                         <field name="survey_id" widget="selection"/>
97                                         <field name="wait"/>
98                                 </tree>
99                         </field>
100                 </record>
101
102                 <record id="hr_hr_employee_view_form" model="ir.ui.view">
103             <field name="name">hr.hr.employee.view.form</field>
104             <field name="model">hr.employee</field>
105             <field name="inherit_id" ref="hr.view_employee_form"/>
106             <field name="arch" type="xml">
107                 <notebook position="inside">
108                     <page string="Evaluation">
109                         <field name="evaluation_plan_id"/>
110                                                 <field name="evaluation_date"/>
111                     </page>
112                 </notebook>
113             </field>
114         </record>
115
116         <record model="ir.ui.view" id="view_hr_evaluation_form">
117                         <field name="name">hr_evaluation.evaluation.form</field>
118                         <field name="model">hr_evaluation.evaluation</field>
119                         <field name="type">form</field>
120                         <field name="arch" type="xml">
121                                 <form string="Evaluation">
122                                         <group col="4" colspan="4">
123                                                 <field name="date" select="1"/>
124                                                 <field name="rating"/>
125                                                 <field name="employee_id" select="1"/>
126                                                 <field name="manager_id" select="1"/>
127                                                 <field name="plan_id"/>
128                                                 <field name="phase_id" domain="[('plan_id', '=', plan_id)]"/>
129                                         </group>
130                                         <notebook colspan="4">
131                                     <page string="Appraisal">
132                                 <field name="survey_request_ids" nolabel="1" colspan="4"/>
133                                             </page>
134                                             <page string="Action Plan">
135                                 <field name="note_action" colspan="4" nolabel="1"/>
136                                             </page>
137                                             <page string="Summary">
138                                                 <field name="note_summary" colspan="4" nolabel="1"/>
139                                             </page>
140                         </notebook>
141                         <newline/>
142                                         <group col="6" colspan="4">
143                                         <field name="state"/>
144                         <button name="button_plan_in_progress"
145                                         string="Plan In Progress"
146                             states="draft"
147                             type="object"/>
148                     <button name="button_final_validation"
149                                         string="Final Validation"
150                             states="wait"
151                             type="object"/>
152                     <button name="button_done"
153                                         string="Done"
154                             states="progress"
155                             type="object"/>
156                     <button name="button_cancel"
157                                         string="Cancel"
158                             states="draft,wait,progress"
159                             type="object"/>
160                     </group>
161               </form>
162                         </field>
163                 </record>
164                 <record model="ir.ui.view" id="view_hr_evaluation_tree">
165                         <field name="name">hr_evaluation.evaluation.form</field>
166                         <field name="model">hr_evaluation.evaluation</field>
167                         <field name="type">tree</field>
168                         <field name="arch" type="xml">
169                                 <tree string="Evaluation">
170                                         <field name="date"/>
171                                         <field name="employee_id"/>
172                                         <field name="manager_id"/>
173                                 </tree>
174                         </field>
175                 </record>
176                 <record model="ir.actions.act_window" id="open_view_hr_evaluation_tree">
177                         <field name="res_model">hr_evaluation.evaluation</field>
178                         <field name="view_type">form</field>
179                         <field name="view_mode">tree,form</field>
180                 </record>
181                 <menuitem
182                         name="Evaluation" parent="menu_eval_hr"
183                         id="menu_open_view_hr_evaluation_tree"
184                         action="open_view_hr_evaluation_tree"/>
185         </data>
186 </openerp>