Files
odoo_source/addons/hr/hr_view.xml
T
Denis Ledoux 94920b43c9 [FIX] *: typo Important Messages -> Unread Messages
While this is important to read the replies
you get in the threads you follow, `Unread messages`
is more accurate to describe what these filters
displays.

opw-666739
2016-01-14 10:48:37 +01:00

490 lines
26 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Top menu item -->
<menuitem name="Employees"
id="menu_hr_root"
groups="base.group_hr_manager,base.group_hr_user,base.group_user"
icon="fa-user"
web_icon="hr,static/description/icon.png"
sequence="75"/>
<menuitem id="menu_hr_main" parent="menu_hr_root" name="Human Resources" sequence="0"/>
<menuitem id="menu_hr_reporting_timesheet" name="Reports" parent="menu_hr_root" sequence="99" groups="base.group_hr_manager,base.group_hr_user"/>
<menuitem id="menu_human_resources_configuration" name="Configuration" parent="menu_hr_root" sequence="100" groups="base.group_configuration,base.group_hr_manager"/>
<!-- Employee -->
<record id="view_employee_form" model="ir.ui.view">
<field name="name">hr.employee.form</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<form string="Employee">
<sheet>
<div class="oe_button_box" name="button_box" groups="base.group_hr_user">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<field name="image" widget='image' class="oe_avatar" options='{"preview_image":"image_medium"}'/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" placeholder="Employee's Name"/>
</h1>
</div>
<field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time" groups="base.group_hr_user"/>
<notebook>
<page name="public" string="Public Information">
<group>
<group string="Contact Information">
<field name="address_id" on_change="onchange_address_id(address_id)"
context="{'show_address': 1}"
options='{"always_reload": True, "highlight_first_line": True}'/>
<field name="mobile_phone"/>
<field name="work_location"/>
<field name="work_email" widget="email"/>
<field name="work_phone"/>
</group>
<group string="Position">
<field name="department_id" on_change="onchange_department_id(department_id)"/>
<field name="job_id"/>
<field name="parent_id"/>
<field name="coach_id"/>
</group>
</group>
<field name="notes" placeholder="Other Information ..." colspan="4"/>
</page>
<page string="Personal Information" groups="base.group_hr_user">
<group>
<group string="Citizenship &amp; Other Information">
<field name="country_id" options='{"no_open": True, "no_create": True}'/>
<field name="identification_id" groups="base.group_hr_user"/>
<field name="passport_id" groups="base.group_hr_user"/>
<field name="bank_account_id"/>
</group>
<group string="Contact Information">
<field name="address_home_id"
context="{'show_address': 1}"
options='{"always_reload": True, "highlight_first_line": True}'/>
</group>
<group string="Status">
<field name="gender"/>
<field name="marital"/>
</group>
<group string="Birth">
<field name="birthday"/>
</group>
</group>
</page>
<page string="HR Settings" groups="base.group_hr_user">
<group>
<group string='Status' name="active_group">
<field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>
<field name="user_id" on_change="onchange_user(name, image, user_id)" string="Related User"
context="{'default_groups_ref': ['base.group_user']}"/>
</group>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_employee_tree" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<tree string="Employees" decoration-bf="message_needaction==True">
<field name="name"/>
<field name="work_phone"/>
<field name="work_email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>
<field name="coach_id" invisible="1"/>
<field name="message_needaction" invisible="1"/>
</tree>
</field>
</record>
<record id="view_employee_filter" model="ir.ui.view">
<field name="name">Employees</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<search string="Employees">
<field name="name" string="Employees" filter_domain="['|',('work_email','ilike',self),('name','ilike',self)]"/>
<field name="department_id"/>
<field name="category_ids" groups="base.group_hr_user"/>
<field name="job_id" />
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group expand="0" string="Group By">
<filter string="Manager" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Coach" domain="[]" context="{'group_by':'coach_id'}"/>
<filter string="Department" domain="[]" context="{'group_by':'department_id'}"/>
<filter string="Job" domain="[]" context="{'group_by':'job_id'}"/>
<filter string="Company" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<record model="ir.ui.view" id="hr_kanban_view_employees">
<field name="name">HR - Employess Kanban</field>
<field name="model">hr.employee</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<kanban class="o_hr_employee_kanban">
<field name="last_login"/>
<field name="message_is_follower"/>
<field name="message_follower_ids"/>
<field name="message_ids"/>
<field name="message_needaction_counter"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="o_kanban_image">
<img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)"/>
<div class="o_employee_summary_icons">
<t t-if="record.message_needaction_counter.raw_value">
<span class='oe_kanban_mail_new' title='Unread Messages'><i class='fa fa-comments'/><t t-raw="record.message_needaction_counter.raw_value"/></span>
</t>
<span title='Messages'><i class='fa fa-comments'/><t t-esc="record.message_ids.raw_value.length"/></span>
<span title='Followers'><i class='fa fa-users'/><t t-esc="record.message_follower_ids.raw_value.length"/></span>
</div>
</div>
<div class="oe_kanban_details">
<strong>
<field name="name"/>
</strong>
<ul>
<li id="last_login"/>
<li t-if="record.job_id.raw_value"><field name="job_id"/></li>
<li t-if="record.work_location.raw_value"><field name="work_location"/></li>
<li t-if="record.work_email.raw_value"><i class="fa fa-envelope"></i> <field name="work_email"/></li>
<li t-if="record.work_phone.raw_value"><i class="fa fa-phone"></i> <field name="work_phone"/></li>
<li t-if="record.mobile_phone.raw_value"><i class="fa fa-mobile"></i> <field name="mobile_phone"/></li>
</ul>
<div class="o_kanban_button">
<button t-if="record.message_is_follower.raw_value" name="action_unfollow" type="object" class="o_follow_btn o_following btn btn-sm btn-default">
<span class="o_unfollow">Unfollow</span>
<span class="o_following">Following</span>
</button>
<button t-if="!record.message_is_follower.raw_value" name="action_follow" type="object" class="o_follow_btn o_follow btn btn-sm btn-primary">Follow</button>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="open_view_employee_tree" model="ir.actions.act_window">
<field name="name">Employees Structure</field>
<field name="res_model">hr.employee</field>
<field name="view_type">tree</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_employee_tree"/>
<field name="domain">[('parent_id','=',False)]</field>
<field name="search_view_id" ref="view_employee_filter"/>
</record>
<record id="open_view_employee_list" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_employee_filter"/>
</record>
<record id="open_view_employee_list_my" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_employee_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a new employee.
</p><p>
With just a quick glance on the Odoo employee screen, you
can easily find all the information you need for each person;
contact data, job position, availability, etc.
</p>
</field>
</record>
<menuitem action="open_view_employee_list_my" id="menu_open_view_employee_list_my" sequence="3" parent="menu_hr_root"/>
<!-- Employee tree by manager -->
<record id="view_partner_tree2" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
<field name="field_parent">child_ids</field>
<field eval="20" name="priority"/>
<field name="arch" type="xml">
<tree string="Employees">
<field name="name"/>
<field name="work_phone"/>
<field name="work_email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="coach_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
</tree>
</field>
</record>
<record id="hr_employee_action_subordinate_hierachy" model="ir.actions.act_window">
<field name="name">Subordinate Hierarchy</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.employee</field>
<field name="domain">[('id','in',active_ids)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_partner_tree2"/>
</record>
<record id="hr_employee_action_subordinate_hierachy_mutli" model="ir.values">
<field name="name">Subordinate Hierarchy</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="value" eval="'ir.actions.act_window,' + str(ref('hr_employee_action_subordinate_hierachy'))"/>
<field name="key">action</field>
<field name="key2">client_action_multi</field>
<field name="model">hr.employee</field>
</record>
<!-- Employee Category -->
<record id="view_employee_category_form" model="ir.ui.view">
<field name="name">hr.employee.category.form</field>
<field name="model">hr.employee.category</field>
<field name="arch" type="xml">
<form string="Employee Tags">
<group>
<field name="name"/>
</group>
</form>
</field>
</record>
<record id="view_employee_category_list" model="ir.ui.view">
<field name="name">hr.employee.category.list</field>
<field name="model">hr.employee.category</field>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<tree string="Employees Tags">
<field name="name"/>
</tree>
</field>
</record>
<record id="open_view_categ_form" model="ir.actions.act_window">
<field name="name">Employee Tags</field>
<field name="res_model">hr.employee.category</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="open_view_categ_form" id="menu_view_employee_category_form"
parent="menu_human_resources_configuration" sequence="1" groups="base.group_no_one"/>
<!-- hr.job -->
<record id="view_hr_job_form" model="ir.ui.view">
<field name="name">hr.job.form</field>
<field name="model">hr.job</field>
<field name="arch" type="xml">
<form string="Job">
<header>
<button name="set_recruit" string="Launch Recruitment" states="open" type="object" class="oe_highlight" groups="base.group_user"/>
<button name="set_open" string="Stop Recruitment" states="recruit" type="object" class="oe_highlight" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" placeholder="Job Position Name"/></h1>
</div>
<group name="employee_data">
<group>
<field name="department_id" class="oe_inline"/>
<field name="no_of_recruitment" class="oe_inline"/>
</group>
</group>
<div attrs="{'invisible': [('state', '!=', 'recruit')]}">
<label for="description"/>
<field name="description"/>
</div>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_hr_job_tree" model="ir.ui.view">
<field name="name">hr.job.tree</field>
<field name="model">hr.job</field>
<field name="arch" type="xml">
<tree string="Job" decoration-bf="message_needaction==True">
<field name="name"/>
<field name="department_id"/>
<field name="no_of_employee"/>
<field name="no_of_recruitment"/>
<field name="expected_employees"/>
<field name="no_of_hired_employee"/>
<field name="state"/>
<field name="message_needaction" invisible="1"/>
</tree>
</field>
</record>
<record id="view_job_filter" model="ir.ui.view">
<field name="name">Job</field>
<field name="model">hr.job</field>
<field name="arch" type="xml">
<search string="Jobs">
<field name="name" string="Job"/>
<filter domain="[('state','=','open')]" string="In Position"/>
<filter domain="[('state','=','recruit')]" string="In Recruitment" name="in_recruitment"/>
<field name="department_id"/>
<separator/>
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<group expand="0" string="Group By">
<filter string="Department" domain="[]" context="{'group_by':'department_id'}"/>
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Company" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_hr_job">
<field name="name">Job Positions</field>
<field name="res_model">hr.job</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_job_filter"/>
<field name="context">{"search_default_Current":1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new job position.
</p><p>
Job Positions are used to define jobs and their requirements.
You can keep track of the number of employees you have per job
position and follow the evolution according to what you planned
for the future.
</p><p>
You can attach a survey to a job position. It will be used in
the recruitment process to evaluate the applicants for this job
position.
</p>
</field>
</record>
<record model="ir.actions.act_window" id="act_employee_from_department">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,form,tree</field>
<field name="search_view_id" ref="view_employee_filter"/>
<field name="context">{
"search_default_department_id": [active_id],
"default_department_id": active_id}
</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a new employee.
</p><p>
With just a quick glance on the Odoo employee screen, you
can easily find all the information you need for each person;
contact data, job position, availability, etc.
</p>
</field>
</record>
<!-- hr.department -->
<record id="view_department_form" model="ir.ui.view">
<field name="name">hr.department.form</field>
<field name="model">hr.department</field>
<field name="arch" type="xml">
<form string="department">
<sheet>
<group col="4">
<field name="name"/>
<field name="manager_id"/>
<field name="parent_id"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_department_tree" model="ir.ui.view">
<field name="name">hr.department.tree</field>
<field name="model">hr.department</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree string="Companies">
<field name="complete_name"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="manager_id"/>
</tree>
</field>
</record>
<record id="view_department_filter" model="ir.ui.view">
<field name="name">Departments</field>
<field name="model">hr.department</field>
<field name="arch" type="xml">
<search string="Departments">
<field name="name" string="Department"/>
<field name="manager_id" />
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
</search>
</field>
</record>
<record id="open_module_tree_department" model="ir.actions.act_window">
<field name="name">Departments</field>
<field name="res_model">hr.department</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,form</field>
<field name="search_view_id" ref="view_department_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a department.
</p><p>
Odoo's department structure is used to manage all documents
related to employees by departments: expenses, timesheets,
leaves and holidays, recruitments, etc.
</p>
</field>
</record>
<menuitem
action="open_module_tree_department"
id="menu_hr_department_tree"
parent="menu_hr_root"
sequence="1"
groups="base.group_hr_user"/>
</data>
</openerp>