[FIX]: project : Widget float_time in project task not working with language other...
authorRavi Gohil (Open ERP) <rgo@tinyerp.com>
Mon, 13 Feb 2012 06:58:30 +0000 (12:28 +0530)
committerRavi Gohil (Open ERP) <rgo@tinyerp.com>
Mon, 13 Feb 2012 06:58:30 +0000 (12:28 +0530)
bzr revid: rgo@tinyerp.com-20120213065830-n79tn8rm13brgod2

1  2 
addons/project/project.py

@@@ -502,7 -502,7 +502,7 @@@ class task(osv.osv)
          # read uom as admin to avoid access rights issues, e.g. for portal/share users,
          # this should be safe (no context passed to avoid side-effects)
          obj_tm = users_obj.browse(cr, 1, uid, context=context).company_id.project_time_mode_id
--        tm = obj_tm and obj_tm.name or 'Hours'
++        tm = obj_tm and obj_tm.name or _('Hours')
  
          res = super(task, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu)
  
          res['arch'] = etree.tostring(eview)
  
          for f in res['fields']:
--            if 'Hours' in res['fields'][f]['string']:
--                res['fields'][f]['string'] = res['fields'][f]['string'].replace('Hours',tm)
++            if _('Hours') in res['fields'][f]['string']:
++                res['fields'][f]['string'] = res['fields'][f]['string'].replace(_('Hours'), tm)
          return res
  
      def action_close(self, cr, uid, ids, context=None):