diff options
Diffstat (limited to 'addons/document_webdav')
| -rw-r--r-- | addons/document_webdav/nodes.py | 4 | ||||
| -rwxr-xr-x | addons/document_webdav/test_davclient.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/addons/document_webdav/nodes.py b/addons/document_webdav/nodes.py index d6ceca458cd..a8fedee4fe3 100644 --- a/addons/document_webdav/nodes.py +++ b/addons/document_webdav/nodes.py @@ -25,6 +25,8 @@ from tools.safe_eval import safe_eval as eval import time import urllib import uuid +from openerp import SUPERUSER_ID + try: from tools.dict_tools import dict_filter except ImportError: @@ -233,7 +235,7 @@ class node_acl_mixin(object): if props_to_delete: # explicitly delete, as admin, any of the ids we have identified. - propobj.unlink(cr, 1, props_to_delete) + propobj.unlink(cr, SUPERUSER_ID, props_to_delete) if lock_data.get('unlock_mode', False): return lock_found and True diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py index f1f2e58c835..0f66363c553 100755 --- a/addons/document_webdav/test_davclient.py +++ b/addons/document_webdav/test_davclient.py @@ -42,6 +42,7 @@ from tools import config from xmlrpclib import Transport, ProtocolError import StringIO import base64 +from openerp import SUPERUSER_ID _logger = logging.getLogger(__name__) @@ -361,7 +362,7 @@ class DAVClient(object): to break if "base_crypt" is used. """ ruob = obj.pool.get('res.users') - res = ruob.read(cr, 1, [uid,], ['login', 'password']) + res = ruob.read(cr, SUPERUSER_ID, [uid,], ['login', 'password']) assert res, "uid %s not found" % uid self.user = res[0]['login'] self.passwd = res[0]['password'] |
