[FIX] remove the option from the user_id fields
[odoo/odoo.git] / addons / hr_recruitment / hr_recruitment_view.xml
index 8c2931a..d72db95 100644 (file)
@@ -1,37 +1,40 @@
 <?xml version="1.0"?>
 <openerp>
     <data>
-        <menuitem
-            id="menu_hr_recruitment_recruitment"
-            name="Recruitment"
-            parent="hr.menu_hr_configuration"
-            sequence="40" />
 
-        <act_window
-            id="act_hr_applicant_to_meeting"
-            name="Meetings"
-            res_model="crm.meeting"
-            src_model="hr.applicant"
-            view_mode="tree,form,calendar,graph"
-            view_type="form"/>
+    <menuitem name="Recruitment"
+        id="menu_hr_recruitment_recruitment"
+        parent="hr.menu_hr_configuration"
+        sequence="40"/>
 
-    # ------------------------------------------------------
-    # Stage
-    # ------------------------------------------------------
+    <act_window
+        id="act_hr_applicant_to_meeting"
+        name="Meetings"
+        res_model="crm.meeting"
+        src_model="hr.applicant"
+        view_mode="tree,form,calendar,graph"
+        view_type="form"/>
+
+    <!-- Stage -->
     <record id="hr_job_stage_act" model="ir.actions.act_window">
         <field name="name">Recruitment / Applicants Stages</field>
         <field name="res_model">hr.recruitment.stage</field>
         <field name="view_type">form</field>
         <field name="domain">[]</field>
         <field name="context">{}</field>
-        <field name="help">Define here your stages of the recruitment process, for example: qualification call, first interview, second interview, refused, hired.</field>
+        <field name="help" type="html">
+          <p class="oe_view_nocontent_create">
+            Click to add a new stage in the recruitment process.
+          </p><p>
+            Define here your stages of the recruitment process, for example:
+            qualification call, first interview, second interview, refused,
+            hired.
+          </p>
+        </field>
     </record>
 
 
-    # ------------------------------------------------------
-    # Jobs
-    # ------------------------------------------------------
-
+    <!-- Jobs -->
     <!-- Applicant Read/Unread actions -->
     <record id="actions_server_applicant_unread" model="ir.actions.server">
         <field name="name">Mark unread</field>
@@ -44,9 +47,9 @@
     <record id="action_applicant_unread" model="ir.values">
         <field name="name">action_project_unread</field>
         <field name="action_id" ref="actions_server_applicant_unread"/>
-        <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_applicant_unread'))" />
+        <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_applicant_unread'))"/>
         <field name="key">action</field>
-        <field name="model_id" ref="model_hr_applicant" />
+        <field name="model_id" ref="model_hr_applicant"/>
         <field name="model">hr.applicant</field>
         <field name="key2">client_action_multi</field>
     </record>
@@ -62,9 +65,9 @@
     <record id="action_applicant_read" model="ir.values">
         <field name="name">action_project_read</field>
         <field name="action_id" ref="actions_server_applicant_read"/>
-        <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_applicant_read'))" />
+        <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_applicant_read'))"/>
         <field name="key">action</field>
-        <field name="model_id" ref="model_hr_applicant" />
+        <field name="model_id" ref="model_hr_applicant"/>
         <field name="model">hr.applicant</field>
         <field name="key2">client_action_multi</field>
     </record>
                         states="open,pending" class="oe_highlight"/>
                 <button name="case_cancel" string="Refuse" type="object"
                         states="draft,open,pending" class="oe_highlight"/>
-                <field name="stage_id" widget="statusbar" clickable="True" on_change="onchange_stage_id(stage_id)"/>
+                <field name="stage_id" widget="statusbar" clickable="True"/>
             </header>
             <sheet>
                 <div class="oe_right oe_button_box">
                     </h2>
                 </div>
                 <group>
-                    <group string="Contact Details">
+                    <group>
                         <field name="partner_id"
                                 on_change="onchange_partner_id(partner_id, email_from)"/>
                         <field name="email_from" widget="email"/>
                         <field name="partner_mobile"/>
                         <field name="type_id" placeholder="Degree"/>
                     </group>
-                    <group string="Application Followup">
+                    <group>
                         <field name="user_id"/>
                         <label for="title_action"/>
                         <div>
                             <field name="date_action"/> -
-                            <field name="title_action" class="oe_inline" placeholder="Call for proposal"/>
+                            <field name="title_action" class="oe_inline" placeholder="e.g. Call for interview"/>
                         </div>
                         <field name="priority"/>
                         <field name="state" invisible="1"/>
+                        <field name="source_id"/>
+                        <field name="reference"/>
                     </group>
                     <group string="Job">
                         <field name="survey" invisible="1"/>
                     <group string="Contract">
                         <label for="salary_expected"/>
                         <div>
-                            <field name="salary_expected" class="oe_inline"/>, 
+                            <field name="salary_expected" class="oe_inline"/>,
                             <field name="salary_expected_extra" class="oe_inline" placeholder="Extra advantages..."/>
                         </div>
                         <label for="salary_proposed"/>
                         <div>
