Ravi Gohil (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-50624-rgo into 
lp:openobject-addons/6.0.

Requested reviews:
  Priyesh (OpenERP) (pso-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-50624-rgo/+merge/83122

Hello Sir,

There is an issue with widget float_time in project task.

Widget float_time is not being set in 'planned_hours' field of task object with 
'project_time_mode_id' set to 'Hour/Hours' in Company Configuration when the 
Language is other than English.

This fixes the issue.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-50624-rgo/+merge/83122
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-50624-rgo.
=== modified file 'project/project.py'
--- project/project.py	2011-01-18 22:45:39 +0000
+++ project/project.py	2011-11-23 09:12:36 +0000
@@ -498,7 +498,11 @@
 
     def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
         users_obj = self.pool.get('res.users')
+        translation_obj = self.pool.get('ir.translation')
 
+        is_hour = translation_obj.search(cr, uid, [('name', '=', 'product.uom,name'), ('src', 'in', ['Hour', 'Hours'])])
+        translated = [str(i.value) for i in translation_obj.browse(cr, uid, is_hour, context=context)]
+        translated.extend(['Hour','Hours'])
         # 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
@@ -506,7 +510,7 @@
 
         res = super(task, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu)
 
-        if tm in ['Hours','Hour']:
+        if tm in translated:
             return res
 
         eview = etree.fromstring(res['arch'])

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to