[tryton-debian-vcs] tryton-modules-calendar-scheduling branch debian updated. debian/3.6.1-1-4-gda7199f
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Mon Sep 21 12:28:14 UTC 2015
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-calendar-scheduling.git;a=commitdiff;h=debian/3.6.1-1-4-gda7199f
commit da7199fcf8035601d611f0b14633596f539d9e7d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Sep 20 19:40:34 2015 +0200
Releasing debian version 3.6.2-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 3b9dae9..1e3814c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-calendar-scheduling (3.6.2-1) unstable; urgency=medium
+
+ * Adapting section naming in gbp.conf to current git-buildpackage.
+ * Improving description why we can not run the module test suites.
+ * Merging upstream version 3.6.2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 20 Sep 2015 19:40:34 +0200
+
tryton-modules-calendar-scheduling (3.6.1-1) unstable; urgency=medium
* Updating year of debian copyright.
commit 8006e10d4002a2d7624572ed9d8cc270592c01cb
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Sep 20 19:40:33 2015 +0200
Merging upstream version 3.6.2.
diff --git a/CHANGELOG b/CHANGELOG
index a050d46..9586dd4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.6.2 - 2015-09-19
+* Bug fixes (see mercurial logs for details)
+
Version 3.6.1 - 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 12ee8b8..f299a91 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_calendar_scheduling
-Version: 3.6.1
+Version: 3.6.2
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 301adbe..959da95 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()
logger = logging.getLogger(__name__)
@@ -97,6 +100,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:
@@ -124,18 +130,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
@@ -201,11 +217,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)
@@ -496,6 +510,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(
@@ -522,6 +540,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:
@@ -578,18 +598,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
@@ -671,11 +701,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)
@@ -754,6 +782,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'
@@ -789,6 +819,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'
@@ -828,6 +860,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 522f471..3cd1ba8 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 ff0af1f..ff37217 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.6.1
+version=3.6.2
depends:
calendar
ir
diff --git a/trytond_calendar_scheduling.egg-info/PKG-INFO b/trytond_calendar_scheduling.egg-info/PKG-INFO
index 6714be2..71fe800 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.6.1
+Version: 3.6.2
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 e742346..8f262d2 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.6, < 3.7
trytond >= 3.6, < 3.7
--
tryton-modules-calendar-scheduling
More information about the tryton-debian-vcs
mailing list