[IMP]:Fixed problem of resource_ids in _compute_day function in opportunity
bzr revid: atp@tinyerp.co.in-20100408115851-3lnhuhkxv75pzg2b
This commit is contained in:
parent
c69d8bd2ba
commit
d3dfc675e1
|
@ -88,7 +88,8 @@ class crm_opportunity(osv.osv):
|
||||||
resource_id = False
|
resource_id = False
|
||||||
if opportunity.user_id:
|
if opportunity.user_id:
|
||||||
resource_ids = res_obj.search(cr, uid, [('user_id','=',opportunity.user_id.id)])
|
resource_ids = res_obj.search(cr, uid, [('user_id','=',opportunity.user_id.id)])
|
||||||
resource_id = len(resource_ids) or resource_ids[0]
|
if resource_ids:
|
||||||
|
resource_id = len(resource_ids) or resource_ids[0]
|
||||||
|
|
||||||
duration = float(ans.days)
|
duration = float(ans.days)
|
||||||
if opportunity.section_id.resource_calendar_id:
|
if opportunity.section_id.resource_calendar_id:
|
||||||
|
|
Loading…
Reference in New Issue