diff --git a/addons/document_webdav/document_webdav.py b/addons/document_webdav/document_webdav.py index cb1315140a3..e096c2b509c 100644 --- a/addons/document_webdav/document_webdav.py +++ b/addons/document_webdav/document_webdav.py @@ -20,9 +20,10 @@ ############################################################################## from osv import osv, fields -import nodes from tools import config +import nodes + class document_davdir(osv.osv): _inherit = 'document.directory' @@ -64,8 +65,6 @@ class document_davdir(osv.osv): """ return (nodes.node_database(context=ncontext), uri) -document_davdir() - class dav_dir_property(osv.osv): """ Arbitrary WebDAV properties, attached to document.directories. @@ -96,8 +95,6 @@ class dav_dir_property(osv.osv): 'do_subst': False, } -dav_dir_property() - class dav_file_property(osv.osv): """ Arbitrary WebDAV properties, attached to ir.attachments. @@ -126,7 +123,5 @@ class dav_file_property(osv.osv): 'do_subst': False, } -dav_file_property() - #eof # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_webdav/nodes.py b/addons/document_webdav/nodes.py index babe10a519e..aab83766514 100644 --- a/addons/document_webdav/nodes.py +++ b/addons/document_webdav/nodes.py @@ -27,10 +27,18 @@ import urllib import uuid from openerp import SUPERUSER_ID -try: - from tools.dict_tools import dict_filter -except ImportError: - from document.dict_tools import dict_filter +def dict_filter(srcdic, keys, res=None): + ''' Return a copy of srcdic that has only keys set. + If any of keys are missing from srcdic, the result won't have them, + either. + @param res If given, result will be updated there, instead of a new dict. + ''' + if res is None: + res = {} + for k in keys: + if k in srcdic: + res[k] = srcdic[k] + return res class node_acl_mixin(object): def _get_dav_owner(self, cr): diff --git a/addons/document_webdav/webdav_setup.xml b/addons/document_webdav/webdav_setup.xml index 6ea894b6a22..d75c416a93e 100644 --- a/addons/document_webdav/webdav_setup.xml +++ b/addons/document_webdav/webdav_setup.xml @@ -14,7 +14,6 @@ - directory principals @@ -27,7 +26,6 @@ - directory groups @@ -39,7 +37,6 @@ - directory resources @@ -52,7 +49,6 @@ - ressource @@ -66,7 +62,6 @@ - ressource @@ -78,7 +73,6 @@ - directory locations