Files
gzth/yuthon_hr_attendance/views/hr_attendance_views.xml
T
2024-12-17 19:40:33 +08:00

207 lines
13 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_attendance_going_tree2" model="ir.ui.view">
<field name="name">hr.attendance.going.tree2</field>
<field name="model">hr.attendance</field>
<field name="arch" type="xml">
<tree string="出勤" decoration-danger="abnormal == 1"
edit="false" delete="false" create="false"
editable="bottom" banner_route="/attendance/banner/route">
<field name="employee_id" widget="many2one_avatar_user"/>
<field name="is_clock_card" optional="show" class="list_width"/>
<field name="is_no_card" optional="show" class="list_width"/>
<field name="is_early_card" optional="show" class="list_width"/>
<field name="is_late_card" optional="show" class="list_width"/>
<field name="is_abnormal" optional="show" class="list_width"/>
<field name="week" optional="show"/>
<field name="abnormal" optional="show" column_invisible="1"/>
<field name="work_time_type" optional="hidden"/>
<field name="check_in" optional="show" widget="time"/>
<field name="check_out" optional="show" widget="time"/>
<field name="is_approval" column_invisible="1"/>
<button name="button_leave" type="object" string="请假" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_card_approval" type="object" string="补卡" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_duty_approval" type="object" string="外出" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_correct_approval" type="object" string="修正" class="oe_highlight"
invisible="not is_abnormal"/>
</tree>
</field>
</record>
<!-- 保安部 -->
<record id="view_attendance_going_tree3" model="ir.ui.view">
<field name="name">hr.attendance.going.tree3</field>
<field name="model">hr.attendance</field>
<field name="arch" type="xml">
<tree string="出勤" decoration-danger="abnormal == 1"
edit="false" delete="false" create="false"
editable="bottom" banner_route="/attendance/banner/route">
<field name="employee_id" widget="many2one_avatar_user"/>
<field name="is_no_card" optional="show" class="list_width"/>
<field name="is_early_card" optional="show" class="list_width"/>
<field name="is_late_card" optional="show" class="list_width"/>
<field name="is_abnormal" optional="show" class="list_width"/>
<field name="week" optional="show"/>
<field name="abnormal" optional="show" column_invisible="1"/>
<field name="work_time_type" optional="hidden"/>
<field name="check_in" optional="show" widget="time"/>
<field name="check_out" optional="show" widget="time"/>
<field name="shift_name" optional="show"/>
<field name="is_approval" column_invisible="1"/>
<button name="button_leave" type="object" string="请假" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_card_approval" type="object" string="补卡" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_duty_approval" type="object" string="外出" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_correct_approval" type="object" string="修正" class="oe_highlight"
invisible="not is_abnormal"/>
</tree>
</field>
</record>
<!-- 工程部 -->
<record id="view_attendance_going_tree4" model="ir.ui.view">
<field name="name">hr.attendance.going.tree4</field>
<field name="model">hr.attendance</field>
<field name="arch" type="xml">
<tree string="出勤" decoration-danger="abnormal == 1"
edit="false" delete="false" create="false"
editable="bottom" banner_route="/attendance/banner/route">
<field name="employee_id" widget="many2one_avatar_user"/>
<field name="is_no_card" optional="show" class="list_width"/>
<field name="is_early_card" optional="show" class="list_width"/>
<field name="is_late_card" optional="show" class="list_width"/>
<field name="is_abnormal" optional="show" class="list_width"/>
<field name="week" optional="show"/>
<field name="abnormal" optional="show" column_invisible="1"/>
<field name="work_time_type" optional="hidden"/>
<field name="check_in" optional="show" widget="time"/>
<field name="noon_duty" optional="show" widget="time"/>
<field name="night_duty" optional="show" widget="time"/>
<field name="check_out" optional="show" widget="time"/>
<field name="shift_name" optional="show"/>
<field name="is_approval" column_invisible="1"/>
<button name="button_leave" type="object" string="请假" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_card_approval" type="object" string="补卡" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_duty_approval" type="object" string="外出" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_correct_approval" type="object" string="修正" class="oe_highlight"
invisible="not is_abnormal"/>
</tree>
</field>
</record>
<!--联安粮库-->
<record id="view_attendance_going_tree5" model="ir.ui.view">
<field name="name">hr.attendance.going.tree5</field>
<field name="model">hr.attendance</field>
<field name="arch" type="xml">
<tree string="出勤" decoration-danger="abnormal == 1"
edit="false" delete="false" create="false"
editable="bottom" banner_route="/attendance/banner/route">
<field name="employee_id" widget="many2one_avatar_user"/>
<field name="is_no_card" optional="show" class="list_width"/>
<field name="is_early_card" optional="show" class="list_width"/>
<field name="is_late_card" optional="show" class="list_width"/>
<field name="is_abnormal" optional="show" class="list_width"/>
<field name="week" optional="show"/>
<field name="abnormal" optional="show" column_invisible="1"/>
<field name="work_time_type" optional="hidden"/>
<field name="check_in" optional="show" widget="time"/>
<field name="noon_duty" optional="show" widget="time"/>
<field name="check_out" optional="show" widget="time"/>
<field name="shift_name" optional="show"/>
<field name="is_approval" column_invisible="1"/>
<button name="button_leave" type="object" string="请假" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_card_approval" type="object" string="补卡" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_duty_approval" type="object" string="外出" class="oe_highlight"
invisible="not is_abnormal"/>
<button name="button_correct_approval" type="object" string="修正" class="oe_highlight"
invisible="not is_abnormal"/>
</tree>
</field>
</record>
<record id="view_attendance_going_action" model="ir.actions.act_window">
<field name="name">出勤</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
</record>
<record id="hr_attendance.hr_attendance_action" model="ir.actions.act_window">
<field name="name">全部考勤</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('employee_id.resource_calendar_id.name', '=', '行政考勤')]</field>
</record>
<record id="hr_attendance_action1" model="ir.actions.act_window">
<field name="name">我的考勤</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('employee_id.user_id', '=', uid), ('week', 'not in', ['seven', 'six'])]</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_attendance_going_tree2')})]"/>
</record>
<record id="hr_attendance_action_is_abnormal" model="ir.actions.act_window">
<field name="name">我的异常</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('employee_id.user_id', '=', uid), ('abnormal', '=', 1), ('week', 'not in', ['seven', 'six'])]
</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_attendance_going_tree2')})]"/>
</record>
<record id="action_attendance_yuthon_company_form1" model="ir.actions.act_window">
<field name="name">天河投资</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_employee": 1}</field>
<field name="domain">[('employee_id.yuthon_company','=','thtz'), ('week', 'not in', ['seven', 'six'])]]</field>
</record>
<record id="action_attendance_yuthon_company_form2" model="ir.actions.act_window">
<field name="name">天河粮储</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_employee": 1}</field>
<field name="domain">[('employee_id.yuthon_company', '=', 'thlc'), ('week', 'not in', ['seven', 'six'])]]</field>
</record>
<record id="action_attendance_yuthon_company_form3" model="ir.actions.act_window">
<field name="name">天河物管</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_employee": 1}</field>
<field name="domain">[('employee_id.yuthon_company', '=', 'thwg'), ('week', 'not in', ['seven', 'six'])]]</field>
</record>
<record id="hr_attendance_action2" model="ir.actions.act_window">
<field name="name">考勤记录</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree</field>
<field name="context">{"search_default_employee": 1}</field>
<field name="domain">[('employee_id.department_id.name','in',['保安部', '班组A', '班组B','班组C'])]</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_attendance_going_tree3')})]"/>
</record>
<record id="hr_attendance_action3" model="ir.actions.act_window">
<field name="name">考勤记录</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree</field>
<field name="context">{"search_default_employee": 1}</field>
<field name="domain">[('employee_id.department_id.name','in',['工程部', '运行班', '高压班','综合班'])]]</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_attendance_going_tree4')})]"/>
</record>
<record id="hr_attendance_action4" model="ir.actions.act_window">
<field name="name">考勤记录</field>
<field name="res_model">hr.attendance</field>
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_employee": 1}</field>
<field name="domain">[('employee_id.department_id.name','in',['仓储组', '综合组','保管组', '机安组', '1库', '2库', '3库', '联安粮库'])]]</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_attendance_going_tree5')})]"/>
</record>
</odoo>