[FIX] hr_timesheet: In hr.sign.in.project, correct args in attendance_action_change
bzr revid: hmo@tinyerp.com-20120511082614-4iitswji8dgwsbst
This commit is contained in:
parent
80ef7b58dd
commit
79bfa8e45c
|
@ -91,7 +91,7 @@ class hr_so_project(osv.osv_memory):
|
|||
emp_obj = self.pool.get('hr.employee')
|
||||
for data in self.browse(cr, uid, ids, context=context):
|
||||
emp_id = data.emp_id.id
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], type='sign_out', dt=data.date)
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], {'action':'sign_out', 'action_date':data.date})
|
||||
self._write(cr, uid, data, emp_id, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
@ -99,7 +99,7 @@ class hr_so_project(osv.osv_memory):
|
|||
emp_obj = self.pool.get('hr.employee')
|
||||
for data in self.browse(cr, uid, ids, context=context):
|
||||
emp_id = data.emp_id.id
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data.date)
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], {'action':'action', 'action_date':data.date})
|
||||
self._write(cr, uid, data, emp_id, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
@ -156,7 +156,7 @@ class hr_si_project(osv.osv_memory):
|
|||
emp_obj = self.pool.get('hr.employee')
|
||||
for data in self.browse(cr, uid, ids, context=context):
|
||||
emp_id = data.emp_id.id
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], type = 'sign_in' ,dt=data.date or False)
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], {'action':'sign_in', 'action_date':data.date})
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<group col="4" colspan="1">
|
||||
<field name="state_attendance"/>
|
||||
<button name="attendance_action_change" attrs="{'invisible': ['|', ('state_attendance','=',False), ('state_attendance', '=', 'absent')]}" type="object" string="Sign Out" icon="gtk-go-forward" groups="base.group_hr_manager"/>
|
||||
<button name="attendance_action_change" attrs="{'invisible': [('state_attendance', '=', 'present')]}" type="object" string="Sign In" icon="gtk-go-back" groups="base.group_hr_manager"/>
|
||||
<button name="attendance_action_change" attrs="{'invisible': [('state_attendance', '=', 'present')]}" type="object" string="Sign In" icon="gtk-go-back" groups="base.group_hr_manager"/>
|
||||
<field name="total_attendance_day" widget="float_time" colspan="4"/>
|
||||
</group>
|
||||
<field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
|
||||
|
|
Loading…
Reference in New Issue