[FIX]: Fix employee manager id

bzr revid: atp@tinyerp.com-20120925173320-z4vn1ir2bwp9gu5l
This commit is contained in:
Atul Patel (OpenERP)
2012-09-25 23:03:20 +05:30
parent 679c4284d0
commit 7f08d3d176
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
<field name="department_id" on_change="onchange_department_id(department_id)"/>
<field name="job_id" options='{"no_open": true}' domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
<field name="parent_id"/>
<span class="oe_grey" colspan="2">As Manager of this employee, you will automatically follow all human resource request of this employee</span>
<span class="oe_grey" colspan="2" attrs="{'invisible': [('parent_id', '=', False)]}">As Manager of this employee, you will automatically follow all human resource request of this employee</span>
<field name="coach_id"/>
</group>
<group>
+1 -1
View File
@@ -245,7 +245,7 @@ class hr_evaluation(osv.osv):
self.write(cr, uid, ids, {'state':'progress'}, context=context)
for evaluation in self.browse(cr, uid, ids, context=context):
if evaluation.employee_id and evaluation.employee_id.parent_id and evaluation.employee_id.parent_id.user_id:
self.message_subscribe(cr, uid, [evaluation.id], [evaluation.employee_id.parent_id.user_id.id], context=context)
self.message_subscribe_users(cr, uid, [evaluation.id], user_ids=[evaluation.employee_id.parent_id.user_id.id], context=context)
if len(evaluation.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', evaluation.id),('state', 'in', ['done','cancel'])], context=context)):
raise osv.except_osv(_('Warning!'),_("You cannot change state, because some appraisal(s) are in waiting answer or draft state."))
return True
+2 -2
View File
@@ -119,8 +119,8 @@ class hr_expense_expense(osv.osv):
def expense_confirm(self, cr, uid, ids, *args):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id and expense.employee_id.parent_id.user_id:
self.message_subscribe(cr, uid, [expense.id], [expense.employee_id.parent_id.user_id.id])
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
+1 -1
View File
@@ -303,7 +303,7 @@ class hr_holidays(osv.osv):
self.check_holidays(cr, uid, ids, context=context)
for record in self.browse(cr, uid, ids, context=context):
if record.employee_id and record.employee_id.parent_id and record.employee_id.parent_id.user_id:
self.message_subscribe(cr, uid, [record.id], [record.employee_id.parent_id.user_id.id], context=context)
self.message_subscribe_users(cr, uid, [record.id], user_ids=[record.employee_id.parent_id.user_id.id], context=context)
self.holidays_confirm_notificate(cr, uid, ids, context=context)
return self.write(cr, uid, ids, {'state':'confirm'})
@@ -267,7 +267,7 @@ class hr_timesheet_sheet(osv.osv):
def button_confirm(self, cr, uid, ids, context=None):
for sheet in self.browse(cr, uid, ids, context=context):
if sheet.employee_id and sheet.employee_id.parent_id and sheet.employee_id.parent_id.user_id:
self.message_subscribe(cr, uid, [sheet.id], [sheet.employee_id.parent_id.user_id.id], context=context)
self.message_subscribe_users(cr, uid, [sheet.id], user_ids=[sheet.employee_id.parent_id.user_id.id], context=context)
self.check_employee_attendance_state(cr, uid, sheet.id, context=context)
di = sheet.user_id.company_id.timesheet_max_difference
if (abs(sheet.total_difference) < di) or not di: