summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/hr_attendance/views/hr_employee_view.xml39
1 files changed, 12 insertions, 27 deletions
diff --git a/addons/hr_attendance/views/hr_employee_view.xml b/addons/hr_attendance/views/hr_employee_view.xml
index 288d3b50b67..eb3faf66f49 100644
--- a/addons/hr_attendance/views/hr_employee_view.xml
+++ b/addons/hr_attendance/views/hr_employee_view.xml
@@ -7,11 +7,18 @@
<field name="priority">10</field>
<field name="groups_id" eval="[(4,ref('hr_attendance.group_hr_attendance_user'))]"/>
<field name="arch" type="xml">
- <field name="name" position="replace">
- <div id="textbox">
- <field name="name" placeholder="Employee's Name"/>
- </div>
- </field>
+ <xpath expr="//button[@name='toggle_active']" position="before">
+ <field name="attendance_state" invisible="1"/>
+ <button name="%(hr_attendance_action_employee)d"
+ class="oe_stat_button"
+ type="action" attrs="{'invisible': [('attendance_state', '=', False)]}">
+ <div id="oe_hr_attendance_status" class="fa fa-fw fa-user o_button_icon oe_hr_attendance_status_green" attrs="{'invisible': [('attendance_state', '=', 'checked_out')]}"/>
+ <div id="oe_hr_attendance_status" class="fa fa-fw fa-user o_button_icon oe_hr_attendance_status_red" attrs="{'invisible': [('attendance_state', '=', 'checked_in')]}"/>
+ <div class="o_stat_info">
+ <span class="o_stat_text">Attendance</span>
+ </div>
+ </button>
+ </xpath>
<xpath expr="//group[@name='active_group']" position="after">
<group string='Attendance' groups="hr_attendance.group_hr_attendance_user">
<field name="barcode"/>
@@ -22,28 +29,6 @@
</field>
</record>
- <record id="view_employee_form_inherit_hr_attendance_stat" model="ir.ui.view">
- <field name="name">hr.employee.inherit</field>
- <field name="model">hr.employee</field>
- <field name="inherit_id" ref="hr.view_employee_form"/>
- <field name="arch" type="xml">
- <data>
- <xpath expr="//button[@name='toggle_active']" position="before">
- <field name="attendance_state" invisible="1"/>
- <button name="%(hr_attendance_action_employee)d"
- class="oe_stat_button"
- type="action" attrs="{'invisible': [('attendance_state', '=', False)]}">
- <div id="oe_hr_attendance_status" class="fa fa-fw fa-user o_button_icon oe_hr_attendance_status_green" attrs="{'invisible': [('attendance_state', '=', 'checked_out')]}"/>
- <div id="oe_hr_attendance_status" class="fa fa-fw fa-user o_button_icon oe_hr_attendance_status_red" attrs="{'invisible': [('attendance_state', '=', 'checked_in')]}"/>
- <div class="o_stat_info">
- <span class="o_stat_text">Attendance</span>
- </div>
- </button>
- </xpath>
- </data>
- </field>
- </record>
-
<!-- employee kanban view specifically for hr_attendance (to check in/out) -->
<record id="hr_employees_view_kanban" model="ir.ui.view">
<field name="name">hr.employee.kanban</field>