diff --git a/addons/hr_attendance/static/src/js/attendance.js b/addons/hr_attendance/static/src/js/attendance.js index e5cb3ee2bc6..f6a4c15268a 100644 --- a/addons/hr_attendance/static/src/js/attendance.js +++ b/addons/hr_attendance/static/src/js/attendance.js @@ -18,11 +18,13 @@ openerp.hr_attendance = function (instance) { }, start: function() { var self = this; - this.on("change:signed_in", this, function() { + var tmp = function() { this.$el.toggleClass("oe_attendance_nosigned", ! this.get("signed_in")); this.$el.toggleClass("oe_attendance_signed", this.get("signed_in")); this.$el.attr("title", tips["" + this.get("signed_in")].toString()); - }); + }; + this.on("change:signed_in", this, tmp); + _.bind(tmp, this)(); this.$(".oe_attendance_signin").click(function() { self.do_update_attendance(); }); diff --git a/addons/hr_attendance/static/src/xml/attendance.xml b/addons/hr_attendance/static/src/xml/attendance.xml index e4287b35910..6896086440f 100644 --- a/addons/hr_attendance/static/src/xml/attendance.xml +++ b/addons/hr_attendance/static/src/xml/attendance.xml @@ -1,6 +1,6 @@