From c60b2c6a145e9973b83bc8315e0578e2ebb76a7b Mon Sep 17 00:00:00 2001 From: "Denis Vermylen (dve)" Date: Fri, 2 Dec 2016 16:10:58 +0100 Subject: [PATCH] [FIX] hr_attendance: fix display issues - in employee form view: separate "Status" group from "Attendance" group - make "Attendance" group only visible to attendance officers this also fixes the use_pin group that would everyone to view pins if enabled - in employee kanban view, fix the removal of the attendance widget to display the fa-user icon again, instead of a simple red dot. (commit c468cfdd69c77a8ec3f940c4f62791bf15bb82d8 ) --- addons/hr/views/hr_views.xml | 2 +- .../static/src/js/presence_widgets.js | 4 ++-- .../static/src/less/hr_attendance.less | 16 +++++++------ .../static/src/xml/attendance.xml | 2 +- .../hr_attendance/views/hr_employee_view.xml | 24 ++++++++++--------- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/addons/hr/views/hr_views.xml b/addons/hr/views/hr_views.xml index 9c866f50faf..9e4060e0eb2 100644 --- a/addons/hr/views/hr_views.xml +++ b/addons/hr/views/hr_views.xml @@ -98,7 +98,7 @@ - + diff --git a/addons/hr_attendance/static/src/js/presence_widgets.js b/addons/hr_attendance/static/src/js/presence_widgets.js index 8419c6ccb21..9a811919282 100644 --- a/addons/hr_attendance/static/src/js/presence_widgets.js +++ b/addons/hr_attendance/static/src/js/presence_widgets.js @@ -21,8 +21,8 @@ var FormPresenceIndicator = form_common.AbstractField.extend({ return this._super(); }, render_value: function() { - this.$('.oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_green", this.get_value() == 'checked_in'); - this.$('.oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_red", this.get_value() == 'checked_out'); + this.$('#oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_green", this.get_value() == 'checked_in'); + this.$('#oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_red", this.get_value() == 'checked_out'); }, display_field: function() { this.$el.html(QWeb.render("PresenceIndicator")); diff --git a/addons/hr_attendance/static/src/less/hr_attendance.less b/addons/hr_attendance/static/src/less/hr_attendance.less index 66195e3d6c1..a908ba559af 100644 --- a/addons/hr_attendance/static/src/less/hr_attendance.less +++ b/addons/hr_attendance/static/src/less/hr_attendance.less @@ -7,17 +7,19 @@ box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6); } -.oe_hr_attendance_status { - font-size: 1.2em; - margin-right: .1em; - display: inline-block; - color: @odoo-brand-secondary; +.o_kanban_view #oe_hr_attendance_status { + font-size: 1.2em; + margin-right: .3em; +} + +#oe_hr_attendance_status { + color: @odoo-brand-secondary; &.oe_hr_attendance_status_green { - color: @brand-success !important; + color: @brand-success; } &.oe_hr_attendance_status_red { - color: @brand-danger !important; + color: @brand-danger; } } diff --git a/addons/hr_attendance/static/src/xml/attendance.xml b/addons/hr_attendance/static/src/xml/attendance.xml index 8f864341a1f..ee614d022c8 100644 --- a/addons/hr_attendance/static/src/xml/attendance.xml +++ b/addons/hr_attendance/static/src/xml/attendance.xml @@ -1,7 +1,7 @@