diff options
| author | pso (OpenERP) <pso@tinyerp.com> | 2012-09-03 12:25:28 +0530 |
|---|---|---|
| committer | pso (OpenERP) <pso@tinyerp.com> | 2012-09-03 12:25:28 +0530 |
| commit | c8d240afbd5076e3e5b173d5c8d989ebee2e0791 (patch) | |
| tree | 382cb5bb6ff0f22213d7083712164513a81db881 /addons/project | |
| parent | e07499a9a228a38a3206378e6617cd4022b12205 (diff) | |
| parent | e3f1c26e6afcf7c3df9bd98166614778e27645ea (diff) | |
[MERGE] Merged with main branch
bzr revid: pso@tinyerp.com-20120903065528-b73t9t63t2iq20sw
Diffstat (limited to 'addons/project')
| -rw-r--r-- | addons/project/project.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/project/project.py b/addons/project/project.py index 904e19671cb..f16cb905807 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -26,6 +26,7 @@ from osv import fields, osv from openerp.addons.resource.faces import task as Task import time from tools.translate import _ +from openerp import SUPERUSER_ID _TASK_STATE = [('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')] @@ -877,7 +878,7 @@ class task(base_stage, osv.osv): if context is None: context = {} # 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 + obj_tm = users_obj.browse(cr, SUPERUSER_ID, uid, context=context).company_id.project_time_mode_id 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) |