-                            <field name="salary_proposed" class="oe_inline"/>, 
+                            <field name="salary_proposed" class="oe_inline"/>,
                             <field name="salary_proposed_extra" class="oe_inline" placeholder="Extra advantages..."/>
                         </div>
                     </group>
-                    <group string="Reference">
-                        <field name="source_id"/>
-                        <field name="reference"/>
-                    </group>
                 </group>
                 <separator string="Application Summary"/>
                 <field name="description" placeholder="Feedback of interviews..."/>
         <field name="type">search</field>
         <field name="arch" type="xml">
             <search string="Search Jobs">
-               <filter icon="terp-mail-message-new"
-                   string="Inbox" help="Unread messages"
-                   name="needaction_pending"
-                   domain="[('needaction_pending','=',True)]"/>
-               <separator orientation="vertical"/>
-               <filter icon="terp-document-new" string="New" name="filter_new"/>
-               <field name="partner_name" filter_domain="['|','|',('name','ilike',self),('partner_name','ilike',self),('email_from','ilike',self)]" string="Subject / Applicant"/>
-               <separator orientation="vertical"/>
-               <filter icon="terp-document-new" string="New" 
-                   domain="[('state','=','draft')]"
-                   help="All Initial Jobs"/>
-               <filter icon="terp-camera_test" string="In Progress" 
-                   domain="[('state','=','open')]"
-                   help="Open Jobs"/>
-               <filter icon="terp-gtk-media-pause" string="Pending"
-                   domain="[('state','=','pending')]"
-                   help="Pending Jobs"/>
-               <filter string="Unassigned Recruitments" domain="[('user_id','=',False)]" help="Unassigned Recruitments" icon="terp-personal-"/>
-               <filter icon="terp-gtk-jump-to-ltr" string="Next Actions"
-                    context="{'invisible_next_action':False, 'invisible_next_date':False}"
-                    domain="[('date_action','&lt;&gt;',False)]"
-                    help="Filter and view on next actions and date"/>
-               <separator orientation="vertical"/>
-               <field name="job_id" widget="selection"/>
-               <field name="user_id"/>
-               <newline/>
+                <field name="partner_name" filter_domain="['|','|',('name','ilike',self),('partner_name','ilike',self),('email_from','ilike',self)]" string="Subject / Applicant"/>
+                <filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
+                <separator/>
+                <filter icon="terp-document-new" string="New" domain="[('state','=','draft')]" help="All Initial Jobs"/>
+                <filter icon="terp-camera_test" string="In Progress" domain="[('state','=','open')]" help="Open Jobs"/>
+                <filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Jobs"/>
+                <separator/>
+                <filter string="Unassigned Recruitments" domain="[('user_id','=',False)]" help="Unassigned Recruitments" icon="terp-personal-"/>
+                <separator/>
+                <filter icon="terp-gtk-jump-to-ltr" string="Next Actions" context="{'invisible_next_action':False, 'invisible_next_date':False}"
+                    domain="[('date_action','&lt;&gt;',False)]" help="Filter and view on next actions and date"/>
+                <field name="job_id"/>
+                <field name="user_id"/>
                 <group expand="0" string="Group By...">
                     <filter string="Responsible" icon="terp-personal" domain="[]"  context="{'group_by':'user_id'}"/>
                     <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
-                    <separator orientation="vertical"/>
                     <filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
                     <filter string="Degree" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'type_id'}"/>
                     <filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'availability'}"/>
-                    <separator orientation="vertical"/>
                     <filter string="Appreciation" icon="terp-face-plain" domain="[]" context="{'group_by':'priority'}"/>
                     <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
                     <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                     <filter string="Source" icon="terp-face-plain" domain="[]" context="{'group_by':'source_id'}"/>
-                    <separator orientation="vertical" groups="base.group_no_one"/>
                     <filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
                 </group>
            </search>
     </record>
 
     <!-- CRM Lead Calendar View -->
-
     <record model="ir.ui.view" id="hr_applicant_calendar_view">
         <field name="name">Hr Applicants Calendar</field>
         <field name="model">hr.applicant</field>
         <field name="arch" type="xml">
             <calendar string="Applicants"
                 date_start="date_action" color="user_id">
-                <field name="name" />
-                <field name="partner_name" />
+                <field name="name"/>
+                <field name="partner_name"/>
                 <field name="title_action"/>
             </calendar>
         </field>
     </record>
 
-    <!-- hr Applicant Kanban View -->
-
+    <!-- Hr Applicant Kanban View -->
     <record model="ir.ui.view" id="hr_kanban_view_applicant">
         <field name="name">Hr Applicants kanban</field>
         <field name="model">hr.applicant</field>
                                     <a type="object" name="set_priority" args="['1']">
                                         <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16" title="Excellent"/>
                                     </a>
