diff --git a/addons/document/document.py b/addons/document/document.py index b304f54cec3..66b47fd7fea 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -143,7 +143,8 @@ class document_file(osv.osv): _defaults = { 'user_id': lambda self, cr, uid, ctx:uid, - 'file_size': lambda self, cr, uid, ctx:0 + 'parent_id': __get_def_directory + 'file_size': lambda self, cr, uid, ctx:0 } _sql_constraints = [ # filename_uniq is not possible in pure SQL diff --git a/addons/document/document_data.xml b/addons/document/document_data.xml index c8a6e304d1a..a7bc98de6f3 100644 --- a/addons/document/document_data.xml +++ b/addons/document/document_data.xml @@ -104,10 +104,5 @@ - diff --git a/addons/document_ftp/ftpserver/__init__.py b/addons/document_ftp/ftpserver/__init__.py index 582972b9c4d..59aff85c633 100644 --- a/addons/document_ftp/ftpserver/__init__.py +++ b/addons/document_ftp/ftpserver/__init__.py @@ -47,7 +47,7 @@ def start_server(): ftpserver.log = lambda msg: _logger.info(msg) ftpserver.logline = lambda msg: None - ftpserver.logerror = lambda msg: self.logger.error(msg) + ftpserver.logerror = lambda msg: _logger.error(msg) ftpd = ftpserver.FTPServer((HOST, PORT), ftpserver.FTPHandler) ftpd.serve_forever()