merged hsa's branch lp:~openerp-dev/openobject-addons/trunk-10-hr-click-2-bde-timeshe...
authorBharat Devnani (OpenERP) <bde@tinyerp.com>
Mon, 12 Nov 2012 11:02:20 +0000 (16:32 +0530)
committerBharat Devnani (OpenERP) <bde@tinyerp.com>
Mon, 12 Nov 2012 11:02:20 +0000 (16:32 +0530)
bzr revid: bde@tinyerp.com-20121112110220-rqk5qo07ol4duzds

1  2 
addons/hr_timesheet_sheet/hr_timesheet_sheet.py

@@@ -222,6 -222,20 +223,20 @@@ class hr_timesheet_sheet(osv.osv)
              department_id = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context).department_id.id
          return {'value': {'department_id': department_id}}
  
+     # ------------------------------------------------
+     # OpenChatter methods and notifications
+     # ------------------------------------------------
+     
+     def needaction_domain_get(self, cr, uid, ids, context=None):
+         emp_obj = self.pool.get('hr.employee')
+         empids = emp_obj.search(cr, uid, [('parent_id.user_id', '=', uid)], context=context)
+         dom = ['&', ('state', '=', 'confirm'), ('employee_id', 'in', empids)]
+         return dom
+     def confirm_send_note(self, cr, uid, ids, context=None):
+         for obj in self.browse(cr, uid, ids, context=context):
 -            self.message_post(cr, uid, [obj.id], body=_("Timesheet has been Submitted by %s .") % (obj.employee_id.name), context=context)
++            self.message_post(cr, uid, [obj.id], body=_("Timesheet has been submitted by %s.") % (obj.employee_id.name), context=context)
  hr_timesheet_sheet()
  
  class account_analytic_line(osv.osv):