-                                    <img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+                                    <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+
                                 </div>
                             </div>
                             <div class="oe_clear"></div>
         </field>
     </record>
 
-    # ------------------------------------------------------
-    # HR Job
-    # ------------------------------------------------------
-
+    <!-- HR Job -->
     <record id="hr_job_survey" model="ir.ui.view">
         <field name="name">hr.job.form1</field>
         <field name="model">hr.job</field>
         <field name="inherit_id" ref="hr.view_hr_job_form"/>
         <field name="arch" type="xml">
             <field name="no_of_recruitment" version="7.0" position="after">
-            <label for="survey_id" />
-            <div>
-                <field name="survey_id" class="oe_inline"/>
-                <button class="oe_inline"
-                    string="Interview" icon="gtk-print"
-                    name="action_print_survey" type="object"
-                    attrs="{'invisible':[('survey_id','=',False)]}"/>
-            </div>
+                <label for="survey_id" groups="base.group_user"/>
+                <div groups="base.group_user">
+                    <field name="survey_id" class="oe_inline"/>
+                    <button class="oe_inline"
+                        string="Interview" icon="gtk-print"
+                        name="action_print_survey" type="object"
+                        attrs="{'invisible':[('survey_id','=',False)]}"/>
+                </div>
             </field>
+            <xpath expr="/form/sheet/h1" version="7.0" position="after">
+                <div colspan="4" attrs="{'invisible': [('alias_domain', '=', False)]}">
+                    <field name="alias_id" invisible="1"/>
+                    <label for="alias_name" class="oe_edit_only"/>
+                    <field name="alias_name" nolabel="1" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/>@<field name="alias_domain" nolabel="1" class="oe_inline"/>
+                </div>
+            </xpath>
         </field>
     </record>
 
-<!-- Stage Tree View -->
-
+    <!-- Stage Tree View -->
     <record model="ir.ui.view" id="hr_recruitment_stage_tree">
         <field name="name">hr.recruitment.stage.tree</field>
         <field name="model">hr.recruitment.stage</field>
         </field>
     </record>
 
-<!-- Stage Form View -->
-
+    <!-- Stage Form View -->
     <record model="ir.ui.view" id="hr_recruitment_stage_form">
         <field name="name">hr.recruitment.stage.form</field>
         <field name="model">hr.recruitment.stage</field>
         </field>
     </record>
 
-<!-- Stage Action -->
-
+    <!-- Stage Action -->
     <record id="hr_recruitment_stage_act" model="ir.actions.act_window">
         <field name="name">Stages</field>
         <field name="res_model">hr.recruitment.stage</field>
         <field name="view_type">form</field>
         <field name="view_id" ref="hr_recruitment_stage_tree"/>
-        <field name="help"> Check if the following stages are matching your recruitment process. Don't forget to specify the department if your recruitment process is different according to the job position.</field>
+        <field name="help" type="html">
+          <p class="oe_view_nocontent_create">
+            Click to add a new stage in the recruitment process.
+          </p><p>
+            Don't forget to specify the department if your recruitment process
+            is different according to the job position.
+          </p>
+        </field>
     </record>
 
     <menuitem
         action="hr_recruitment_stage_act"
         sequence="1" groups="base.group_no_one"/>
 
-<!-- Degree Tree View -->
-
+    <!-- Degree Tree View -->
     <record model="ir.ui.view" id="hr_recruitment_degree_tree">
         <field name="name">hr.recruitment.degree.tree</field>
         <field name="model">hr.recruitment.degree</field>
         </field>
     </record>
 
-<!-- Degree Form View -->
-
+    <!-- Degree Form View -->
     <record model="ir.ui.view" id="hr_recruitment_degree_form">
         <field name="name">hr.recruitment.degree.form</field>
         <field name="model">hr.recruitment.degree</field>
         </field>
     </record>
 
-<!-- Degree Action -->
-
+    <!-- Degree Action -->
     <record id="hr_recruitment_degree_action" model="ir.actions.act_window">
         <field name="name">Degree</field>
         <field name="res_model">hr.recruitment.degree</field>
             action="hr_recruitment_degree_action"
             sequence="5" groups="base.group_no_one"/>
 
-<!-- Source Tree View -->
-
+    <!-- Source Tree View -->
     <record model="ir.ui.view" id="hr_recruitment_source_tree">
         <field name="name">hr.recruitment.source.tree</field>
         <field name="model">hr.recruitment.source</field>
         <field name="view_type">form</field>
     </record>
 
-     <menuitem
-            id="menu_hr_recruitment_source"
-            parent="menu_hr_recruitment_recruitment"
-            action="hr_recruitment_source_action"
-            sequence="10" groups="base.group_no_one"/>
+    <menuitem
+        id="menu_hr_recruitment_source"
+        parent="menu_hr_recruitment_recruitment"
+        action="hr_recruitment_source_action"
+        groups="base.group_no_one"
+        sequence="10"/>
 
     </data>
 </openerp>