odoo18/addons_extensions/cwf_timesheet/views/timesheet_view.xml

105 lines
4.7 KiB
XML

<odoo>
<record id="view_cwf_timesheet_calendar_form" model="ir.ui.view">
<field name="name">cwf.timesheet.calendar.form</field>
<field name="model">cwf.timesheet.calendar</field>
<field name="arch" type="xml">
<form string="CWF Timesheet Calendar">
<sheet>
<group>
<field name="name"/>
<button name="action_generate_weeks" string="Generate Week Periods" type="object"
class="oe_highlight"/>
</group>
<notebook>
<page string="Weeks">
<field name="week_period" context="{'order': 'week_start_date asc'}">
<list editable="bottom" decoration-success="status == 'submitted'">
<field name="name"/>
<field name="week_start_date"/>
<field name="week_end_date"/>
<field name="start_month" column_invisible="1"/>
<field name="end_month" column_invisible="1"/>
<field name="status"/>
<button name="send_timesheet_update_email" string="Send Update Email"
invisible="status == 'submitted'" type="object"
confirm="You can't revert this action. Please check twice before Submitting?"
class="oe_highlight"/>
</list>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_cwf_timesheet_calendar_list" model="ir.ui.view">
<field name="name">cwf.timesheet.calendar.list</field>
<field name="model">cwf.timesheet.calendar</field>
<field name="arch" type="xml">
<list>
<field name="name"/>
</list>
</field>
</record>
<record id="action_cwf_timesheet_calendar" model="ir.actions.act_window">
<field name="name">CWF Timesheet Calendar</field>
<field name="res_model">cwf.timesheet.calendar</field>
<field name="view_mode">list,form</field>
</record>
<menuitem id="menu_cwf_attendance_attendance" name="CWF" parent="hr_attendance.menu_hr_attendance_root"
sequence="6" groups="hr_employee_extended.group_external_user,hr_attendance.group_hr_attendance_manager"/>
<menuitem id="menu_timesheet_calendar_form" name="CWF Timesheet Calendar" parent="menu_cwf_attendance_attendance"
action="cwf_timesheet.action_cwf_timesheet_calendar" groups="hr_attendance.group_hr_attendance_manager"/>
<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="week_start_date" readonly="status != 'draft'"/>
<field name="week_end_date" readonly="status != 'draft'"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_timesheet_list" model="ir.ui.view">
<field name="name">cwf.timesheet.list</field>
<field name="model">cwf.timesheet</field>
<field name="arch" type="xml">
<list>
<field name="name"/>
<field name="week_start_date"/>
<field name="week_end_date"/>
</list>
</field>
</record>
<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>
</odoo>