Files
tra_backend/attendance_regularization/views/regularization_views.xml
2020-07-21 10:09:46 +00:00

95 lines
5.0 KiB
XML
Executable File

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_regular_tree1" model="ir.ui.view">
<field name="name">attendance.regular_tree</field>
<field name="model">attendance.regular</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Attendance Regularization">
<field name="employee_id"/>
<field name="reg_category"/>
<field name="from_date"/>
<field name="reg_reason"/>
<field name="to_date"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_view_regularization1">
<field name="name">Regularization Request</field>
<field name="res_model">attendance.regular</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="help" type="html">
<p class="oe_view_no_content_create">Create new Request
</p>
</field>
</record>
<menuitem id="regular_onsight" name="Attendance Regularization" parent="hr_attendance.menu_hr_attendance_root"
sequence="15" groups="base.group_user" action="action_view_regularization1"/>
<record id="view_regular_approve_tree" model="ir.ui.view">
<field name="name">attendance.regular_request_tree</field>
<field name="model">attendance.regular</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Approve Regularization">
<field name="employee_id"/>
<field name="reg_category"/>
<field name="from_date"/>
<field name="reg_reason"/>
<field name="to_date"/>
</tree>
</field>
</record>
<record id="attendance_regular11" model="ir.ui.view">
<field name="name">attend.regular</field>
<field name="model">attendance.regular</field>
<field name="arch" type="xml">
<form string="Regularization">
<header>
<button name="submit_reg" string="Submit" type="object" class="btn-primary"
attrs="{'invisible': [('state_select','not in','draft')]}"/>
<button name="regular_approval" type="object" string="Approve" class="oe_highlight"
groups="hr_attendance.group_hr_attendance_manager"
attrs="{'invisible': [('state_select','not in','requested')]}"/>
<button name="regular_rejection" type="object" string="Reject" class="oe_highlight"
groups="hr_attendance.group_hr_attendance_manager"
attrs="{'invisible': [('state_select','not in','requested')]}"/>
<field name="state_select" widget="statusbar" statusbar_visible="draft,requested,approved"/>
</header>
<sheet>
<group col="4" colspan="4">
<field name="reg_category" attrs="{'readonly':[('state_select','=','approved')]}"/>
<field name="from_date" attrs="{'readonly':[('state_select','=','approved')]}"/>
<field name="reg_reason" attrs="{'readonly':[('state_select','=','approved')]}"/>
<field name="to_date" attrs="{'readonly':[('state_select','=','approved')]}"/>
<field name="employee_id" attrs="{'readonly':[('state_select','=','approved')]}"/>
</group>
</sheet>
<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"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_view_request_regularization">
<field name="name">Attendance Regularization Approval</field>
<field name="res_model">attendance.regular</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state_select','!=','approved'),('state_select','!=','reject')]</field>
<field name="help" type="html">
<p class="oe_view_no_content_create">Create new Record
</p>
</field>
</record>
<menuitem id="approving_regular"
name="Regularization Approval"
parent="hr_attendance.menu_hr_attendance_manage_attendances"
sequence="25"
action="action_view_request_regularization"
groups="hr_attendance.group_hr_attendance_manager"/>
</data>
</odoo>