summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorDenis Vermylen (dve) <dve@odoo.com>2016-12-02 17:13:38 +0100
committerDVE <dve@odoo.com>2017-01-03 13:53:30 +0100
commit8203cdb9ff2dd4635a1df9fe1db403b36c8ec7a8 (patch)
tree4b016f5855ef2cbd26cb0b6409f713f5fbf72415 /addons
parent287968e66ed7b86582ac6a2274fb317573c70362 (diff)
[IMP] hr_attendance: code cleanup
Diffstat (limited to 'addons')
-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>