diff --git a/addons/hr/__manifest__.py b/addons/hr/__manifest__.py
index bcbd2fafdf9..78dbafe5450 100644
--- a/addons/hr/__manifest__.py
+++ b/addons/hr/__manifest__.py
@@ -30,6 +30,7 @@
'views/hr_plan_views.xml',
'views/hr_employee_category_views.xml',
'views/hr_employee_public_views.xml',
+ 'report/hr_employee_badge.xml',
'views/hr_employee_views.xml',
'views/hr_department_views.xml',
'views/hr_views.xml',
@@ -38,7 +39,6 @@
'views/mail_channel_views.xml',
'views/res_users.xml',
'data/hr_data.xml',
- 'report/hr_employee_badge.xml'
],
'demo': [
'data/hr_demo.xml'
diff --git a/addons/hr/views/hr_employee_views.xml b/addons/hr/views/hr_employee_views.xml
index 3810e5e2312..0dca0f5a8f8 100644
--- a/addons/hr/views/hr_employee_views.xml
+++ b/addons/hr/views/hr_employee_views.xml
@@ -179,9 +179,13 @@
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/hr_attendance/models/hr_employee.py b/addons/hr_attendance/models/hr_employee.py
index 208fa37ac1d..f52b2acb11e 100644
--- a/addons/hr_attendance/models/hr_employee.py
+++ b/addons/hr_attendance/models/hr_employee.py
@@ -111,6 +111,7 @@ class HrEmployeeBase(models.AbstractModel):
action_message['employee_name'] = employee.name
action_message['barcode'] = employee.barcode
action_message['next_action'] = next_action
+ action_message['hours_today'] = employee.hours_today
if employee.user_id:
modified_attendance = employee.with_user(employee.user_id)._attendance_action_change()
diff --git a/addons/hr_attendance/static/src/js/greeting_message.js b/addons/hr_attendance/static/src/js/greeting_message.js
index 064ac919f08..c8d007b986b 100644
--- a/addons/hr_attendance/static/src/js/greeting_message.js
+++ b/addons/hr_attendance/static/src/js/greeting_message.js
@@ -50,6 +50,12 @@ var GreetingMessage = AbstractAction.extend({
this.format_time = 'HH:mm:ss';
this.attendance.check_in_time = this.attendance.check_in && this.attendance.check_in.format(this.format_time);
this.attendance.check_out_time = this.attendance.check_out && this.attendance.check_out.format(this.format_time);
+
+ if (action.hours_today) {
+ var duration = moment.duration(action.hours_today, "hours");
+ this.hours_today = duration.hours() + ' hours, ' + duration.minutes() + ' minutes';
+ }
+
this.employee_name = action.employee_name;
this.attendanceBarcode = action.barcode;
},
diff --git a/addons/hr_attendance/static/src/xml/attendance.xml b/addons/hr_attendance/static/src/xml/attendance.xml
index f0be4eddb6c..429f06249f5 100644
--- a/addons/hr_attendance/static/src/xml/attendance.xml
+++ b/addons/hr_attendance/static/src/xml/attendance.xml
@@ -10,19 +10,19 @@
-
Welcome to
+
Welcome to

-
Scan your badge
+
Scan your badge
-
or
+ or
@@ -116,6 +116,7 @@
Checked out at
+
diff --git a/addons/hr_attendance/views/hr_attendance_view.xml b/addons/hr_attendance/views/hr_attendance_view.xml
index bd416202f2f..0d973f92243 100644
--- a/addons/hr_attendance/views/hr_attendance_view.xml
+++ b/addons/hr_attendance/views/hr_attendance_view.xml
@@ -11,6 +11,7 @@
+
@@ -178,7 +179,7 @@
-
+