diff --git a/golem_activity/models/golem_activity.py b/golem_activity/models/golem_activity.py index b2103eb..dcd4220 100644 --- a/golem_activity/models/golem_activity.py +++ b/golem_activity/models/golem_activity.py @@ -180,11 +180,26 @@ class GolemActivity(models.Model): real_events = self.browse([real_id for calendar_id, real_id in select]) real_data = super(GolemActivity, real_events).read(fields=fields2, load=load) real_data = dict((d['id'], d) for d in real_data) + print '------------------------------------' print real_data + print '------------------------------------' print real_events + print '------------------------------------' + + result = [] + for calendar_id, real_id in select: + res = real_data[real_id].copy() + print res + print '_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_' + print calendar_id + print '_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_' + print real_id + #ls = self.calendar_id2real_id(calendar_id, with_date=res and res.get('duration', 0) > 0 and res.get('duration') or 1) + + """ for calendar_id, real_id in select: print calendar_id - print real_id + print real_id""" #for id in self.ids: # print self.env['golem.activity'].browse(id) @@ -193,7 +208,7 @@ class GolemActivity(models.Model): @api.multi def calendar_id2real_id(self, calendar_id=None): if calendar_id and isinstance(calendar_id, (basestring)): - res = filter(None, calendar_id.split('-')) + res = filter(None, calendar_id.split('_')) if len(res) == 2: real_id = res[0] return int(real_id) @@ -201,7 +216,7 @@ class GolemActivity(models.Model): @api.multi def real_id2calendar_id(self, record_id, date): - return '%s-%s' % (record_id, date) + return '%s_%s' % (record_id, date) @api.multi def get_recurrent_ids(self):