Files
tra_backend/hr_employee_shift/views/hr_employee_shift_view.xml
2020-07-27 13:29:07 +05:30

96 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="employee_form_inherited" model="ir.ui.view">
<field name="name">hr.employee.resource</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='public']//field[@name='resource_calendar_id']" position="replace">
<field name="resource_calendar_ids"/>
</xpath>
</field>
</record>
<record id="resource_calendar_form" model="ir.ui.view">
<field name="name">resource.calendar</field>
<field name="model">resource.calendar</field>
<field name="inherit_id" ref="resource.resource_calendar_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after" style="height:30px;width:200px">
<group>
<field name="hr_department" style="height:30px;width:200px;font-size:16px;" />
<field name="sequence" style="height:30px;width:200px;font-size:20px;"/>
</group>
<field name="color" invisible="1"/>
</xpath>
<xpath expr="//field[@name='attendance_ids']" position="replace">
<field name="attendance_ids"/>
</xpath>
</field>
</record>
<record id="shift_template_kanban_view" model="ir.ui.view">
<field name="name">employee.shift.kanban</field>
<field name="model">resource.calendar</field>
<field name="arch" type="xml">
<kanban class="oe_background_grey o_kanban_dashboard o_shift_kanban">
<field name="color"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click ">
<div class="o_dropdown_kanban dropdown">
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#" >
<span class="fa fa-bars fa-lg"/>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<t t-if="widget.editable"><li><a type="edit">Edit</a></li></t>
<t t-if="widget.deletable"><li><a type="delete">Delete</a></li></t>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
</div>
<div class="oe_kanban_content">
<div class="row">
<div class="o_primary style_shift">
<div class="text-center"><span style="margin-left:25px;"><strong><field name="name"/></strong></span></div>
</div>
</div>
</div>
<div class="oe_kanban_details">
<strong>
<div class="text-center">
<span t-if="record.hr_department.value">[<field name="hr_department"/>]</span>
</div>
</strong>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="resource.action_resource_calendar_form" model="ir.actions.act_window">
<field name="name">Shift Working Time</field>
<field name="res_model">resource.calendar</field>
<field name="view_mode">kanban,tree,form</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="resource.view_resource_calendar_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Define working hours and time table that could be scheduled to your project members
</p>
</field>
</record>
<menuitem name="Shifts" id="menu_shift"
groups="hr.group_hr_manager"
web_icon="hr_employee_shift,static/description/icon2.png"/>
<menuitem name="Configuration" id="shift_configuration" parent="hr_employee_shift.menu_shift"/>
<menuitem name="Shifts" id="menu_conf_shift" parent="shift_configuration"
action="resource.action_resource_calendar_form"/>
</data>
</odoo>