[IMP] access rights cleaning
[odoo/odoo.git] / addons / hr_recruitment / report / hr_recruitment_report_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4     <record id="view_hr_recruitment_report_tree" model="ir.ui.view">
5         <field name="name">hr.recruitment.report.tree</field>
6         <field name="model">hr.recruitment.report</field>
7         <field name="type">tree</field>
8         <field name="arch" type="xml">
9             <tree string="Recruitment Analysis">
10                 <field name="date" invisible="1"/>
11                 <field name="user_id" invisible="1"/>
12                 <field name="job_id" invisible="1"/>
13                 <field name="stage_id" invisible="1" />
14                 <field name="department_id" invisible="1"/>
15                 <field name="type_id" invisible="1"/>
16                 <field name="partner_id" invisible="1"/>
17                 <field name="partner_address_id" invisible="1"/>
18                 <field name="company_id" groups="base.group_multi_company"/>
19                 <field name="state" invisible="1"/>
20                 <field name="year" invisible="1"/>
21                 <field name="day" invisible="1"/>
22                 <field name="month" invisible="1"/>
23                 <field name="nbr" sum="# Cases"/>
24                 <field name="available" sum="Available"/>
25                 <field name="salary_exp" sum="Expected Salary"/>
26                 <field name="salary_prop" sum="Proposed Salary" />
27                 <field name="salary_prop_avg" sum="Avg Proposed Salary" />
28                 <field name="delay_open" avg='Avg Delay to Open'/>
29                 <field name="delay_close" avg='Avg Delay to Close'/>
30             </tree>
31         </field>
32     </record>
33
34     <record id="view_hr_recruitment_report_graph" model="ir.ui.view">
35          <field name="name">hr.recruitment.report.graph</field>
36          <field name="model">hr.recruitment.report</field>
37          <field name="type">graph</field>
38          <field name="arch" type="xml">
39              <graph string="Recruitment Analysis" type="bar">
40                  <field name="job_id"/>
41                  <field name="nbr" operator="+"/>
42              </graph>
43          </field>
44     </record>
45
46     <record id="view_hr_recruitment_report_search" model="ir.ui.view">
47         <field name="name">hr.recruitment.report.search</field>
48         <field name="model">hr.recruitment.report</field>
49         <field name="type">search</field>
50         <field name="arch" type="xml">
51             <search string="Recruitment Analysis">
52                 <group>
53                     <filter icon="terp-go-year" string="Year"
54                         domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]"
55                         help="Recruitment performed in current year"/>
56                     <filter icon="terp-go-month" string="Month"
57                         name="month"
58                         domain="[('date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
59                         help="Recruitment performed in current month"/>
60                     <filter icon="terp-go-month"
61                         string="    Month-1    "
62                         separator="1"
63                         domain="[('date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
64                         help="Recruitment during last month"/>
65                     <separator orientation="vertical"/>
66                     <filter string="New"
67                         icon="terp-document-new"
68                         domain="[('state','=','draft')]"
69                         help = "Draft recruitment"/>
70                     <filter string="In progress"
71                         icon="terp-check"
72                         domain="[('state', '=' ,'open')]"
73                         help = "In progress recruitment"/>
74                        <filter string="Pending"
75                            icon="terp-gtk-media-pause"
76                            domain="[('state','=','pending')]"
77                            help = "Pending recruitment"/>
78                     <filter string="Hired"
79                            icon="terp-camera_test"
80                            domain="[('state','=','done')]"
81                            help = "Hired employees"/>
82                       <separator orientation="vertical"/>
83                       <field name="job_id"/>
84                     <field name="department_id" widget="selection"/>
85                     <field name="user_id" string="Responsible">
86                         <filter icon="terp-personal"
87                             string="My Recruitment"
88                             help="My Recruitment"
89                             domain="[('user_id','=',uid)]"/>
90                     </field>
91                 </group>
92                 <newline/>
93                 <group expand="0" string="Extended Filters..." groups="base.group_extended">
94                     <!--field name="job_id"/-->
95                     <field name="priority"/>
96                     <field name="stage_id" widget="selection"/>
97                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
98                     <field name="date" string="Creation Date"/>
99                     <field name="date_closed"/>
100                 </group>
101                 <newline/>
102                 <group expand="1" string="Group By ...">
103                    <filter string="Responsible" name='User' icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
104                    <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
105                    <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" />
106                    <separator orientation="vertical"/>
107                     <filter string="Jobs" name="job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
108                    <filter string="Department" name="department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
109                    <separator orientation="vertical"/>
110                    <filter string="Degree" name="degree" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'type_id'}"/>
111                    <separator orientation="vertical"/>
112                    <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
113                    <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
114                    <separator orientation="vertical"/>
115                    <filter string="Day" name = "day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}" help="Creation Date"/>
116                    <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" help="Creation Date"/>
117                    <filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'year'}" help="Creation Date"/>
118                 </group>
119
120
121                 </search>
122         </field>
123     </record>
124
125     <record id="action_hr_recruitment_report_all" model="ir.actions.act_window">
126         <field name="name">Recruitment Analysis</field>
127         <field name="res_model">hr.recruitment.report</field>
128         <field name="view_type">form</field>
129         <field name="view_mode">tree,graph</field>
130         <field name="context">{'search_default_month':1,'search_default_department':1,'group_by_no_leaf':1,'group_by':[]}</field>
131         <field name="search_view_id" ref="view_hr_recruitment_report_search"/>
132     </record>
133     <menuitem id="hr.menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10" groups="base.group_hr_manager,base.group_hr_user"/>
134     <menuitem action="action_hr_recruitment_report_all" id="menu_hr_recruitment_report_all" parent="hr.menu_hr_reporting" sequence="1"/>
135
136 </data>
137 </openerp>