[tryton-debian-vcs] tryton-modules-party-vcarddav branch upstream-2.2 created. 13239d4a7580e5827414151fb1ce61130e6682e7

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:04:19 UTC 2013


The following commit has been merged in the upstream-2.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-party-vcarddav.git;a=commitdiff;h=13239d4a7580e5827414151fb1ce61130e6682e7
commit 13239d4a7580e5827414151fb1ce61130e6682e7
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 15:34:59 2013 +0200

    Adding upstream version 2.2.2.

diff --git a/CHANGELOG b/CHANGELOG
index 9a576fe..c55750c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.2 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.1 - 2012-09-02
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 0650193..bd944d1 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2009-2012 Cédric Krier.
+Copyright (C) 2009-2013 Cédric Krier.
 Copyright (C) 2009-2011 Bertrand Chenal.
-Copyright (C) 2009-2012 B2CK SPRL.
+Copyright (C) 2009-2013 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index b6b50a4..23bd763 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_party_vcarddav
-Version: 2.2.1
+Version: 2.2.2
 Summary: Add CardDAV on parties
 Home-page: http://www.tryton.org/
 Author: B2CK
diff --git a/__tryton__.py b/__tryton__.py
index 40383fa..6f053ba 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_CO' : 'vCardDAV de Compañía',
     'name_es_ES' : 'Tercero - vCardDAV',
     'name_fr_FR': 'Tiers - vCardDAV',
-    'version' : '2.2.1',
+    'version' : '2.2.2',
     'author' : 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/trytond_party_vcarddav.egg-info/PKG-INFO b/trytond_party_vcarddav.egg-info/PKG-INFO
index 7765405..1fe4365 100644
--- a/trytond_party_vcarddav.egg-info/PKG-INFO
+++ b/trytond_party_vcarddav.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-party-vcarddav
-Version: 2.2.1
+Version: 2.2.2
 Summary: Add CardDAV on parties
 Home-page: http://www.tryton.org/
 Author: B2CK
diff --git a/webdav.py b/webdav.py
index 594011d..92a8d2f 100644
--- a/webdav.py
+++ b/webdav.py
@@ -253,7 +253,7 @@ class Collection(ModelSQL, ModelView):
             val = vcard_obj.execute([party_id],
                     {'id': party_id, 'ids': [party_id]},
                     )
-            return val[1]
+            return str(val[1])
         return super(Collection, self).get_data(uri, cache=cache)
 
     def get_address_data(self, uri, cache=None):
commit 9c9e71e4d87257f7cda17772cf714486ee72867e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Sep 12 15:53:56 2012 +0200

    Adding upstream version 2.2.1.

diff --git a/CHANGELOG b/CHANGELOG
index 06decad..9a576fe 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.1 - 2012-09-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.0 - 2011-10-24
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 1245dd5..0650193 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2009-2011 Cédric Krier.
+Copyright (C) 2009-2012 Cédric Krier.
 Copyright (C) 2009-2011 Bertrand Chenal.
-Copyright (C) 2009-2011 B2CK SPRL.
+Copyright (C) 2009-2012 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index c00e768..b6b50a4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: trytond_party_vcarddav
-Version: 2.2.0
+Version: 2.2.1
 Summary: Add CardDAV on parties
 Home-page: http://www.tryton.org/
 Author: B2CK
diff --git a/__tryton__.py b/__tryton__.py
index d6dce77..40383fa 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_CO' : 'vCardDAV de Compañía',
     'name_es_ES' : 'Tercero - vCardDAV',
     'name_fr_FR': 'Tiers - vCardDAV',
-    'version' : '2.2.0',
+    'version' : '2.2.1',
     'author' : 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/party.py b/party.py
index c3f8fd0..199fc3f 100644
--- a/party.py
+++ b/party.py
@@ -1,6 +1,5 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
-import base64
 import copy
 import uuid
 from trytond.model import ModelSQL, ModelView, fields
@@ -50,11 +49,23 @@ class Party(ModelSQL, ModelView):
         return res
 
     def copy(self, ids, default=None):
+        int_id = isinstance(ids, (int, long))
+        if int_id:
+            ids = [ids]
+
         if default is None:
             default = {}
-        default = default.copy()
-        default['uuid'] = self.default_uuid()
-        return super(Party, self).copy(ids, default=default)
+
+        new_ids = []
+        for party_id in ids:
+            current_default = default.copy()
+            current_default['uuid'] = self.default_uuid()
+            new_id = super(Party, self).copy(party_id, default=current_default)
+            new_ids.append(new_id)
+
+        if int_id:
+            return new_ids[0]
+        return new_ids
 
     def write(self, ids, vals):
         collection_obj = Pool().get('webdav.collection')
@@ -274,7 +285,7 @@ class VCard(Report):
 
         data = ''.join(self.create_vcard(party).serialize() for party in parties)
 
-        return ('vcf', base64.encodestring(data), False, action_report.name)
+        return ('vcf', buffer(data), False, action_report.name)
 
     def create_vcard(self, party):
         '''
@@ -286,7 +297,7 @@ class VCard(Report):
         import vobject
 
         if party.vcard:
-            vcard = vobject.readOne(party.vcard)
+            vcard = vobject.readOne(str(party.vcard))
         else:
             vcard = vobject.vCard()
         if not hasattr(vcard, 'n'):
diff --git a/trytond_party_vcarddav.egg-info/PKG-INFO b/trytond_party_vcarddav.egg-info/PKG-INFO
index 23e55a0..7765405 100644
--- a/trytond_party_vcarddav.egg-info/PKG-INFO
+++ b/trytond_party_vcarddav.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: trytond-party-vcarddav
-Version: 2.2.0
+Version: 2.2.1
 Summary: Add CardDAV on parties
 Home-page: http://www.tryton.org/
 Author: B2CK
diff --git a/webdav.py b/webdav.py
index 68a6156..594011d 100644
--- a/webdav.py
+++ b/webdav.py
@@ -1,6 +1,5 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
-import base64
 import urlparse
 from DAV.errors import DAV_NotFound, DAV_Forbidden
 from trytond.model import ModelView, ModelSQL
@@ -254,7 +253,7 @@ class Collection(ModelSQL, ModelView):
             val = vcard_obj.execute([party_id],
                     {'id': party_id, 'ids': [party_id]},
                     )
-            return base64.decodestring(val[1])
+            return val[1]
         return super(Collection, self).get_data(uri, cache=cache)
 
     def get_address_data(self, uri, cache=None):
@@ -262,11 +261,9 @@ class Collection(ModelSQL, ModelView):
         party_id = self.vcard(uri)
         if not party_id:
             raise DAV_NotFound
-        val = vcard_obj.execute([party_id],
-                {'id': party_id, 'ids': [party_id]},
-                )
-        res = base64.decodestring(val[1])
-        return res.decode('utf-8')
+        return vcard_obj.execute([party_id],
+            {'id': party_id, 'ids': [party_id]},
+            ).decode('utf-8')
 
     def put(self, uri, data, content_type, cache=None):
         import vobject
-- 
tryton-modules-party-vcarddav



More information about the tryton-debian-vcs mailing list