[IMP] base_calendar_chnages and import_google_changes
bzr revid: jam@tinyerp.com-20110607130330-abahqwzjmg95p2ro
This commit is contained in:
parent
568f796a4e
commit
94c2fb962b
|
@ -1359,24 +1359,13 @@ rule or repeating pattern of time to exclude from the recurring rule."),
|
|||
return res and res[0] or False
|
||||
|
||||
return res
|
||||
def web_client_unfucking_timebomb(self, ids):
|
||||
if (date.today() < date(2011, 5, 1)):
|
||||
import re
|
||||
if isinstance(ids, list) and len(ids) == 1:
|
||||
string = ids[0]
|
||||
if isinstance(string, str) and string.startswith('[') and string.endswith(']'):
|
||||
string = string[1:-1]
|
||||
list_ids = re.split(',\s*', string)
|
||||
ids = list_ids
|
||||
return ids
|
||||
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
if 'date' in groupby:
|
||||
raise osv.except_osv(_('Warning !'), _('Group by date not supported, use the calendar view instead'))
|
||||
|
||||
virtual_id = context.get('virtual_id', False)
|
||||
|
||||
context.update({'virtual_id': False})
|
||||
res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
'update_xml': [
|
||||
'sync_google_calendar_view.xml',
|
||||
'wizard/google_contact_import_view.xml',
|
||||
# 'wizard/wizard_import_calendar_events_view.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': [
|
||||
|
|
|
@ -24,19 +24,6 @@ from osv import osv, fields
|
|||
class crm_meeting(osv.osv):
|
||||
_inherit = "crm.meeting"
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
ids = self.web_client_unfucking_timebomb(ids)
|
||||
res = super(crm_meeting, self).unlink(cr, uid, ids, context=context)
|
||||
ids_real = self.remove_virtual_id(ids)
|
||||
|
||||
model_obj = self.pool.get('ir.model.data')
|
||||
remain_ids = self.search(cr, uid, [('id','in',ids_real)])
|
||||
ids_to_remove = list(set(ids_real) - set(remain_ids))
|
||||
|
||||
model_ids = model_obj.search(cr, uid, [('res_id','in',ids_to_remove),('model','=','crm.meeting'),('module','=','sync_google_calendar')], context=context)
|
||||
model_obj.unlink(cr, uid, model_ids, context=context)
|
||||
return res
|
||||
|
||||
crm_meeting()
|
||||
|
||||
class crm_case_categ(osv.osv):
|
||||
|
|
|
@ -20,5 +20,4 @@
|
|||
##############################################################################
|
||||
import import_google
|
||||
import google_contact_import
|
||||
#import wizard_import_calendar_events
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -240,7 +240,6 @@ class import_contact(import_framework):
|
|||
'date': 'DateStart',
|
||||
'date_deadline': 'DateEnd',
|
||||
'categ_id/id': call(self.get_event_category, value('Category')),
|
||||
# 'allday': map_val('IsAllDayEvent', self.boolean_map),
|
||||
'recurrency': 'recurrency',
|
||||
'end_date' : 'end_date',
|
||||
'end_type' : 'end_type',
|
||||
|
|
Loading…
Reference in New Issue