image_original => image_1920 (now resized to 1920) image_big => image_1024 image_large => image_256 image_medium => image_128 image_small => image_64 image replaced by image_1920 (when writing) or by image_1024 (when displaying what was previously the big size) + add new intermediate format: image_512 PR: #34925
324 lines
17 KiB
XML
324 lines
17 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="act_hr_employee_2_hr_contract" model="ir.actions.act_window">
|
|
<field name="name">Contracts</field>
|
|
<field name="res_model">hr.contract</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="context">{
|
|
'search_default_employee_id': [active_id],
|
|
'default_employee_id': active_id,
|
|
'search_default_group_by_state': 1
|
|
}</field>
|
|
</record>
|
|
|
|
<record id="hr_hr_employee_view_form2" model="ir.ui.view">
|
|
<field name="name">hr.hr.employee.view.form2</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<div name="button_box" position="inside">
|
|
<button name="%(act_hr_employee_2_hr_contract)d"
|
|
class="oe_stat_button"
|
|
icon="fa-book"
|
|
type="action"
|
|
groups="hr_contract.group_hr_contract_manager">
|
|
<field name="contracts_count" widget="statinfo" string="Contracts"/>
|
|
</button>
|
|
</div>
|
|
<xpath expr="//field[@name='bank_account_id']" position="replace">
|
|
<field name="bank_account_id" context="{'display_partner':True}" attrs="{'invisible' : [('address_home_id', '=', False)]}"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='resource_calendar_id']" position="replace">
|
|
<field name="calendar_mismatch" invisible="1"/>
|
|
<label for="resource_calendar_id"/>
|
|
<div>
|
|
<field name="resource_calendar_id" required="1" nolabel="1"/>
|
|
<span attrs="{'invisible': [('calendar_mismatch', '=', False)]}"
|
|
class="fa fa-exclamation-triangle text-danger o_calendar_warning pl-3">
|
|
</span>
|
|
<span class="o_calendar_warning_tooltip text-danger">
|
|
Calendar Mismatch : The employee's calendar does not match its current contract calendar. This could lead to unexpected behaviors.
|
|
</span>
|
|
</div>
|
|
</xpath>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_employee_view_kanban" model="ir.ui.view">
|
|
<field name="name">hr.employee.view.kanban</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.hr_kanban_view_employees"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<xpath expr="//div[hasclass('o_kanban_record_headings')]" position="after">
|
|
<field name="contract_warning" invisible="1"/>
|
|
<t t-if="record.contract_warning.raw_value">
|
|
<i class="fa fa-exclamation-triangle text-danger" role="img"
|
|
title="There is something wrong with the contract. Either there is no running contract for this employee or employee's contract is about to expire."
|
|
aria-label="There is something wrong with the contract. Either there is no running contract for this employee or employee's contract is about to expire."></i>
|
|
</t>
|
|
</xpath>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_employee_view_search" model="ir.ui.view">
|
|
<field name="name">hr.employee.view.search</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.view_employee_filter"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<xpath expr="." position="inside">
|
|
<filter string="Contract Warning" name="with_contract_warning" domain="[('contract_warning', '=', True)]"/>
|
|
</xpath>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_user_view_form" model="ir.ui.view">
|
|
<field name="name">hr.user.preferences.view.form.contract.inherit</field>
|
|
<field name="model">res.users</field>
|
|
<field name="inherit_id" ref="hr.res_users_view_form_profile"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='employee_bank_account_id']" position="replace">
|
|
<field name="employee_bank_account_id" context="{'display_partner':True}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_contract_view_search" model="ir.ui.view">
|
|
<field name="name">hr.contract.search</field>
|
|
<field name="model">hr.contract</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Contract">
|
|
<field name="name" string="Contracts"/>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
<field name="resource_calendar_id"/>
|
|
<field name="employee_id"/>
|
|
<field name="department_id" operator="child_of"/>
|
|
<field name="state"/>
|
|
<filter string="Running" name="running" domain="[('state', '=', 'open')]"/>
|
|
<filter string="To Renew / Expires Soon" name="to_renew" domain="['&', ('state', '=', 'open'), ('kanban_state', '=', 'blocked')]"/>
|
|
<separator />
|
|
<filter string="Current Employee" name="current_employee" domain="[('employee_id.active','=',True)]"/>
|
|
<separator/>
|
|
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
|
<separator/>
|
|
<filter string="Important Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
|
|
<group expand="0" string="Group By">
|
|
<filter string="Employee" name="employee" domain="[]" context="{'group_by':'employee_id'}"/>
|
|
<filter string="Job" name="job" domain="[]" context="{'group_by':'job_id'}"/>
|
|
<filter string="State" name='group_by_state' domain="[]" context="{'group_by': 'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_contract_view_form" model="ir.ui.view">
|
|
<field name="name">hr.contract.form</field>
|
|
<field name="model">hr.contract</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Current Contract">
|
|
<header>
|
|
<field name="state" widget="statusbar" options="{'clickable': '1'}"/>
|
|
</header>
|
|
<sheet>
|
|
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
|
<div class="oe_button_box" name="button_box"/>
|
|
<div class="oe_title" name="title">
|
|
<div class="oe_edit_only">
|
|
<div class="float-left">
|
|
<field name="kanban_state" widget="state_selection" class="mr-2"/>
|
|
</div>
|
|
<label for="name"/>
|
|
</div>
|
|
<h1>
|
|
<div class="float-left oe_read_only">
|
|
<field name="kanban_state" widget="state_selection" class="mr-2"/>
|
|
</div>
|
|
<field name="name" placeholder="Contract Reference"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="active" invisible="1"/>
|
|
<field name="employee_id"/>
|
|
<field name="department_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="job_id"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Contract Details" name="other">
|
|
<group>
|
|
<group name="duration_group" string="Contract Terms">
|
|
<field name="date_start"/>
|
|
<label for="date_end"/>
|
|
<div class="o_row">
|
|
<field name="date_end" nolabel="1"/>
|
|
<span class="text-muted">(If fixed-term contract)</span>
|
|
</div>
|
|
<field name="trial_date_end"/>
|
|
<field name="calendar_mismatch" invisible="1"/>
|
|
<label for="resource_calendar_id"/>
|
|
<div>
|
|
<field name="resource_calendar_id" required="1" nolabel="1"/>
|
|
<span attrs="{'invisible': ['|', ('calendar_mismatch', '=', False), ('state', '!=', 'open')]}"
|
|
class="fa fa-exclamation-triangle text-danger o_calendar_warning pl-3">
|
|
</span>
|
|
<span class="o_calendar_warning_tooltip text-danger">
|
|
Calendar Mismatch : The employee's calendar does not match this contract's calendar. This could lead to unexpected behaviors.
|
|
</span>
|
|
</div>
|
|
<field name="hr_responsible_id"/>
|
|
</group>
|
|
</group>
|
|
<group string="Notes">
|
|
<field name="notes" nolabel="1"/>
|
|
</group>
|
|
</page>
|
|
<page string="Salary Information" name="information">
|
|
<group name="main_info">
|
|
<group name="salary_and_advantages" string="Monthly Advantages in Cash">
|
|
<label for="wage"/>
|
|
<div class="o_row" name="wage">
|
|
<field name="wage" nolabel="1"/>
|
|
<span>/ month</span>
|
|
</div>
|
|
<field name="advantages" nolabel="1" placeholder="Advantages..." colspan="2" invisible="1"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
|
|
<field name="activity_ids" widget="mail_activity"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_contract_view_tree" model="ir.ui.view">
|
|
<field name="name">hr.contract.tree</field>
|
|
<field name="model">hr.contract</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Contracts"
|
|
decoration-bf="message_needaction == True"
|
|
decoration-info="state == 'draft'"
|
|
decoration-muted="state in ('close', 'cancel')"
|
|
decoration-danger="state == 'pending'">
|
|
<field name="name"/>
|
|
<field name="employee_id"/>
|
|
<field name="job_id"/>
|
|
<field name="resource_calendar_id"/>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
<field name="state"/>
|
|
<field name="kanban_state" widget="state_selection" readonly="1"/>
|
|
<field name="wage" invisible="1"/>
|
|
<field name="message_needaction" invisible="1"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_contract_view_kanban" model="ir.ui.view">
|
|
<field name="name">hr.contract.kanban</field>
|
|
<field name="model">hr.contract</field>
|
|
<field name="arch" type="xml">
|
|
<kanban class="o_kanban_small_column" default_order="date_end">
|
|
<field name="employee_id"/>
|
|
<field name="activity_state"/>
|
|
<field name="state"/>
|
|
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_kanban_card oe_kanban_global_click">
|
|
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
|
|
<a class="dropdown-toggle o-no-caret btn" role="button" data-toggle="dropdown" href="#" aria-label="Dropdown menu" title="Dropdown menu">
|
|
<span class="fa fa-ellipsis-v"/>
|
|
</a>
|
|
<div class="dropdown-menu" role="menu">
|
|
<t t-if="widget.editable"><a role="menuitem" type="edit" class="dropdown-item">Edit Contract</a></t>
|
|
<t t-if="widget.deletable"><a role="menuitem" type="delete" class="dropdown-item">Delete</a></t>
|
|
</div>
|
|
</div>
|
|
<div class="oe_kanban_content">
|
|
<div class="o_hr_contract_state">
|
|
<field name="kanban_state" widget="state_selection" />
|
|
<strong class="o_kanban_record_title">
|
|
<field name="name"/>
|
|
</strong>
|
|
</div>
|
|
<div class="text-muted o_kanban_record_subtitle o_hr_contract_job_id">
|
|
<field name="job_id"/>
|
|
</div>
|
|
<div class="oe_kanban_bottom_right">
|
|
<img t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
|
|
</div>
|
|
</div>
|
|
<div class="oe_clear"></div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_contract_view_activity" model="ir.ui.view">
|
|
<field name="name">hr.contract.activity</field>
|
|
<field name="model">hr.contract</field>
|
|
<field name="arch" type="xml">
|
|
<activity string="Contracts">
|
|
<field name="employee_id"/>
|
|
<templates>
|
|
<div t-name="activity-box">
|
|
<img t-att-src="activity_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
|
|
<div>
|
|
<field name="name" display="full"/>
|
|
<field name="job_id" muted="1" display="full"/>
|
|
</div>
|
|
</div>
|
|
</templates>
|
|
</activity>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_hr_contract" model="ir.actions.act_window">
|
|
<field name="name">Contracts</field>
|
|
<field name="res_model">hr.contract</field>
|
|
<field name="view_mode">kanban,tree,form,activity</field>
|
|
<field name="domain">[('employee_id', '!=', False)]</field>
|
|
<field name="context">{'search_default_current':1, 'search_default_group_by_state': 1}</field>
|
|
<field name="search_view_id" ref="hr_contract_view_search"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new contract
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem
|
|
id="menu_human_resources_configuration_contract"
|
|
name="Contracts"
|
|
parent="hr.menu_human_resources_configuration"
|
|
sequence="3"/>
|
|
|
|
<menuitem
|
|
id="hr_menu_contract"
|
|
name="Contracts"
|
|
action="action_hr_contract"
|
|
parent="hr.menu_hr_employee_payroll"
|
|
sequence="4"
|
|
groups="hr_contract.group_hr_contract_manager"/>
|
|
|
|
|
|
</odoo>
|