84 lines
4.1 KiB
XML
84 lines
4.1 KiB
XML
<odoo>
|
|
|
|
<record id="action_cwf_timesheet" model="ir.actions.act_window">
|
|
<field name="name">CWF Timesheet</field>
|
|
<field name="res_model">cwf.timesheet</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
<record id="view_timesheet_form" model="ir.ui.view">
|
|
<field name="name">cwf.timesheet.form</field>
|
|
<field name="model">cwf.timesheet</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Timesheet">
|
|
<header>
|
|
<button name="send_timesheet_update_email" string="Send Email" type="object" invisible="status != 'draft'"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name"/>
|
|
<h1><field name="name" class="oe_inline" readonly="status != 'draft'"/></h1>
|
|
</div>
|
|
<group>
|
|
<!-- Section for Employee and Date Range -->
|
|
<group>
|
|
<field name="department_id" readonly="status != 'draft'"/>
|
|
<field name="week_start_date" readonly="status != 'draft'"/>
|
|
<field name="week_end_date" readonly="status != 'draft'"/>
|
|
</group>
|
|
<!-- Section for Hours and Status -->
|
|
<group>
|
|
<field name="total_hours" readonly="status != 'draft'"/>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_timesheet_form" name="Timesheet Form" parent="hr_attendance_extended.menu_attendance_attendance" action="action_cwf_timesheet"/>
|
|
|
|
<record id="action_cwf_timesheet_line" model="ir.actions.act_window">
|
|
<field name="name">CWF Timesheet Lines</field>
|
|
<field name="res_model">cwf.timesheet.line</field>
|
|
<field name="view_mode">list</field>
|
|
<field name="context">{'search_default_group_by_employee_id':1}</field>
|
|
</record>
|
|
<record id="view_cwf_timesheet_line_list" model="ir.ui.view">
|
|
<field name="name">cwf.timesheet.line.list</field>
|
|
<field name="model">cwf.timesheet.line</field>
|
|
<field name="arch" type="xml">
|
|
<list editable="bottom" create="0" delete="0" decoration-success="is_updated == True">
|
|
<field name="employee_id" readonly="1" force_save="1"/>
|
|
<field name="week_day" readonly="1" force_save="1"/>
|
|
<field name="check_in_date" readonly="is_updated == True"/>
|
|
<field name="check_out_date" readonly="is_updated == True"/>
|
|
<field name="state_type" readonly="is_updated == True"/>
|
|
<button name="action_submit" type="object" string="Submit" class="btn btn-outline-primary" invisible="is_updated == True"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_timesheet_form_line" name="Week Timesheet " parent="hr_attendance_extended.menu_attendance_attendance" action="action_cwf_timesheet_line"/>
|
|
|
|
|
|
<record id="view_cwf_timesheet_line_search" model="ir.ui.view">
|
|
<field name="name">cwf.timesheet.line.search</field>
|
|
<field name="model">cwf.timesheet.line</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Timesheets">
|
|
<field name="employee_id"/>
|
|
<field name="week_id"/>
|
|
<field name="week_day"/>
|
|
<field name="check_in_date"/>
|
|
<field name="check_out_date"/>
|
|
<field name="state_type"/>
|
|
<group expand="0" string="Group By">
|
|
<filter string="Employee" name="employee_id" domain="[]" context="{'group_by':'employee_id'}"/>
|
|
<filter string="Week" name="week_id" domain="[]" context="{'group_by':'week_id'}"/>
|
|
<filter string="Status" name ="state_type" domain="[]" context="{'group_by': 'state_type'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
</odoo>
|