[FIX]hr_timesheet: correct mistake in default, should be 'id' instead of 'name' in...
authorCedric Snauwaert <csn@openerp.com>
Mon, 22 Apr 2013 11:46:57 +0000 (13:46 +0200)
committerCedric Snauwaert <csn@openerp.com>
Mon, 22 Apr 2013 11:46:57 +0000 (13:46 +0200)
bzr revid: csn@openerp.com-20130422114657-ktu1a7z83c0bhv2n

addons/hr_timesheet/hr_timesheet.py

index 68c158e..bb31177 100644 (file)
@@ -40,7 +40,7 @@ class hr_employee(osv.osv):
             result = md.get_object_reference(cr, uid, 'hr_timesheet', 'analytic_journal')
             #search on id found in result to check if current user has read access right, if he does, it will return same id,
             #otherwise it will return empty list
-            check_right = self.pool.get('account.analytic.journal').search(cr, uid, [('name', '=', result[1])], context=context)
+            check_right = self.pool.get('account.analytic.journal').search(cr, uid, [('id', '=', result[1])], context=context)
             if check_right:
                 return result[1]
             else: