Skip to content
Snippets Groups Projects
Commit 22057817 authored by Rucha Patel's avatar Rucha Patel
Browse files

[IMP]: crm: Minor improvement in read method for virtual id and in import wizard

bzr revid: rpa@tinyerp.com-20091224122301-psuec18gm5bmzqhe
parent 2ffeb040
Branches
Tags
No related merge requests found
......@@ -253,13 +253,12 @@ class crm_case(osv.osv):
if not rrules:
for ress in res:
strdate = ''.join((re.compile('\d')).findall(ress['date']))
idval = str(ress['id']) + '-' + strdate
idval = str(common.caldevIDs2readIDs(ress['id'])) + '-' + strdate
ress['id'] = idval
return res
result = res + []
for data in rrules:
if data['rrule'] and data['rdates']: # delete 2nd condition at last
if data['rrule'] and data['rdates']:
rdates = eval(data['rdates'])
for res_temp in res:
if res_temp['id'] == data['id']:
......@@ -268,7 +267,6 @@ class crm_case(osv.osv):
result.remove(val)
else:
strdate = ''.join((re.compile('\d')).findall(res_temp['date']))
idval = str(res_temp['id']) + '-' + strdate
idval = str(common.caldevIDs2readIDs(res_temp['id'])) + '-' + strdate
res_temp['id'] = idval
......@@ -286,7 +284,6 @@ class crm_case(osv.osv):
default, context)
def unlink(self, cr, uid, ids, context=None):
#TODO: Change RRULE
for id in ids:
if len(str(id).split('-')) > 1:
date_new = time.strftime("%Y-%m-%d %H:%M:%S", \
......
......@@ -54,8 +54,9 @@ class crm_cal_import_wizard(wizard.interface):
def _process_imp_ics(self, cr, uid, data, context=None):
case_obj = pooler.get_pool(cr.dbname).get('crm.case')
vals = case_obj.import_cal(cr, uid, data['ids'], data, context)
global cnt
cnt = 0
if vals:
global cnt
cnt = vals['count']
return {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment