[FIX] hr_attendance: fix problem of current_date field in search view of attedance and reload page after click on attendancenotifier widget to update current page/list/kanban of employee, timesheet , attendance

bzr revid: hmo@tinyerp.com-20120515053145-9dpzju1u07v2xe26
This commit is contained in:
Harry (OpenERP) 2012-05-15 11:01:45 +05:30
parent 28bcc5d3aa
commit a98de2cea4
2 changed files with 5 additions and 2 deletions

View File

@ -52,7 +52,7 @@
<search string="Hr Attendance Search">
<filter icon="terp-stock_align_left_24" string="My Attendance" domain="[('employee_id.user_id.id', '=', uid)]" />
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today" name="today" domain="[('name','&gt;=',current_date),('name','&lt;=',current_date)]" />
<filter icon="terp-go-today" string="Today" name="today" domain="[('name','&gt;=',time.strftime('%%Y-%%m-%%d')),('name','&lt;=',time.strftime('%%Y-%%m-%%d'))]" />
<separator orientation="vertical"/>
<field name="employee_id"/>
<field name="name"/>

View File

@ -45,7 +45,10 @@ openerp.hr_attendance = function(instance) {
on_click: function() {
var self = this;
hr_employee = new instance.web.DataSet(self, 'hr.employee');
hr_employee.call('attendance_action_change', [[self.employee.id]]).done(function(result){self.renderElement()});
hr_employee.call('attendance_action_change', [[self.employee.id]]).done(function(result){
window.location.reload();
//self.renderElement()
});
},
});
instance.web.DataSet.include({