You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

93 lines
3.9 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Sequence for late.check.in model-->
<record id="late_check_in_sequence" model="ir.sequence">
<field name="name">late.check.in.sequence</field>
<field name="code">late.check.in</field>
<field name="prefix">LC</field>
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
<field name="padding">5</field>
</record>
<!-- Views -->
<!-- Form View -->
<record id="late_check_in_view_form" model="ir.ui.view">
<field name="name">late.check.in.view.form</field>
<field name="model">late.check.in</field>
<field name="arch" type="xml">
<form string="Late Check-in" create="false">
<header>
<field name="state" widget="statusbar"
statusbar_visible="draft,approved"/>
<button name="approve" string="Approve"
type="object" class="btn-primary" invisible="state != 'draft'"
groups="hr.group_hr_manager"/>
<button name="reject" string="Refuse" type="object"
class="btn-primary" invisible="state != 'draft'"
groups="hr.group_hr_manager"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name" required="0"
placeholder="Reference ...."/>
</h1>
</div>
<group>
<group>
<field name='employee_id'
options="{'no_quick_create': True, 'no_create_edit' : True}"
invisible="state != 'draft'"/>
<field name='late_minutes'/>
</group>
<group>
<field name='date'/>
<field name="penalty_amount"/>
<field name="attendance_id"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!--Search View-->
<record id="late_check_in_view_search" model="ir.ui.view">
<field name="name">late.check.in.view.search</field>
<field name="model">late.check.in</field>
<field name="arch" type="xml">
<search string="Search Late check-in records">
<group expand="0" string="Group By">
<filter string="Employee" name="group_employee" domain="[]"
context="{'group_by':'employee_id'}"/>
</group>
</search>
</field>
</record>
<!-- Tree View -->
<record id="late_check_in_view_tree" model="ir.ui.view">
<field name="name">late.check.in.view.list</field>
<field name="model">late.check.in</field>
<field name="arch" type="xml">
<list string="Late Check-in">
<field name="name"/>
<field name="employee_id"/>
<field name="late_minutes"/>
<field name="date"/>
<field name="penalty_amount"/>
</list>
</field>
</record>
<!-- Actions -->
<record id="late_check_in_action" model="ir.actions.act_window">
<field name="name">Late Check-in</field>
<field name="res_model">late.check.in</field>
<field name="view_mode">list,form</field>
<field name="context">{'search_default_group_employee': 1}</field>
</record>
<!-- MenuItems -->
<menuitem id="menu_late_check_in" name="Late Check-in"
parent="hr_attendance.menu_hr_attendance_root"
action="late_check_in_action"
sequence="21"
groups="hr.group_hr_user"/>
</odoo>