Reviewers: ,
Please review this at http://codereview.tryton.org/502002/ Affected files: M trytond/webdav/webdav.py Index: trytond/webdav/webdav.py =================================================================== --- a/trytond/webdav/webdav.py +++ b/trytond/webdav/webdav.py @@ -644,17 +644,18 @@ class Share(ModelSQL, ModelView): def default_expiration_date(self): return datetime.date.today() + relativedelta(months=1) def get_url(self, ids, name): urls = {} webdav_url = get_webdav_url() for share in self.browse(ids): urls[share.id] = urlparse.urljoin(webdav_url, - urlparse.urlunsplit((None, None, urllib.quote(share.path), + urlparse.urlunsplit((None, None, + urllib.quote(share.path.encode('utf-8')), urllib.urlencode([('key', share.key)]), None))) return urls def match(self, share, command, path): "Test if share match with command and path" today = datetime.date.today() return (path.startswith(share.path) and share.expiration_date > today @@ -754,17 +755,17 @@ class Attachment(ModelSQL, ModelView): return paths def get_url(self, ids, name): webdav_url = get_webdav_url() urls = {} for attachment in self.browse(ids): if attachment.path: urls[attachment.id] = urlparse.urljoin(webdav_url, - urllib.quote(attachment.path)) + urllib.quote(attachment.path.encode('utf-8'))) else: urls[attachment.id] = None return urls def get_shares(self, ids, name): share_obj = Pool().get('webdav.share') shares = dict((x, []) for x in ids) attachements = self.browse(ids) -- tryton-dev@googlegroups.com mailing list