summaryrefslogtreecommitdiff
path: root/addons/document_webdav
diff options
context:
space:
mode:
authormtr <mtr@mtr>2010-12-28 09:36:46 +0530
committermtr <mtr@mtr>2010-12-28 09:36:46 +0530
commit84b71877eef38ace2ea893cd510e4bd3d27d8392 (patch)
treec6efeed66430b808c4a2ba7ab474882bf3cc6946 /addons/document_webdav
parent24c1497631f06bbe0d4aa89a52391936e9d5d3a2 (diff)
parent3f818581a23216572e100bbb1aad45fd100b82d9 (diff)
[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: mtr@mtr-20101228040646-7zvz505vngje86j6
Diffstat (limited to 'addons/document_webdav')
-rw-r--r--addons/document_webdav/dav_fs.py104
-rw-r--r--addons/document_webdav/document_webdav.py34
-rw-r--r--addons/document_webdav/i18n/bg.po26
-rw-r--r--addons/document_webdav/i18n/cs.po26
-rw-r--r--addons/document_webdav/i18n/da.po26
-rw-r--r--addons/document_webdav/i18n/de.po26
-rw-r--r--addons/document_webdav/i18n/document_webdav.pot24
-rw-r--r--addons/document_webdav/i18n/el.po26
-rw-r--r--addons/document_webdav/i18n/es.po48
-rw-r--r--addons/document_webdav/i18n/es_EC.po37
-rw-r--r--addons/document_webdav/i18n/et.po26
-rw-r--r--addons/document_webdav/i18n/eu.po26
-rw-r--r--addons/document_webdav/i18n/fr.po26
-rw-r--r--addons/document_webdav/i18n/hr.po26
-rw-r--r--addons/document_webdav/i18n/id.po26
-rw-r--r--addons/document_webdav/i18n/it.po26
-rw-r--r--addons/document_webdav/i18n/mn.po26
-rw-r--r--addons/document_webdav/i18n/nl.po26
-rw-r--r--addons/document_webdav/i18n/pt.po26
-rw-r--r--addons/document_webdav/i18n/pt_BR.po26
-rw-r--r--addons/document_webdav/i18n/sl.po26
-rw-r--r--addons/document_webdav/i18n/sr.po26
-rw-r--r--addons/document_webdav/i18n/sr@latin.po62
-rw-r--r--addons/document_webdav/i18n/sv.po26
-rw-r--r--addons/document_webdav/i18n/zh_CN.po26
-rw-r--r--addons/document_webdav/nodes.py197
-rw-r--r--addons/document_webdav/security/ir.model.access.csv1
-rw-r--r--addons/document_webdav/test/webdav_test1.yml9
-rw-r--r--addons/document_webdav/test_davclient.py5
-rw-r--r--addons/document_webdav/webdav.py33
-rw-r--r--addons/document_webdav/webdav_server.py144
-rw-r--r--addons/document_webdav/webdav_view.xml63
32 files changed, 1169 insertions, 86 deletions
diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py
index c34a323fadb..dd46d8959ae 100644
--- a/addons/document_webdav/dav_fs.py
+++ b/addons/document_webdav/dav_fs.py
@@ -35,6 +35,9 @@ import urllib
from DAV.davcmd import copyone, copytree, moveone, movetree, delone, deltree
from cache import memoize
from tools import misc
+
+from webdav import mk_lock_response
+
try:
from tools.dict_tools import dict_merge2
except ImportError:
@@ -209,18 +212,20 @@ class openerp_dav_handler(dav_interface):
self.parent.log_error("Cannot %s: %s", opname, err.strerror)
self.parent.log_message("Exc: %s",traceback.format_exc())
raise default_exc(err.strerror)
- except Exception,e:
+ except Exception, e:
import traceback
if cr: cr.close()
self.parent.log_error("Cannot %s: %s", opname, str(e))
self.parent.log_message("Exc: %s",traceback.format_exc())
raise default_exc("Operation failed")
- #def _get_dav_lockdiscovery(self, uri):
- # raise DAV_NotFound
+ def _get_dav_lockdiscovery(self, uri):
+ """ We raise that so that the node API is used """
+ raise DAV_NotFound
- #def A_get_dav_supportedlock(self, uri):
- # raise DAV_NotFound
+ def _get_dav_supportedlock(self, uri):
+ """ We raise that so that the node API is used """
+ raise DAV_NotFound
def match_prop(self, uri, match, ns, propname):
if self.M_NS.has_key(ns):
@@ -272,7 +277,9 @@ class openerp_dav_handler(dav_interface):
ua = self.parent.headers.get('User-Agent', False)
ctx = {}
if ua:
+ print ua
if 'iPhone' in ua:
+ print "iphone"
ctx['DAV-client'] = 'iPhone'
elif 'Konqueror' in ua:
ctx['DAV-client'] = 'GroupDAV'
@@ -346,7 +353,7 @@ class openerp_dav_handler(dav_interface):
""" Return the base URI of this request, or even join it with the
ajoin path elements
"""
- return self.baseuri+ '/'.join(ajoin)
+ return self.parent.get_baseuri(self) + '/'.join(ajoin)
@memoize(4)
def db_list(self):
@@ -911,6 +918,91 @@ class openerp_dav_handler(dav_interface):
cr.close()
return result
+ def unlock(self, uri, token):
+ """ Unlock a resource from that token
+
+ @return True if unlocked, False if no lock existed, Exceptions
+ """
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ if not dbname:
+ if cr: cr.close()
+ raise DAV_Error, 409
+
+ node = self.uri2object(cr, uid, pool, uri2)
+ try:
+ node_fn = node.dav_unlock
+ except AttributeError:
+ # perhaps the node doesn't support locks
+ cr.close()
+ raise DAV_Error(400, 'No locks for this resource')
+
+ res = self._try_function(node_fn, (cr, token), "unlock %s" % uri, cr=cr)
+ cr.commit()
+ cr.close()
+ return res
+
+ def lock(self, uri, lock_data):
+ """ Lock (may create) resource.
+ Data is a dict, may contain:
+ depth, token, refresh, lockscope, locktype, owner
+ """
+ cr, uid, pool, dbname, uri2 = self.get_cr(uri)
+ created = False
+ if not dbname:
+ if cr: cr.close()
+ raise DAV_Error, 409
+
+ try:
+ node = self.uri2object(cr, uid, pool, uri2[:])
+ except Exception:
+ node = False
+
+ objname = misc.ustr(uri2[-1])
+
+ if not node:
+ dir_node = self.uri2object(cr, uid, pool, uri2[:-1])
+ if not dir_node:
+ cr.close()
+ raise DAV_NotFound('Parent folder not found')
+
+ # We create a new node (file) but with empty data=None,
+ # as in RFC4918 p. 9.10.4
+ node = self._try_function(dir_node.create_child, (cr, objname, None),
+ "create %s" % objname, cr=cr)
+ if not node:
+ cr.commit()
+ cr.close()
+ raise DAV_Error(400, "Failed to create resource")
+
+ created = True
+
+ try:
+ node_fn = node.dav_lock
+ except AttributeError:
+ # perhaps the node doesn't support locks
+ cr.close()
+ raise DAV_Error(400, 'No locks for this resource')
+
+ # Obtain the lock on the node
+ lres, pid, token = self._try_function(node_fn, (cr, lock_data), "lock %s" % objname, cr=cr)
+
+ if not lres:
+ cr.commit()
+ cr.close()
+ raise DAV_Error(423, "Resource already locked")
+
+ assert isinstance(lres, list), 'lres: %s' % repr(lres)
+
+ try:
+ data = mk_lock_response(self, uri, lres)
+ cr.commit()
+ except Exception:
+ cr.close()
+ raise
+
+ cr.close()
+ return created, data, token
+
@memoize(CACHE_SIZE)
def is_collection(self, uri):
""" test if the given uri is a collection """
diff --git a/addons/document_webdav/document_webdav.py b/addons/document_webdav/document_webdav.py
index d2107e4f927..f5fa7b591d8 100644
--- a/addons/document_webdav/document_webdav.py
+++ b/addons/document_webdav/document_webdav.py
@@ -80,6 +80,10 @@ class dav_dir_property(osv.osv):
_name = 'document.webdav.dir.property'
_columns = {
+ 'create_date': fields.datetime('Date Created', readonly=True),
+ 'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
+ 'write_date': fields.datetime('Date Modified', readonly=True),
+ 'write_uid': fields.many2one('res.users', 'Last Modification User', readonly=True),
'dir_id': fields.many2one('document.directory', 'Directory', required=False, select=1),
'namespace': fields.char('Namespace', size=127, required=True),
'name': fields.char('Name', size=64, required=True),
@@ -93,4 +97,34 @@ class dav_dir_property(osv.osv):
dav_dir_property()
+class dav_file_property(osv.osv):
+ """ Arbitrary WebDAV properties, attached to ir.attachments.
+
+ A special case is the locks that can be applied on file nodes.
+
+ There _can_ be properties without a file (RFC?), which means that they
+ globally apply to all the attachments of the present database.
+
+ TODO access permissions, per property.
+ """
+ _name = 'document.webdav.file.property'
+
+ _columns = {
+ 'create_date': fields.datetime('Date Created', readonly=True),
+ 'create_uid': fields.many2one('res.users', 'Creator', readonly=True),
+ 'write_date': fields.datetime('Date Modified', readonly=True),
+ 'write_uid': fields.many2one('res.users', 'Last Modification User', readonly=True),
+ 'file_id': fields.many2one('ir.attachment', 'Document', required=False, select=1),
+ 'namespace': fields.char('Namespace', size=127, required=True),
+ 'name': fields.char('Name', size=64, required=True),
+ 'value': fields.text('Value'),
+ 'do_subst': fields.boolean('Substitute', required=True),
+ }
+
+ _defaults = {
+ 'do_subst': False,
+ }
+
+dav_file_property()
+
#eof \ No newline at end of file
diff --git a/addons/document_webdav/i18n/bg.po b/addons/document_webdav/i18n/bg.po
index 1863c409199..6fa1eefa226 100644
--- a/addons/document_webdav/i18n/bg.po
+++ b/addons/document_webdav/i18n/bg.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 03:52+0000\n"
"Last-Translator: Boris <boris.t.ivanov@gmail.com>\n"
"Language-Team: Bulgarian <bg@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/cs.po b/addons/document_webdav/i18n/cs.po
index 3d2370be448..b1df175defb 100644
--- a/addons/document_webdav/i18n/cs.po
+++ b/addons/document_webdav/i18n/cs.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 03:52+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"Language-Team: Czech <cs@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/da.po b/addons/document_webdav/i18n/da.po
index a83c08d7203..1651678b4b4 100644
--- a/addons/document_webdav/i18n/da.po
+++ b/addons/document_webdav/i18n/da.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-10-13 07:44+0000\n"
"Last-Translator: Martin Pihl <martinpihl@gmail.com>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/de.po b/addons/document_webdav/i18n/de.po
index 1f33e682790..5fbc5df4b12 100644
--- a/addons/document_webdav/i18n/de.po
+++ b/addons/document_webdav/i18n/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-11-30 15:15+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\n"
@@ -15,7 +15,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -51,6 +51,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr "Das Verzeichnis kann nicht sich selbst übergeordnet werden"
diff --git a/addons/document_webdav/i18n/document_webdav.pot b/addons/document_webdav/i18n/document_webdav.pot
index 95b1d17fb25..17127395a27 100644
--- a/addons/document_webdav/i18n/document_webdav.pot
+++ b/addons/document_webdav/i18n/document_webdav.pot
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0.0-rc1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2010-12-15 15:05:17+0000\n"
-"PO-Revision-Date: 2010-12-15 15:05:17+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44:05+0000\n"
+"PO-Revision-Date: 2010-12-21 19:44:05+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -48,6 +48,26 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid " With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a [webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+""
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/el.po b/addons/document_webdav/i18n/el.po
index a134b57d3c6..c773a2d9253 100644
--- a/addons/document_webdav/i18n/el.po
+++ b/addons/document_webdav/i18n/el.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 06:09+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"Language-Team: Greek <el@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/es.po b/addons/document_webdav/i18n/es.po
index 4e9c1988904..d9901b7498b 100644
--- a/addons/document_webdav/i18n/es.po
+++ b/addons/document_webdav/i18n/es.po
@@ -7,15 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
-"PO-Revision-Date: 2010-12-09 10:04+0000\n"
-"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
-"<jesteve@zikzakmedia.com>\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
+"PO-Revision-Date: 2010-12-23 23:51+0000\n"
+"Last-Translator: Raimon Esteve (Zikzakmedia) <resteve@zikzakmedia.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -51,6 +50,45 @@ msgid "PyWebDAV Import Error!"
msgstr "¡Error de importación PyWebDAV!"
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+" Con este módulo se activa el servidor WebDAV para los documentos.\n"
+" Puede utilizar cualquier navegador compatible para ver los archivos "
+"adjuntos de forma remota OpenObject.\n"
+"\n"
+" Después de la instalación, el servidor WebDAV puede ser controlado en la "
+"sección [webdav] de la configuración del servidor.\n"
+" Parámetros de configuración del servidor:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr "¡El directorio no puede ser su propio padre!"
diff --git a/addons/document_webdav/i18n/es_EC.po b/addons/document_webdav/i18n/es_EC.po
index e1a1cc97622..7f11bacc98f 100644
--- a/addons/document_webdav/i18n/es_EC.po
+++ b/addons/document_webdav/i18n/es_EC.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-09-17 19:10+0000\n"
"Last-Translator: Paco Molinero <paco@byasl.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
@@ -134,3 +156,14 @@ msgstr ""
#: field:document.webdav.dir.property,do_subst:0
msgid "Substitute"
msgstr ""
+
+#~ msgid ""
+#~ "This is a complete document management system:\n"
+#~ "\t* WebDav Interface\n"
+#~ "\t* User Authentification\n"
+#~ "\t* Document Indexation\n"
+#~ msgstr ""
+#~ "Esto es un completo sistema de gestión de documentos:\n"
+#~ "\t* Interfaz WebDav\n"
+#~ "\t* Autenticación de usuario\n"
+#~ "\t* Indexación de documento\n"
diff --git a/addons/document_webdav/i18n/et.po b/addons/document_webdav/i18n/et.po
index fe8f53f8393..65a24dfea77 100644
--- a/addons/document_webdav/i18n/et.po
+++ b/addons/document_webdav/i18n/et.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 06:12+0000\n"
"Last-Translator: lyyser <Unknown>\n"
"Language-Team: Estonian <et@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/eu.po b/addons/document_webdav/i18n/eu.po
index dbf9cce0182..bb44fce1902 100644
--- a/addons/document_webdav/i18n/eu.po
+++ b/addons/document_webdav/i18n/eu.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-10-08 07:38+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Basque <eu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/fr.po b/addons/document_webdav/i18n/fr.po
index e4fd7447866..f94c03b9426 100644
--- a/addons/document_webdav/i18n/fr.po
+++ b/addons/document_webdav/i18n/fr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-12-16 17:52+0000\n"
"Last-Translator: Maxime Chambreuil (http://www.savoirfairelinux.com) "
"<maxime.chambreuil@savoirfairelinux.com>\n"
@@ -15,7 +15,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -51,6 +51,28 @@ msgid "PyWebDAV Import Error!"
msgstr "Erreur d'import PyWebDAV !"
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr "Un répertoire ne peut pas être son propre parent !"
diff --git a/addons/document_webdav/i18n/hr.po b/addons/document_webdav/i18n/hr.po
index 5234ff94ce0..ade260d2264 100644
--- a/addons/document_webdav/i18n/hr.po
+++ b/addons/document_webdav/i18n/hr.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 06:12+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/id.po b/addons/document_webdav/i18n/id.po
index b140acb3ccb..f3179fe632d 100644
--- a/addons/document_webdav/i18n/id.po
+++ b/addons/document_webdav/i18n/id.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-17 09:23+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Indonesian <id@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/it.po b/addons/document_webdav/i18n/it.po
index 8ce2d16cea2..d0b69abe463 100644
--- a/addons/document_webdav/i18n/it.po
+++ b/addons/document_webdav/i18n/it.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-11-24 09:31+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Italian <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr "La cartella non può essere padre di sè stessa!"
diff --git a/addons/document_webdav/i18n/mn.po b/addons/document_webdav/i18n/mn.po
index 369783b3c4d..f4657158903 100644
--- a/addons/document_webdav/i18n/mn.po
+++ b/addons/document_webdav/i18n/mn.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-09-29 11:14+0000\n"
"Last-Translator: ub121 <ubs121@gmail.com>\n"
"Language-Team: Mongolian <mn@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/nl.po b/addons/document_webdav/i18n/nl.po
index c7afff16df0..e3b50643119 100644
--- a/addons/document_webdav/i18n/nl.po
+++ b/addons/document_webdav/i18n/nl.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-12-01 07:18+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr "Map kan niet bovenliggend aan zichzelf zijn!"
diff --git a/addons/document_webdav/i18n/pt.po b/addons/document_webdav/i18n/pt.po
index 3d7f93fad6d..d6e22381be1 100644
--- a/addons/document_webdav/i18n/pt.po
+++ b/addons/document_webdav/i18n/pt.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-12-11 22:47+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Portuguese <pt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr "Uma pasta não pode ser ascendente de si mesma"
diff --git a/addons/document_webdav/i18n/pt_BR.po b/addons/document_webdav/i18n/pt_BR.po
index c867def627a..783200cf5b2 100644
--- a/addons/document_webdav/i18n/pt_BR.po
+++ b/addons/document_webdav/i18n/pt_BR.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 06:12+0000\n"
"Last-Translator: Pedro_Maschio <pedro.bicudo@tgtconsult.com.br>\n"
"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/sl.po b/addons/document_webdav/i18n/sl.po
index d53180749d9..a7296486ece 100644
--- a/addons/document_webdav/i18n/sl.po
+++ b/addons/document_webdav/i18n/sl.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 06:12+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/sr.po b/addons/document_webdav/i18n/sr.po
index 5a1e1ea0cd6..734635c437e 100644
--- a/addons/document_webdav/i18n/sr.po
+++ b/addons/document_webdav/i18n/sr.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-11-03 07:58+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Serbian <sr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/i18n/sr@latin.po b/addons/document_webdav/i18n/sr@latin.po
index fb32f52067a..20ed5d42a9c 100644
--- a/addons/document_webdav/i18n/sr@latin.po
+++ b/addons/document_webdav/i18n/sr@latin.po
@@ -7,26 +7,26 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
-"PO-Revision-Date: 2010-12-10 16:37+0000\n"
-"Last-Translator: Milan Milosevic <Unknown>\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
+"PO-Revision-Date: 2010-12-23 16:24+0000\n"
+"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Serbian latin <sr@latin@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
#: constraint:document.directory:0
msgid "Error! You can not create recursive Directories."
-msgstr ""
+msgstr "Greska ! Ne mozes kreirati rekursivne Direktorijume."
#. module: document_webdav
#: view:document.webdav.dir.property:0
#: field:document.webdav.dir.property,namespace:0
msgid "Namespace"
-msgstr ""
+msgstr "Prostor"
#. module: document_webdav
#: field:document.directory,dav_prop_ids:0
@@ -36,12 +36,12 @@ msgstr "DAV osobine"
#. module: document_webdav
#: view:document.webdav.dir.property:0
msgid "Group By..."
-msgstr ""
+msgstr "Grupisano po..."
#. module: document_webdav
#: view:document.directory:0
msgid "These properties will be added to WebDAV requests"
-msgstr ""
+msgstr "Ova ce svojstva biti dodana WebDAV zahtevima"
#. module: document_webdav
#: code:addons/document_webdav/webdav.py:0
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
@@ -57,12 +79,12 @@ msgstr ""
#. module: document_webdav
#: view:document.directory:0
msgid "Dynamic context"
-msgstr ""
+msgstr "Dinamicki Kontekst"
#. module: document_webdav
#: view:document.directory:0
msgid "WebDAV properties"
-msgstr ""
+msgstr "WebDAV Svojstva"
#. module: document_webdav
#: sql_constraint:document.directory:0
@@ -81,44 +103,44 @@ msgstr ""
#. module: document_webdav
#: model:ir.ui.menu,name:document_webdav.menu_dir_props
msgid "DAV properties for folders"
-msgstr ""
+msgstr "DAV svojstva za foldere"
#. module: document_webdav
#: view:document.directory:0
#: view:document.webdav.dir.property:0
msgid "Properties"
-msgstr ""
+msgstr "Svojstva"
#. module: document_webdav
#: field:document.webdav.dir.property,name:0
msgid "Name"
-msgstr ""
+msgstr "Ime"
#. module: document_webdav
#: model:ir.model,name:document_webdav.model_document_webdav_dir_property
msgid "document.webdav.dir.property"
-msgstr ""
+msgstr "document.webdav.dir.property"
#. module: document_webdav
#: field:document.webdav.dir.property,value:0
msgid "Value"
-msgstr ""
+msgstr "Vrednost"
#. module: document_webdav
#: field:document.webdav.dir.property,dir_id:0
#: model:ir.model,name:document_webdav.model_document_directory
msgid "Directory"
-msgstr ""
+msgstr "Direktorijum"
#. module: document_webdav
#: view:document.webdav.dir.property:0
msgid "Dir"
-msgstr ""
+msgstr "Dir"
#. module: document_webdav
#: model:ir.module.module,shortdesc:document_webdav.module_meta_information
msgid "WebDAV server for Document Management"
-msgstr ""
+msgstr "WebDAV server za Upravljanje Dokumentima"
#. module: document_webdav
#: sql_constraint:document.directory:0
@@ -128,9 +150,9 @@ msgstr ""
#. module: document_webdav
#: view:document.webdav.dir.property:0
msgid "Search Document storage"
-msgstr ""
+msgstr "Pretrazi skladiste Dokumenata"
#. module: document_webdav
#: field:document.webdav.dir.property,do_subst:0
msgid "Substitute"
-msgstr ""
+msgstr "Zamena"
diff --git a/addons/document_webdav/i18n/sv.po b/addons/document_webdav/i18n/sv.po
index f80ba6d4a31..7fd837498bb 100644
--- a/addons/document_webdav/i18n/sv.po
+++ b/addons/document_webdav/i18n/sv.po
@@ -7,14 +7,14 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-11-30 17:03+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -50,6 +50,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr "Katalogen kan inte ha sig själv som förälder!"
diff --git a/addons/document_webdav/i18n/zh_CN.po b/addons/document_webdav/i18n/zh_CN.po
index f4c6a03861a..74183ca9d08 100644
--- a/addons/document_webdav/i18n/zh_CN.po
+++ b/addons/document_webdav/i18n/zh_CN.po
@@ -6,14 +6,14 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2010-12-15 15:05+0000\n"
+"POT-Creation-Date: 2010-12-21 19:44+0000\n"
"PO-Revision-Date: 2010-08-03 06:12+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-12-17 05:45+0000\n"
+"X-Launchpad-Export-Date: 2010-12-24 05:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav
@@ -49,6 +49,28 @@ msgid "PyWebDAV Import Error!"
msgstr ""
#. module: document_webdav
+#: model:ir.module.module,description:document_webdav.module_meta_information
+msgid ""
+" With this module, the WebDAV server for the documents is activated.\n"
+" You can then use any compatible browser to remotely see the "
+"attachments of OpenObject.\n"
+"\n"
+" After installation, the webDAV server can be controlled by a "
+"[webdav] section in the server's config.\n"
+" Server Configuration Parameter:\n"
+" [webdav]\n"
+" ; enable = True ; Serve webdav over the http(s) servers\n"
+" ; vdir = webdav ; the directory that webdav will be served at\n"
+" ; this default val means that webdav will be\n"
+" ; on \"http://localhost:8069/webdav/\n"
+" ; verbose = True ; Turn on the verbose messages of webdav\n"
+" ; debug = True ; Turn on the debugging messages of webdav\n"
+" ; since the messages are routed to the python logging, with\n"
+" ; levels \"debug\" and \"debug_rpc\" respectively, you can leave\n"
+" ; these options on\n"
+msgstr ""
+
+#. module: document_webdav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
diff --git a/addons/document_webdav/nodes.py b/addons/document_webdav/nodes.py
index 8bea54ab7d3..fc48a47056a 100644
--- a/addons/document_webdav/nodes.py
+++ b/addons/document_webdav/nodes.py
@@ -22,14 +22,14 @@
from document import nodes
from tools.safe_eval import safe_eval as eval
+import time
+import urllib
+import uuid
try:
from tools.dict_tools import dict_filter
except ImportError:
from document.dict_tools import dict_filter
-import urllib
-
-
class node_acl_mixin(object):
def _get_dav_owner(self, cr):
return self.uuser
@@ -116,6 +116,153 @@ class node_acl_mixin(object):
return val
return None
+ def _dav_lock_hlpr(self, cr, lock_data, par_class, prop_model,
+ prop_ref_field, res_id):
+ """ Helper, which uses the dav properties table for placing locks
+
+ @param lock_data a dictionary of input to this function.
+ @return list of tuples, DAV:activelock _contents_ structure.
+ See webdav.py:class Prop2Xml() for semantics
+
+ Note: although the DAV response shall be an <activelock/>, this
+ function will only return the elements inside the activelock,
+ because the calling function needs to append the <lockroot/> in
+ it. See webdav.py:mk_lock_response()
+
+ In order to reuse code, this function can be called with
+ lock_data['unlock_mode']=True, in order to unlock.
+
+ @return bool in unlock mode, (davstruct, prop_id, token) in lock/refresh,
+ or (False, prop_id, token) if already locked,
+ or (False, False, False) if lock not found to refresh
+ """
+ assert prop_model
+ assert res_id
+ assert isinstance(lock_data, dict), '%r' % lock_data
+ propobj = self.context._dirobj.pool.get(prop_model)
+ uid = self.context.uid
+ ctx = self.context.context.copy()
+ ctx.update(self.dctx)
+ ctx.update({'uid': uid, 'dbname': self.context.dbname })
+ ctx['node_classname'] = "%s.%s" % (self.__class__.__module__, self.__class__.__name__)
+ dict_filter(self.context.extra_ctx, ['username', 'groupname', 'webdav_path'], ctx)
+ sdomain = [(prop_ref_field, '=', res_id), ('namespace', '=', 'DAV:'),
+ ('name','=', 'lockdiscovery')]
+ props_to_delete = []
+ lock_found = False
+ lock_val = None
+ tmout2 = int(lock_data.get('timeout', 3*3600))
+
+ prop_ids = propobj.search(cr, uid, sdomain, context=ctx)
+ if prop_ids:
+ for pbro in propobj.browse(cr, uid, prop_ids, context=ctx):
+ val = pbro.value
+ if pbro.do_subst:
+ if val.startswith("('") and val.endswith(")"):
+ glbls = { 'urlquote': urllib.quote, }
+ val = eval(val, glbls, ctx)
+ else:
+ # all locks should be at "subst" format
+ continue
+ if not (val and isinstance(val, tuple)
+ and val[0:2] == ( 'activelock','DAV:')):
+ # print "Value is not activelock:", val
+ continue
+
+ old_token = False
+ old_owner = False
+ try:
+ # discover the timeout. If anything goes wrong, delete
+ # the lock (cleanup)
+ tmout = False
+ for parm in val[2]:
+ if parm[1] != 'DAV:':
+ continue
+ if parm[0] == 'timeout':
+ if isinstance(parm[2], basestring) \
+ and parm[2].startswith('Second-'):
+ tmout = int(parm[2][7:])
+ elif parm[0] == 'locktoken':
+ if isinstance(parm[2], basestring):
+ old_token = parm[2]
+ elif isinstance(parm[2], tuple) and \
+ parm[2][0:2] == ('href','DAV:'):
+ old_token = parm[2][2]
+ else:
+ # print "Mangled token in DAV property: %r" % parm[2]
+ props_to_delete.append(pbro.id)
+ continue
+ elif parm[0] == 'owner':
+ old_owner = parm[2] # not used yet
+ if tmout:
+ mdate = pbro.write_date or pbro.create_date
+ mdate = time.mktime(time.strptime(mdate,'%Y-%m-%d %H:%M:%S'))
+ if mdate + tmout < time.time():
+ props_to_delete.append(pbro.id)
+ continue
+ else:
+ props_to_delete.append(pbro.id)
+ continue
+ except ValueError:
+ props_to_delete.append(pbro.id)
+ continue
+
+ # A valid lock is found here
+ if lock_data.get('refresh', False):
+ if old_token != lock_data.get('token'):
+ continue
+ # refresh mode. Just touch anything and the ORM will update
+ # the write uid+date, won't it?
+ # Note: we don't update the owner, because incoming refresh
+ # wouldn't have a body, anyway.
+ propobj.write(cr, uid, [pbro.id,], { 'name': 'lockdiscovery'})
+ elif lock_data.get('unlock_mode', False):
+ if old_token != lock_data.get('token'):
+ continue
+ props_to_delete.append(pbro.id)
+
+ lock_found = pbro.id
+ lock_val = val
+
+ if tmout2 > 3*3600: # 3 hours maximum
+ tmout2 = 3*3600
+ elif tmout2 < 300:
+ # 5 minutes minimum, but an unlock request can always
+ # break it at any time. Ensures no negative values, either.
+ tmout2 = 300
+
+ if props_to_delete:
+ # explicitly delete, as admin, any of the ids we have identified.
+ propobj.unlink(cr, 1, props_to_delete)
+
+ if lock_data.get('unlock_mode', False):
+ return lock_found and True
+ elif (not lock_found) and not (lock_data.get('refresh', False)):
+ # Create a new lock, attach and return it.
+ new_token = uuid.uuid4().urn
+ lock_val = ('activelock', 'DAV:',
+ [ ('locktype', 'DAV:', (lock_data.get('locktype',False) or 'write','DAV:')),
+ ('lockscope', 'DAV:', (lock_data.get('lockscope',False) or 'exclusive','DAV:')),
+ # ? ('depth', 'DAV:', lock_data.get('depth','0') ),
+ ('timeout','DAV:', 'Second-%d' % tmout2),
+ ('locktoken', 'DAV:', ('href', 'DAV:', new_token)),
+ # ('lockroot', 'DAV: ..., we don't store that, appended by caller
+ ])
+ new_owner = lock_data.get('lockowner',False) or ctx.get('username', False)
+ if new_owner:
+ lock_val[2].append( ('owner', 'DAV:', new_owner) )
+ prop_id = propobj.create(cr, uid, { prop_ref_field: res_id,
+ 'namespace': 'DAV:', 'name': 'lockdiscovery',
+ 'do_subst': True, 'value': repr(lock_val) })
+ return (lock_val[2], prop_id, new_token )
+ elif not lock_found: # and refresh
+ return (False, False, False)
+ elif lock_found and not lock_data.get('refresh', False):
+ # already locked
+ return (False, lock_found, old_token)
+ else:
+ return (lock_val[2], lock_found, old_token )
+
class node_dir(node_acl_mixin, nodes.node_dir):
""" override node_dir and add DAV functionality
"""
@@ -141,7 +288,8 @@ class node_dir(node_acl_mixin, nodes.node_dir):
class node_file(node_acl_mixin, nodes.node_file):
DAV_PROPS = { "DAV:": ('owner', 'group',
'supported-privilege-set',
- 'current-user-privilege-set'),
+ 'current-user-privilege-set',
+ ),
}
DAV_M_NS = { "DAV:" : '_get_dav',}
http_options = { 'DAV': ['access-control', ] }
@@ -152,10 +300,45 @@ class node_file(node_acl_mixin, nodes.node_file):
def get_dav_props(self, cr):
return self._get_dav_props_hlpr(cr, nodes.node_dir,
- None, 'file_id', self.file_id)
- #'document.webdav.dir.property', 'dir_id', self.dir_id)
+ 'document.webdav.file.property', 'file_id', self.file_id)
- #def get_dav_eprop(self, cr, ns, prop):
+ def dav_lock(self, cr, lock_data):
+ """ Locks or unlocks the node, using DAV semantics.
+
+ Unlocking will be done when lock_data['unlock_mode'] == True
+
+ See _dav_lock_hlpr() for calling details.
+
+ It is fundamentally OK to use this function from non-DAV endpoints,
+ but they will all have to emulate the tuple-in-list structure of
+ the DAV lock data. RFC if this translation should be done inside
+ the _dav_lock_hlpr (to ease other protocols).
+ """
+ return self._dav_lock_hlpr(cr, lock_data, nodes.node_file,
+ 'document.webdav.file.property', 'file_id', self.file_id)
+
+ def dav_unlock(self, cr, token):
+ """Releases the token lock held for the node
+
+ This is a utility complement of dav_lock()
+ """
+ lock_data = { 'token': token, 'unlock_mode': True }
+ return self._dav_lock_hlpr(cr, lock_data, nodes.node_file,
+ 'document.webdav.file.property', 'file_id', self.file_id)
+
+ def get_dav_eprop(self, cr, ns, prop):
+ if ns == 'DAV:' and prop == 'supportedlock':
+ return [ ('lockentry', 'DAV:',
+ [ ('lockscope','DAV:', ('shared', 'DAV:')),
+ ('locktype','DAV:', ('write', 'DAV:')),
+ ]),
+ ('lockentry', 'DAV:',
+ [ ('lockscope','DAV:', ('exclusive', 'DAV:')),
+ ('locktype','DAV:', ('write', 'DAV:')),
+ ] )
+ ]
+ return self._get_dav_eprop_hlpr(cr, ns, prop, nodes.node_file,
+ 'document.webdav.file.property', 'file_id', self.file_id)
class node_database(nodes.node_database):
def get_dav_resourcetype(self, cr):
diff --git a/addons/document_webdav/security/ir.model.access.csv b/addons/document_webdav/security/ir.model.access.csv
index a77304eb297..987f7a4f90a 100644
--- a/addons/document_webdav/security/ir.model.access.csv
+++ b/addons/document_webdav/security/ir.model.access.csv
@@ -2,3 +2,4 @@
"access_webdav_dir_property_all","webdav.dir.property all","model_document_webdav_dir_property",,1,0,0,0
"access_webdav_dir_property_group_doc_manager","webdav.dir.property document manager","model_document_webdav_dir_property","base.group_system",1,1,1,1
"access_webdav_dir_property_group_system","webdav.dir.property group system","model_document_webdav_dir_property","base.group_system",1,1,1,1
+"access_webdav_file_property_all","webdav.file.property all","model_document_webdav_file_property",,1,1,1,1
diff --git a/addons/document_webdav/test/webdav_test1.yml b/addons/document_webdav/test/webdav_test1.yml
index a0f15c10fc9..82236f63846 100644
--- a/addons/document_webdav/test/webdav_test1.yml
+++ b/addons/document_webdav/test/webdav_test1.yml
@@ -1,12 +1,17 @@
-
- In order to test the document_ftp functionality
+ In order to test the document_webdav functionality
-
I open the HTTP port and perform an OPTIONS request to the server
-
!python {model: ir.attachment}: |
from document_webdav import test_davclient as te
reload(te) # reload..
- dc = te.DAVClient()
+ dc = te.DAVClient(timeout=2.0)
+ # have a small timeout, enough for any heavily-loaded test server to
+ # respond, but small so that this test won't block further loading.
+ # Don't catch the exception, so that the whole YAML test will abort
+ # if the WebDAV service is not available (eg. during an upgrade from
+ # command line).
dc.gd_options()
dc.get_creds(self, cr, uid)
dc.gd_options(path=cr.dbname, expect={'DAV': ['1',]})
diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py
index ac40d1a3d30..c9c6bb35f28 100644
--- a/addons/document_webdav/test_davclient.py
+++ b/addons/document_webdav/test_davclient.py
@@ -324,7 +324,7 @@ class DAVClient(object):
"""An instance of a WebDAV client, connected to the OpenERP server
"""
- def __init__(self, user=None, passwd=None, dbg=0, use_ssl=False, useragent=False):
+ def __init__(self, user=None, passwd=None, dbg=0, use_ssl=False, useragent=False, timeout=None):
if use_ssl:
self.host = config.get_misc('httpsd', 'interface', False)
self.port = config.get_misc('httpsd', 'port', 8071)
@@ -346,6 +346,7 @@ class DAVClient(object):
self.user = user
self.passwd = passwd
self.dbg = dbg
+ self.timeout = timeout or 5.0 # seconds, tests need to respond pretty fast!
self.hdrs = {}
if useragent:
self.set_useragent(useragent)
@@ -386,7 +387,7 @@ class DAVClient(object):
dbg = self.dbg
hdrs.update(self.hdrs)
log.debug("Getting %s http://%s:%d/%s", method, self.host, self.port, path)
- conn = httplib.HTTPConnection(self.host, port=self.port)
+ conn = httplib.HTTPConnection(self.host, port=self.port, timeout=self.timeout)
conn.set_debuglevel(dbg)
if not path:
path = "/index.html"
diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py
index 302d8c2a8a7..dd19aeef7d5 100644
--- a/addons/document_webdav/webdav.py
+++ b/addons/document_webdav/webdav.py
@@ -268,6 +268,39 @@ def mk_propname_response(self,uri,propnames,doc):
PROPFIND.mk_prop_response = mk_prop_response
PROPFIND.mk_propname_response = mk_propname_response
+def mk_lock_response(self, uri, props):
+ """ Prepare the data response to a DAV LOCK command
+
+ This function is here, merely to be in the same file as the
+ ones above, that have similar code.
+ """
+ doc = domimpl.createDocument('DAV:', "D:prop", None)
+ ms = doc.documentElement
+ ms.setAttribute("xmlns:D", "DAV:")
+ # ms.tagName = 'D:multistatus'
+ namespaces = []
+ nsnum = 0
+ propgen = Prop2xml(doc, namespaces, nsnum)
+ # write href information
+ uparts=urlparse.urlparse(uri)
+ fileloc=uparts[2]
+ if isinstance(fileloc, unicode):
+ fileloc = fileloc.encode('utf-8')
+ davpath = self.parent.get_davpath()
+ if uparts[0] and uparts[1]:
+ hurl = '%s://%s%s%s' % (uparts[0], uparts[1], davpath, urllib.quote(fileloc))
+ else:
+ # When the request has been relative, we don't have enough data to
+ # reply with absolute url here.
+ hurl = '%s%s' % (davpath, urllib.quote(fileloc))
+
+ props.append( ('lockroot', 'DAV:', ('href', 'DAV:', (hurl))))
+ pld = doc.createElement('D:lockdiscovery')
+ ms.appendChild(pld)
+ propgen._prop_child(pld, 'DAV:', 'activelock', props)
+
+ return doc.toxml(encoding="utf-8")
+
super_create_prop = REPORT.create_prop
def create_prop(self):
diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py
index 0e5973c95b3..5b0b418e9a1 100644
--- a/addons/document_webdav/webdav_server.py
+++ b/addons/document_webdav/webdav_server.py
@@ -1,8 +1,14 @@
# -*- encoding: utf-8 -*-
#
-# Copyright P. Christeas <p_christ@hol.gr> 2008,2009
+# Copyright P. Christeas <p_christ@hol.gr> 2008-2010
#
+# Disclaimer: Many of the functions below borrow code from the
+# python-webdav library (http://code.google.com/p/pywebdav/ ),
+# which they import and override to suit OpenERP functionality.
+# python-webdav was written by: Simon Pamies <s.pamies@banality.de>
+# Christian Scholz <mrtopf@webdav.de>
+# Vince Spicer <vince@vince.ca>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
@@ -38,7 +44,9 @@ import urllib
import re
from string import atoi
from DAV.errors import *
+from DAV.utils import IfParser, TagList
# from DAV.constants import DAV_VERSION_1, DAV_VERSION_2
+from xml.dom import minidom
khtml_re = re.compile(r' KHTML/([0-9\.]+) ')
@@ -103,6 +111,7 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
self.headers['Destination'] = up.path[len(self.davpath):]
else:
raise DAV_Forbidden("Not allowed to copy/move outside webdav path")
+ # TODO: locks
DAVRequestHandler.copymove(self, CLASS)
def get_davpath(self):
@@ -262,6 +271,139 @@ class DAVHandler(HttpOptions, FixSendError, DAVRequestHandler):
except DAV_Error, (ec, dd):
return self.send_status(ec)
+ def do_UNLOCK(self):
+ """ Unlocks given resource """
+
+ dc = self.IFACE_CLASS
+ self.log_message('UNLOCKing resource %s' % self.headers)
+
+ uri = urlparse.urljoin(self.get_baseuri(dc), self.path)
+ uri = urllib.unquote(uri)
+
+ token = self.headers.get('Lock-Token', False)
+ if token:
+ token = token.strip()
+ if token[0] == '<' and token[-1] == '>':
+ token = token[1:-1]
+ else:
+ token = False
+
+ if not token:
+ return self.send_status(400, 'Bad lock token')
+
+ try:
+ res = dc.unlock(uri, token)
+ except DAV_Error, (ec, dd):
+ return self.send_status(ec, dd)
+
+ if res == True:
+ self.send_body(None, '204', 'OK', 'Resource unlocked.')
+ else:
+ # We just differentiate the description, for debugging purposes
+ self.send_body(None, '204', 'OK', 'Resource not locked.')
+
+ def do_LOCK(self):
+ """ Attempt to place a lock on the given resource.
+ """
+
+ dc = self.IFACE_CLASS
+ lock_data = {}
+
+ self.log_message('LOCKing resource %s' % self.headers)
+
+ body = None
+ if self.headers.has_key('Content-Length'):
+ l = self.headers['Content-Length']
+ body = self.rfile.read(atoi(l))
+
+ depth = self.headers.get('Depth', 'infinity')
+
+ uri = urlparse.urljoin(self.get_baseuri(dc), self.path)
+ uri = urllib.unquote(uri)
+ self.log_message('do_LOCK: uri = %s' % uri)
+
+ ifheader = self.headers.get('If')
+
+ if ifheader:
+ ldif = IfParser(ifheader)
+ if isinstance(ldif, list):
+ if len(ldif) !=1 or (not isinstance(ldif[0], TagList)) \
+ or len(ldif[0].list) != 1:
+ raise DAV_Error(400, "Cannot accept multiple tokens")
+ ldif = ldif[0].list[0]
+ if ldif[0] == '<' and ldif[-1] == '>':
+ ldif = ldif[1:-1]
+
+ lock_data['token'] = ldif
+
+ if not body:
+ lock_data['refresh'] = True
+ else:
+ lock_data['refresh'] = False
+ lock_data.update(self._lock_unlock_parse(body))
+
+ if lock_data['refresh'] and not lock_data.get('token', False):
+ raise DAV_Error(400, 'Lock refresh must specify token')
+
+ lock_data['depth'] = depth
+
+ try:
+ created, data, lock_token = dc.lock(uri, lock_data)
+ except DAV_Error, (ec, dd):
+ return self.send_status(ec, dd)
+
+ headers = {}
+ if not lock_data['refresh']:
+ headers['Lock-Token'] = '<%s>' % lock_token
+
+ if created:
+ self.send_body(data, '201', 'Created', ctype='text/xml', headers=headers)
+ else:
+ self.send_body(data, '200', 'OK', ctype='text/xml', headers=headers)
+
+ def _lock_unlock_parse(self, body):
+ # Override the python-webdav function, with some improvements
+ # Unlike the py-webdav one, we also parse the owner minidom elements into
+ # pure pythonic struct.
+ doc = minidom.parseString(body)
+
+ data = {}
+ owners = []
+ for info in doc.getElementsByTagNameNS('DAV:', 'lockinfo'):
+ for scope in info.getElementsByTagNameNS('DAV:', 'lockscope'):
+ for scc in scope.childNodes:
+ if scc.nodeType == info.ELEMENT_NODE \
+ and scc.namespaceURI == 'DAV:':
+ data['lockscope'] = scc.localName
+ break
+ for ltype in info.getElementsByTagNameNS('DAV:', 'locktype'):
+ for ltc in ltype.childNodes:
+ if ltc.nodeType == info.ELEMENT_NODE \
+ and ltc.namespaceURI == 'DAV:':
+ data['locktype'] = ltc.localName
+ break
+ for own in info.getElementsByTagNameNS('DAV:', 'owner'):
+ for ono in own.childNodes:
+ if ono.nodeType == info.TEXT_NODE:
+ if ono.data:
+ owners.append(ono.data)
+ elif ono.nodeType == info.ELEMENT_NODE \
+ and ono.namespaceURI == 'DAV:' \
+ and ono.localName == 'href':
+ href = ''
+ for hno in ono.childNodes:
+ if hno.nodeType == info.TEXT_NODE:
+ href += hno.data
+ owners.append(('href','DAV:', href))
+
+ if len(owners) == 1:
+ data['lockowner'] = owners[0]
+ elif not owners:
+ pass
+ else:
+ data['lockowner'] = owners
+ return data
+
from service.http_server import reg_http_service,OpenERPAuthProvider
class DAVAuthProvider(OpenERPAuthProvider):
diff --git a/addons/document_webdav/webdav_view.xml b/addons/document_webdav/webdav_view.xml
index 2ea0bca5279..4e76346469a 100644
--- a/addons/document_webdav/webdav_view.xml
+++ b/addons/document_webdav/webdav_view.xml
@@ -37,7 +37,7 @@
<field name="model">document.webdav.dir.property</field>
<field name="type">search</field>
<field name="arch" type="xml">
- <search string="Search Document storage">
+ <search string="Search Document properties">
<field name="name" />
<field name="namespace" />
<newline/>
@@ -92,7 +92,68 @@
</page>
</field>
</record>
+
+ <!-- File properties -->
+ <record model="ir.ui.view" id="view_file_props_form">
+ <field name="name">document.webdav.file.property.form</field>
+ <field name="model">document.webdav.file.property</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Properties">
+ <field name="namespace"/>
+ <field name="name"/>
+ <newline />
+ <field name="file_id" />
+ <field name="do_subst" />
+ <newline />
+ <field name="value" colspan="4" />
+ </form>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="view_file_props_tree">
+ <field name="name">document.webdav.file.property.tree</field>
+ <field name="model">document.webdav.file.property</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Properties" toolbar="1">
+ <field name="file_id" />
+ <field name="namespace"/>
+ <field name="name"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_file_props_filter" model="ir.ui.view">
+ <field name="name">Search View: File DAV properties</field>
+ <field name="model">document.webdav.file.property</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Search Document properties">
+ <field name="name" />
+ <field name="namespace" />
+ <newline/>
+ <group expand="0" string="Group By..." groups="base.group_extended">
+ <filter string="Document" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'file_id'}"/>
+ <filter string="Namespace" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'namespace'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_file_props_form">
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">document.webdav.file.property</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="search_view_id" ref="view_file_props_filter"/>
+ </record>
+ <menuitem
+ name="DAV properties for documents"
+ action="action_file_props_form"
+ id="menu_file_props"
+ groups="base.group_no_one"
+ parent="document.menu_document_management_configuration"/>
</data>
</openerp>