[tryton-debian-vcs] tryton-modules-calendar-scheduling branch debian-jessie-3.2 updated. debian/3.2.2-1-2-ga39e6c5
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Mon Sep 21 12:28:16 UTC 2015
The following commit has been merged in the debian-jessie-3.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-calendar-scheduling.git;a=commitdiff;h=debian/3.2.2-1-2-ga39e6c5
commit a39e6c5855f61cf4bc9a73366f64aeb8a344f254
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Sep 20 19:43:30 2015 +0200
Releasing debian version 3.2.3-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 855fb4d..77420b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-calendar-scheduling (3.2.3-1) unstable; urgency=medium
+
+ * Merging upstream version 3.2.3.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 20 Sep 2015 19:43:30 +0200
+
tryton-modules-calendar-scheduling (3.2.2-1) unstable; urgency=medium
* Merging upstream version 3.2.2.
commit c57c6c8977a847f11c296d99f323004f72100b40
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Sep 20 19:43:29 2015 +0200
Merging upstream version 3.2.3.
diff --git a/CHANGELOG b/CHANGELOG
index 953a080..aea8ded 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.3 - 2015-09-19
+* Bug fixes (see mercurial logs for details)
+
Version 3.2.2 - 2015-05-22
* Bug fixes (see mercurial logs for details)
diff --git a/INSTALL b/INSTALL
index 3b17b87..54857d3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -8,6 +8,7 @@ Prerequisites
* trytond (http://www.tryton.org/)
* trytond_calendar (http://www.tryton.org/)
* pywebdav 0.9.8 or later (http://sourceforge.net/projects/pywebdav/)
+ * python-dateutil (http://labix.org/python-dateutil)
Installation
------------
diff --git a/PKG-INFO b/PKG-INFO
index bc61d61..7227e49 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_calendar_scheduling
-Version: 3.2.2
+Version: 3.2.3
Summary: Tryton module to add scheduling support on CalDAV
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/calendar_.py b/calendar_.py
index 4075f28..549f133 100644
--- a/calendar_.py
+++ b/calendar_.py
@@ -4,6 +4,8 @@ from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
import logging
+import dateutil.tz
+
from trytond.model import fields
from trytond.tools import get_smtp_server
from trytond.transaction import Transaction
@@ -11,6 +13,7 @@ from trytond.pool import Pool, PoolMeta
__all__ = ['Event', 'EventAttendee']
__metaclass__ = PoolMeta
+tzlocal = dateutil.tz.tzlocal()
class Event:
@@ -95,6 +98,9 @@ class Event:
(self.organizer_schedule_status,)
if Transaction().context.get('skip_schedule_agent'):
+ if (hasattr(vevent, 'organizer')
+ and hasattr(vevent.organizer, 'schedule_agent_param')):
+ del vevent.organizer.schedule_agent_param
return ical
if self.organizer_schedule_agent:
@@ -122,18 +128,28 @@ class Event:
summary = self.raise_user_error('no_subject',
raise_exception=False)
- date = Lang.strftime(self.dtstart, lang.code, lang.date)
+ if self.timezone:
+ tzevent = dateutil.tz.gettz(self.timezone)
+ else:
+ tzevent = tzlocal
+ dtstart = self.dtstart.replace(tzinfo=tzlocal).astimezone(tzevent)
+ if self.dtend:
+ dtend = self.dtend.replace(tzinfo=tzlocal).astimezone(tzevent)
+ else:
+ dtend = None
+
+ date = Lang.strftime(dtstart, lang.code, lang.date)
if not self.all_day:
- date += ' ' + Lang.strftime(self.dtstart, lang.code, '%H:%M')
+ date += ' ' + Lang.strftime(dtstart, lang.code, '%H:%M')
if self.dtend:
date += ' -'
if self.dtstart.date() != self.dtend.date():
- date += ' ' + Lang.strftime(self.dtend, lang.code,
+ date += ' ' + Lang.strftime(dtend, lang.code,
lang.date)
- date += ' ' + Lang.strftime(self.dtend, lang.code, '%H:%M')
+ date += ' ' + Lang.strftime(dtend, lang.code, '%H:%M')
else:
if self.dtend and self.dtstart.date() != self.dtend.date():
- date += ' - ' + Lang.strftime(self.dtend, lang.code, lang.date)
+ date += ' - ' + Lang.strftime(dtend, lang.code, lang.date)
if self.timezone:
date += ' ' + self.timezone
@@ -199,11 +215,9 @@ class Event:
msg_body.set_payload(body.encode('UTF-8'), 'UTF-8')
inner.attach(msg_body)
- attachment = MIMEBase('text', 'calendar')
- attachment.set_payload(ical.serialize())
- attachment.add_header('Content-Transfer-Encoding', 'quoted-printable',
- charset='UTF-8',
- method=ical.method.value.lower())
+ attachment = MIMEBase('text', 'calendar',
+ method=ical.method.value)
+ attachment.set_payload(ical.serialize(), 'UTF-8')
inner.attach(attachment)
msg.attach(inner)
@@ -493,6 +507,10 @@ class AttendeeMixin:
@classmethod
def attendee2values(cls, attendee):
+ # Those params don't need to be stored
+ for param in ['received_dtstamp_param', 'received_sequence_param']:
+ if hasattr(attendee, param):
+ delattr(attendee, param)
values = super(AttendeeMixin, cls).attendee2values(attendee)
if hasattr(attendee, 'schedule_status'):
if attendee.schedule_status in dict(
@@ -519,6 +537,8 @@ class AttendeeMixin:
del attendee.schedule_status_param
if Transaction().context.get('skip_schedule_agent'):
+ if hasattr(attendee, 'schedule_agent_param'):
+ del attendee.schedule_agent_param
return attendee
if self.schedule_agent:
@@ -575,18 +595,28 @@ class EventAttendee(AttendeeMixin, object):
summary = self.raise_user_error('no_subject',
raise_exception=False)
- date = Lang.strftime(event.dtstart, lang.code, lang.date)
+ if event.timezone:
+ tzevent = dateutil.tz.gettz(event.timezone)
+ else:
+ tzevent = tzlocal
+ dtstart = event.dtstart.replace(tzinfo=tzlocal).astimezone(tzevent)
+ if event.dtend:
+ dtend = event.dtend.replace(tzinfo=tzlocal).astimezone(tzevent)
+ else:
+ dtend = None
+
+ date = Lang.strftime(dtstart, lang.code, lang.date)
if not event.all_day:
- date += ' ' + Lang.strftime(event.dtstart, lang.code, '%H:%M')
+ date += ' ' + Lang.strftime(dtstart, lang.code, '%H:%M')
if event.dtend:
date += ' -'
if event.dtstart.date() != event.dtend.date():
- date += ' ' + Lang.strftime(event.dtend, lang.code,
+ date += ' ' + Lang.strftime(dtend, lang.code,
lang.date)
- date += ' ' + Lang.strftime(event.dtend, lang.code, '%H:%M')
+ date += ' ' + Lang.strftime(dtend, lang.code, '%H:%M')
else:
if event.dtend and event.dtstart.date() != event.dtend.date():
- date += ' - ' + Lang.strftime(event.dtend, lang.code,
+ date += ' - ' + Lang.strftime(dtend, lang.code,
lang.date)
if event.timezone:
date += ' ' + event.timezone
@@ -668,11 +698,9 @@ class EventAttendee(AttendeeMixin, object):
msg_body.set_payload(body.encode('UTF-8'), 'UTF-8')
inner.attach(msg_body)
- attachment = MIMEBase('text', 'calendar')
- attachment.set_payload(ical.serialize())
- attachment.add_header('Content-Transfer-Encoding', 'quoted-printable',
- charset='UTF-8',
- method=ical.method.value.lower())
+ attachment = MIMEBase('text', 'calendar',
+ method=ical.method.value)
+ attachment.set_payload(ical.serialize(), 'UTF-8')
inner.attach(attachment)
msg.attach(inner)
@@ -751,6 +779,8 @@ class EventAttendee(AttendeeMixin, object):
with Transaction().set_context(skip_schedule_agent=True):
ical = attendee.event.event2ical()
+ # Only the current attendee is needed
+ ical.vevent.attendee_list = [attendee.attendee2attendee()]
if not hasattr(ical, 'method'):
ical.add('method')
ical.method.value = 'REPLY'
@@ -786,6 +816,8 @@ class EventAttendee(AttendeeMixin, object):
with Transaction().set_context(skip_schedule_agent=True):
ical = attendee.event.event2ical()
+ # Only the current attendee is needed
+ ical.vevent.attendee_list = [attendee.attendee2attendee()]
if not hasattr(ical, 'method'):
ical.add('method')
ical.method.value = 'REPLY'
@@ -825,6 +857,8 @@ class EventAttendee(AttendeeMixin, object):
with Transaction().set_context(skip_schedule_agent=True):
ical = attendee.event.event2ical()
+ # Only the current attendee is needed
+ ical.vevent.attendee_list = [attendee.attendee2attendee()]
if not hasattr(ical, 'method'):
ical.add('method')
ical.method.value = 'REPLY'
diff --git a/setup.py b/setup.py
index dab81d2..3a7cded 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ if minor_version % 2:
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
-requires = ['PyWebDAV >= 0.9.8']
+requires = ['PyWebDAV >= 0.9.8', 'python-dateutil']
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
diff --git a/tryton.cfg b/tryton.cfg
index 8038e87..4c2c22b 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.2.2
+version=3.2.3
depends:
calendar
ir
diff --git a/trytond_calendar_scheduling.egg-info/PKG-INFO b/trytond_calendar_scheduling.egg-info/PKG-INFO
index 547d63a..01c86ca 100644
--- a/trytond_calendar_scheduling.egg-info/PKG-INFO
+++ b/trytond_calendar_scheduling.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-calendar-scheduling
-Version: 3.2.2
+Version: 3.2.3
Summary: Tryton module to add scheduling support on CalDAV
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond_calendar_scheduling.egg-info/requires.txt b/trytond_calendar_scheduling.egg-info/requires.txt
index 3929ab0..e8a44dd 100644
--- a/trytond_calendar_scheduling.egg-info/requires.txt
+++ b/trytond_calendar_scheduling.egg-info/requires.txt
@@ -1,4 +1,5 @@
PyWebDAV >= 0.9.8
+python-dateutil
trytond_calendar >= 3.2, < 3.3
trytond >= 3.2, < 3.3
--
tryton-modules-calendar-scheduling
More information about the tryton-debian-vcs
mailing list