mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-27 22:12:04 +02:00
Initial commit: Hr packages
This commit is contained in:
commit
62531cd146
2820 changed files with 1432848 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="hr_employee_view_form_inherit" model="ir.ui.view">
|
||||
<field name="name">hr.holidays.attendance.employee.view.form.inherit</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="priority" eval="120"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<button
|
||||
name="%(hr_leave_allocation_overtime_manager_action)d"
|
||||
string="Deduct Extra Hours"
|
||||
type="action"
|
||||
groups="hr_holidays.group_hr_holidays_user"
|
||||
context="{'default_employee_id': id, 'deduct_extra_hours': True}"
|
||||
attrs="{'invisible': [('total_overtime', '<=', 1)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- TODO: remove in master -->
|
||||
<record id="hr_employee_view_form" model="ir.ui.view">
|
||||
<field name="name">hr.employee.holidays.attendance.inherit</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr_attendance.view_employee_form_inherit_hr_attendance"/>
|
||||
<field name="priority" eval="125" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='hr_presence_status']" position="attributes">
|
||||
<attribute name="attrs">
|
||||
{'invisible': False}
|
||||
</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version='1.0' encoding='UTF-8' ?>
|
||||
<odoo>
|
||||
<record id="hr_attendance_holidays_hr_leave_allocation_view_form_inherit" model="ir.ui.view">
|
||||
<field name="model">hr.leave.allocation</field>
|
||||
<field name="inherit_id" ref="hr_holidays.hr_leave_allocation_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="(//div[@name='duration_display']/span)[last()]" position="after">
|
||||
<field name="hr_attendance_overtime" invisible="1" />
|
||||
<field name="overtime_deductible" invisible="1" />
|
||||
<field name="employee_overtime" invisible="1" />
|
||||
<div class="oe_inline"
|
||||
attrs="{'invisible': ['|', '|', '|',
|
||||
('hr_attendance_overtime', '=', False), ('employee_id', '=', False),
|
||||
('overtime_deductible', '=', False), ('employee_overtime', '<=', 0)]}">
|
||||
<field name="employee_overtime" nolabel="1" widget="float_time" class="text-success" /> Extra Hours Available
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_leave_allocation_overtime_view_form" model="ir.ui.view">
|
||||
<field name="model">hr.leave.allocation</field>
|
||||
<field name="inherit_id" ref="hr_attendance_holidays_hr_leave_allocation_view_form_inherit" />
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority">60</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<div name="button_box" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</div>
|
||||
<xpath expr="//field[@name='holiday_status_id']" position="attributes">
|
||||
<attribute name="domain">[('overtime_deductible', '=', True), ('requires_allocation', '=', 'yes'), ('employee_requests', '=', 'yes')]</attribute>
|
||||
<attribute name="options">{'no_create': True, 'no_open': True}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//sheet" position="after">
|
||||
<footer>
|
||||
<button string="Save" special="save" class="btn btn-primary" close="1" />
|
||||
<button string="Discard" special="cancel" class="btn-secondary" close="1" />
|
||||
</footer>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_leave_allocation_overtime_manager_view_form" model="ir.ui.view">
|
||||
<field name="model">hr.leave.allocation</field>
|
||||
<field name="inherit_id" ref="hr_leave_allocation_overtime_view_form" />
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority">70</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='holiday_status_id']" position="attributes">
|
||||
<attribute name="domain">[('overtime_deductible', '=', True), ('requires_allocation', '=', 'yes')]</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_leave_allocation_overtime_action" model="ir.actions.act_window">
|
||||
<field name="name">New Allocation Request</field>
|
||||
<field name="res_model">hr.leave.allocation</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0), (0, 0, {'view_mode': 'form', 'view_id': ref('hr_leave_allocation_overtime_view_form')})]"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_leave_allocation_overtime_manager_action" model="ir.actions.act_window">
|
||||
<field name="name">New Allocation Request</field>
|
||||
<field name="res_model">hr.leave.allocation</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0), (0, 0, {'view_mode': 'form', 'view_id': ref('hr_leave_allocation_overtime_manager_view_form')})]"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="hr_leave_type_view_form" model="ir.ui.view">
|
||||
<field name="name">hr.leave.type.view.form.inherit</field>
|
||||
<field name="model">hr.leave.type</field>
|
||||
<field name="inherit_id" ref="hr_holidays.edit_holiday_status_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='request_unit']" position="after">
|
||||
<field name="hr_attendance_overtime" invisible="1" />
|
||||
<field name="overtime_deductible" attrs="{'invisible': [('hr_attendance_overtime', '=', False)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version='1.0' encoding='UTF-8' ?>
|
||||
<odoo>
|
||||
<record id="hr_leave_view_form" model="ir.ui.view">
|
||||
<field name="model">hr.leave</field>
|
||||
<field name="inherit_id" ref="hr_holidays.hr_leave_view_form_manager" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="(//div[@name='duration_display']/div)[last()]" position="after">
|
||||
<field name="overtime_deductible" invisible="1" />
|
||||
<field name="employee_overtime" invisible="1" />
|
||||
<div attrs="{'invisible': ['|', '|', ('employee_id', '=', False), ('overtime_deductible', '=', False), ('employee_overtime', '<=', 0)]}">
|
||||
<field name="employee_overtime" nolabel="1" widget="float_time" class="text-success" style="width: 6rem;" /> Extra Hours Available
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="res_users_view_form" model="ir.ui.view">
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="hr.res_users_view_form_profile"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<field name="employee_id" invisible="1" />
|
||||
<field name="request_overtime" invisible="1" />
|
||||
<button
|
||||
name="%(hr_leave_allocation_overtime_action)d"
|
||||
string="Deduct Extra Hours"
|
||||
type="action"
|
||||
context="{'default_employee_id': employee_id, 'deduct_extra_hours': True, 'deduct_extra_hours_employee_request': True}"
|
||||
attrs="{'invisible': [('request_overtime', '=', False)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue