[tryton-debian-vcs] tryton-modules-party-vcarddav branch upstream updated. upstream/4.0.1-1-g247df78
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Dec 6 15:59:38 UTC 2016
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-party-vcarddav.git;a=commitdiff;h=upstream/4.0.1-1-g247df78
commit 247df781a8ef8991726122c641ae7926ae74c83c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Dec 5 09:34:30 2016 +0100
Adding upstream version 4.2.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 371bac5..69d3310 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 4.0.1 - 2016-10-02
+Version 4.2.0 - 2016-11-28
* Bug fixes (see mercurial logs for details)
Version 4.0.0 - 2016-05-02
diff --git a/INSTALL b/INSTALL
index 867959c..f202826 100644
--- a/INSTALL
+++ b/INSTALL
@@ -27,7 +27,7 @@ site-packages directory on your system.
For advanced options, please refer to the easy_install and/or the distutils
documentation:
- http://peak.telecommunity.com/DevCenter/EasyInstall
+ http://setuptools.readthedocs.io/en/latest/easy_install.html
http://docs.python.org/inst/inst.html
To use without installation, extract the archive into ``trytond/modules`` with
diff --git a/PKG-INFO b/PKG-INFO
index 4d4c178..ee288c3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_party_vcarddav
-Version: 4.0.1
+Version: 4.2.0
Summary: Tryton module for CardDAV
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.0/
+Download-URL: http://downloads.tryton.org/4.2/
Description: trytond_party_vcarddav
======================
@@ -64,6 +64,7 @@ Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Hungarian
Classifier: Natural Language :: Italian
+Classifier: Natural Language :: Polish
Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
diff --git a/locale/bg_BG.po b/locale/bg.po
similarity index 100%
rename from locale/bg_BG.po
rename to locale/bg.po
diff --git a/locale/ca_ES.po b/locale/ca.po
similarity index 100%
rename from locale/ca_ES.po
rename to locale/ca.po
diff --git a/locale/cs_CZ.po b/locale/cs.po
similarity index 100%
copy from locale/cs_CZ.po
copy to locale/cs.po
diff --git a/locale/de_DE.po b/locale/de.po
similarity index 90%
rename from locale/de_DE.po
rename to locale/de.po
index 7d81b41..c600f58 100644
--- a/locale/de_DE.po
+++ b/locale/de.po
@@ -16,7 +16,7 @@ msgstr "VCard"
msgctxt "help:party.party,uuid:"
msgid "Universally Unique Identifier"
-msgstr "Universally Unique Identifier"
+msgstr "Universeller eindeutiger Identifikator"
msgctxt "model:ir.action,name:report_party_vcard"
msgid "VCard"
diff --git a/locale/es_ES.po b/locale/es.po
similarity index 100%
rename from locale/es_ES.po
rename to locale/es.po
diff --git a/locale/lo_LA.po b/locale/es_419.po
similarity index 100%
rename from locale/lo_LA.po
rename to locale/es_419.po
diff --git a/locale/es_AR.po b/locale/es_AR.po
deleted file mode 100644
index 24aab1a..0000000
--- a/locale/es_AR.po
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-msgid ""
-msgstr "Content-Type: text/plain; charset=utf-8\n"
-
-msgctxt "error:party.party:"
-msgid "The UUID of the party must be unique."
-msgstr "El UUID de la entidad debe ser único."
-
-msgctxt "field:party.party,uuid:"
-msgid "UUID"
-msgstr "UUID"
-
-msgctxt "field:party.party,vcard:"
-msgid "VCard"
-msgstr "VCard"
-
-msgctxt "help:party.party,uuid:"
-msgid "Universally Unique Identifier"
-msgstr "Identificador Universal Único"
-
-msgctxt "model:ir.action,name:report_party_vcard"
-msgid "VCard"
-msgstr "VCard"
diff --git a/locale/es_CO.po b/locale/es_CO.po
deleted file mode 100644
index f25859e..0000000
--- a/locale/es_CO.po
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-msgid ""
-msgstr "Content-Type: text/plain; charset=utf-8\n"
-
-msgctxt "error:party.party:"
-msgid "The UUID of the party must be unique."
-msgstr "El UUID del tercero debe ser único."
-
-msgctxt "field:party.party,uuid:"
-msgid "UUID"
-msgstr "UUID"
-
-msgctxt "field:party.party,vcard:"
-msgid "VCard"
-msgstr "VCard"
-
-msgctxt "help:party.party,uuid:"
-msgid "Universally Unique Identifier"
-msgstr "Identificador Único Universal"
-
-msgctxt "model:ir.action,name:report_party_vcard"
-msgid "VCard"
-msgstr "VCard"
diff --git a/locale/es_MX.po b/locale/es_MX.po
deleted file mode 100644
index 34eb4c4..0000000
--- a/locale/es_MX.po
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-msgid ""
-msgstr "Content-Type: text/plain; charset=utf-8\n"
-
-msgctxt "error:party.party:"
-msgid "The UUID of the party must be unique."
-msgstr "El UUID de la entidad debe ser único."
-
-msgctxt "field:party.party,uuid:"
-msgid "UUID"
-msgstr "UUID"
-
-msgctxt "field:party.party,vcard:"
-msgid "VCard"
-msgstr "vCard"
-
-msgctxt "help:party.party,uuid:"
-msgid "Universally Unique Identifier"
-msgstr "Identificador universal único."
-
-msgctxt "model:ir.action,name:report_party_vcard"
-msgid "VCard"
-msgstr "vCard"
diff --git a/locale/fr_FR.po b/locale/fr.po
similarity index 100%
rename from locale/fr_FR.po
rename to locale/fr.po
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index de94f2b..35e10dc 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -10,9 +10,10 @@ msgctxt "field:party.party,uuid:"
msgid "UUID"
msgstr ""
+#, fuzzy
msgctxt "field:party.party,vcard:"
msgid "VCard"
-msgstr ""
+msgstr "VCard"
msgctxt "help:party.party,uuid:"
msgid "Universally Unique Identifier"
@@ -20,4 +21,4 @@ msgstr ""
msgctxt "model:ir.action,name:report_party_vcard"
msgid "VCard"
-msgstr ""
+msgstr "VCard"
diff --git a/locale/lt_LT.po b/locale/lo.po
similarity index 100%
rename from locale/lt_LT.po
rename to locale/lo.po
diff --git a/locale/nl_NL.po b/locale/lt.po
similarity index 100%
rename from locale/nl_NL.po
rename to locale/lt.po
diff --git a/locale/cs_CZ.po b/locale/nl.po
similarity index 100%
rename from locale/cs_CZ.po
rename to locale/nl.po
diff --git a/locale/es_EC.po b/locale/pl.po
similarity index 79%
rename from locale/es_EC.po
rename to locale/pl.po
index e77f395..0b1db2d 100644
--- a/locale/es_EC.po
+++ b/locale/pl.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:party.party:"
msgid "The UUID of the party must be unique."
-msgstr "El UUID del tercero debe ser único."
+msgstr "UUID strony musi być unikatowy."
msgctxt "field:party.party,uuid:"
msgid "UUID"
@@ -12,11 +12,11 @@ msgstr "UUID"
msgctxt "field:party.party,vcard:"
msgid "VCard"
-msgstr "vCard"
+msgstr "VCard"
msgctxt "help:party.party,uuid:"
msgid "Universally Unique Identifier"
-msgstr "Identificador Universal Único"
+msgstr "Uniwersalny Unikatowy Identyfikator"
msgctxt "model:ir.action,name:report_party_vcard"
msgid "VCard"
diff --git a/locale/ru_RU.po b/locale/ru.po
similarity index 100%
rename from locale/ru_RU.po
rename to locale/ru.po
diff --git a/locale/sl_SI.po b/locale/sl.po
similarity index 100%
rename from locale/sl_SI.po
rename to locale/sl.po
diff --git a/party.py b/party.py
index 28eae84..af653ad 100644
--- a/party.py
+++ b/party.py
@@ -236,7 +236,8 @@ class Party:
class Address:
__name__ = 'party.address'
- def vcard2values(self, adr):
+ @classmethod
+ def vcard2values(cls, adr):
'''
Convert adr from vcard to values for create or write
'''
@@ -319,8 +320,7 @@ class VCard(Report):
adr = vcard.add('adr')
if not hasattr(adr, 'value'):
adr.value = vobject.vcard.Address()
- adr.value.street = address.street and address.street + (
- address.streetbis and (" " + address.streetbis) or '') or ''
+ adr.value.street = address.street or ''
adr.value.city = address.city or ''
if address.subdivision:
adr.value.region = address.subdivision.name or ''
diff --git a/setup.py b/setup.py
index 994c50c..11e5079 100644
--- a/setup.py
+++ b/setup.py
@@ -83,6 +83,7 @@ setup(name=name,
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Italian',
+ 'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
diff --git a/tryton.cfg b/tryton.cfg
index 7424c73..f42ac11 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.0.1
+version=4.2.0
depends:
ir
party
diff --git a/trytond_party_vcarddav.egg-info/PKG-INFO b/trytond_party_vcarddav.egg-info/PKG-INFO
index ea7f7e8..5851c62 100644
--- a/trytond_party_vcarddav.egg-info/PKG-INFO
+++ b/trytond_party_vcarddav.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-party-vcarddav
-Version: 4.0.1
+Version: 4.2.0
Summary: Tryton module for CardDAV
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.0/
+Download-URL: http://downloads.tryton.org/4.2/
Description: trytond_party_vcarddav
======================
@@ -64,6 +64,7 @@ Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Hungarian
Classifier: Natural Language :: Italian
+Classifier: Natural Language :: Polish
Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
diff --git a/trytond_party_vcarddav.egg-info/SOURCES.txt b/trytond_party_vcarddav.egg-info/SOURCES.txt
index df057d9..ad6b0b1 100644
--- a/trytond_party_vcarddav.egg-info/SOURCES.txt
+++ b/trytond_party_vcarddav.egg-info/SOURCES.txt
@@ -13,46 +13,42 @@ tryton.cfg
./party.xml
./tryton.cfg
./webdav.py
-./locale/bg_BG.po
-./locale/ca_ES.po
-./locale/cs_CZ.po
-./locale/de_DE.po
-./locale/es_AR.po
-./locale/es_CO.po
-./locale/es_EC.po
-./locale/es_ES.po
-./locale/es_MX.po
-./locale/fr_FR.po
+./locale/bg.po
+./locale/ca.po
+./locale/cs.po
+./locale/de.po
+./locale/es.po
+./locale/es_419.po
+./locale/fr.po
./locale/hu_HU.po
./locale/it_IT.po
./locale/ja_JP.po
-./locale/lo_LA.po
-./locale/lt_LT.po
-./locale/nl_NL.po
+./locale/lo.po
+./locale/lt.po
+./locale/nl.po
+./locale/pl.po
./locale/pt_BR.po
-./locale/ru_RU.po
-./locale/sl_SI.po
+./locale/ru.po
+./locale/sl.po
./locale/zh_CN.po
doc/index.rst
-locale/bg_BG.po
-locale/ca_ES.po
-locale/cs_CZ.po
-locale/de_DE.po
-locale/es_AR.po
-locale/es_CO.po
-locale/es_EC.po
-locale/es_ES.po
-locale/es_MX.po
-locale/fr_FR.po
+locale/bg.po
+locale/ca.po
+locale/cs.po
+locale/de.po
+locale/es.po
+locale/es_419.po
+locale/fr.po
locale/hu_HU.po
locale/it_IT.po
locale/ja_JP.po
-locale/lo_LA.po
-locale/lt_LT.po
-locale/nl_NL.po
+locale/lo.po
+locale/lt.po
+locale/nl.po
+locale/pl.po
locale/pt_BR.po
-locale/ru_RU.po
-locale/sl_SI.po
+locale/ru.po
+locale/sl.po
locale/zh_CN.po
trytond_party_vcarddav.egg-info/PKG-INFO
trytond_party_vcarddav.egg-info/SOURCES.txt
diff --git a/trytond_party_vcarddav.egg-info/requires.txt b/trytond_party_vcarddav.egg-info/requires.txt
index 5aa39ff..25f0b02 100644
--- a/trytond_party_vcarddav.egg-info/requires.txt
+++ b/trytond_party_vcarddav.egg-info/requires.txt
@@ -1,6 +1,6 @@
vobject >= 0.8.0
PyWebDAV >= 0.9.8
python-sql
-trytond_party >= 4.0, < 4.1
-trytond_webdav >= 4.0, < 4.1
-trytond >= 4.0, < 4.1
+trytond_party >= 4.2, < 4.3
+trytond_webdav >= 4.2, < 4.3
+trytond >= 4.2, < 4.3
diff --git a/webdav.py b/webdav.py
index 912e69f..930f3d3 100644
--- a/webdav.py
+++ b/webdav.py
@@ -1,5 +1,7 @@
# 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 logging
+
from pywebdav.lib.errors import DAV_NotFound, DAV_Forbidden
from pywebdav.lib.constants import COLLECTION, OBJECT
from sql.functions import Extract
@@ -10,9 +12,11 @@ from trytond.tools import reduce_ids, grouped_slice
from trytond.transaction import Transaction
from trytond.cache import Cache
from trytond.pool import Pool, PoolMeta
+from trytond.exceptions import UserError, UserWarning, ConcurrencyException
__all__ = ['Collection']
__metaclass__ = PoolMeta
+logger = logging.getLogger(__name__)
CARDDAV_NS = 'urn:ietf:params:xml:ns:carddav'
@@ -291,7 +295,11 @@ class Collection:
values = Party().vcard2values(vcard)
try:
party_id, = Party.create([values])
+ except (ConcurrencyException, UserError, UserWarning):
+ logger.debug('Create party failed', exc_info=True)
+ raise DAV_Forbidden
except Exception:
+ logger.error('Create party failed', exc_info=True)
raise DAV_Forbidden
party = Party(party_id)
return (Transaction().database.name + '/Contacts/' +
@@ -302,7 +310,11 @@ class Collection:
values = party.vcard2values(vcard)
try:
Party.write([party], values)
+ except (ConcurrencyException, UserError, UserWarning):
+ logger.debug('Write party failed', exc_info=True)
+ raise DAV_Forbidden
except Exception:
+ logger.error('Write party failed', exc_info=True)
raise DAV_Forbidden
return
return super(Collection, cls).put(uri, data, content_type,
@@ -336,7 +348,11 @@ class Collection:
if party_id:
try:
Party.delete([Party(party_id)])
+ except (ConcurrencyException, UserError, UserWarning):
+ logger.debug('Delete party failed', exc_info=True)
+ raise DAV_Forbidden
except Exception:
+ logger.error('Delete party failed', exc_info=True)
raise DAV_Forbidden
return 200
return super(Collection, cls).rm(uri, cache=cache)
--
tryton-modules-party-vcarddav
More information about the tryton-debian-vcs
mailing list