[FIX]: Fix remove Calendar Reference
bzr revid: atp@tinyerp.co.in-20101116104030-dyg3ok30dv0hhcav
This commit is contained in:
@@ -35,16 +35,12 @@ class calendar_collection(osv.osv):
|
||||
}
|
||||
|
||||
def _get_root_calendar_directory(self, cr, uid, context=None):
|
||||
objid = self.pool.get('ir.model.data')
|
||||
data_pool = self.pool.get('ir.model.data')
|
||||
try:
|
||||
mid = objid._get_id(cr, uid, 'document', 'dir_calendars')
|
||||
if not mid:
|
||||
return False
|
||||
root_id = objid.read(cr, uid, mid, ['res_id'])['res_id']
|
||||
root_cal_dir = self.browse(cr,uid, root_id, context=context)
|
||||
return root_cal_dir.name
|
||||
calendar_dir_id = data_pool.get_object(cr, uid, 'caldav', 'document_directory_calendars0')
|
||||
return calendar_dir_id.name
|
||||
except Exception:
|
||||
logger = logging.getLogger('document')
|
||||
logger = logging.getLogger('caldav')
|
||||
logger.warning('Cannot set root directory for Calendars:', exc_info=True)
|
||||
return False
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user