summaryrefslogtreecommitdiff
path: root/addons/document_ftp
diff options
context:
space:
mode:
authorVijaykumar Baladaniya <vba@tinyerp.com>2012-07-09 18:31:13 +0530
committerVijaykumar Baladaniya <vba@tinyerp.com>2012-07-09 18:31:13 +0530
commitbe2e95656aaa113addea2b510fcdcf2f890eaaa4 (patch)
treeabcb3dd4ef350a1b8ad0eaffdd2b9a1cb91521af /addons/document_ftp
parentb982ea278b33132def3927417b7a854b98b5028a (diff)
parent3925f76ce85854e5d4834902a05f57bcfc5ace85 (diff)
[MERGE]merged with trunk-survey-layout-tta
bzr revid: vba@tinyerp.com-20120709130113-3lchipgil9oqpglg
Diffstat (limited to 'addons/document_ftp')
-rw-r--r--addons/document_ftp/ftpserver/__init__.py17
-rw-r--r--addons/document_ftp/ftpserver/abstracted_fs.py2
-rw-r--r--addons/document_ftp/wizard/ftp_browse_view.xml5
-rw-r--r--addons/document_ftp/wizard/ftp_configuration_view.xml5
4 files changed, 13 insertions, 16 deletions
diff --git a/addons/document_ftp/ftpserver/__init__.py b/addons/document_ftp/ftpserver/__init__.py
index 2e09a938a05..59aff85c633 100644
--- a/addons/document_ftp/ftpserver/__init__.py
+++ b/addons/document_ftp/ftpserver/__init__.py
@@ -23,9 +23,9 @@ import threading
import ftpserver
import authorizer
import abstracted_fs
-import netsvc
+import logging
from tools import config
-
+_logger = logging.getLogger(__name__)
def start_server():
HOST = config.get('ftp_server_host', '127.0.0.1')
PORT = int(config.get('ftp_server_port', '8021'))
@@ -35,10 +35,7 @@ def start_server():
PASSIVE_PORTS = int(pps[0]), int(pps[1])
class ftp_server(threading.Thread):
- def log(self, level, message):
- logger = netsvc.Logger()
- logger.notifyChannel('FTP', level, message)
-
+
def run(self):
autho = authorizer.authorizer()
ftpserver.FTPHandler.authorizer = autho
@@ -48,17 +45,17 @@ def start_server():
if PASSIVE_PORTS:
ftpserver.FTPHandler.passive_ports = PASSIVE_PORTS
- ftpserver.log = lambda msg: self.log(netsvc.LOG_INFO, msg)
+ ftpserver.log = lambda msg: _logger.info(msg)
ftpserver.logline = lambda msg: None
- ftpserver.logerror = lambda msg: self.log(netsvc.LOG_ERROR, msg)
+ ftpserver.logerror = lambda msg: _logger.error(msg)
ftpd = ftpserver.FTPServer((HOST, PORT), ftpserver.FTPHandler)
ftpd.serve_forever()
if HOST.lower() == 'none':
- netsvc.Logger().notifyChannel("FTP", netsvc.LOG_INFO, "\n Server FTP Not Started\n")
+ _logger.info("\n Server FTP Not Started\n")
else:
- netsvc.Logger().notifyChannel("FTP", netsvc.LOG_INFO, "\n Serving FTP on %s:%s\n" % (HOST, PORT))
+ _logger.info("\n Serving FTP on %s:%s\n" % (HOST, PORT))
ds = ftp_server()
ds.daemon = True
ds.start()
diff --git a/addons/document_ftp/ftpserver/abstracted_fs.py b/addons/document_ftp/ftpserver/abstracted_fs.py
index 83cd1cde725..429016a2376 100644
--- a/addons/document_ftp/ftpserver/abstracted_fs.py
+++ b/addons/document_ftp/ftpserver/abstracted_fs.py
@@ -56,7 +56,7 @@ class abstracted_fs(object):
self.cwd = '/'
self.cwd_node = None
self.rnfr = None
- self._log = logging.getLogger('FTP.fs')
+ self._log = logging.getLogger(__name__)
# Ok
def db_list(self):
diff --git a/addons/document_ftp/wizard/ftp_browse_view.xml b/addons/document_ftp/wizard/ftp_browse_view.xml
index 8ed31ee2323..e2e1825f522 100644
--- a/addons/document_ftp/wizard/ftp_browse_view.xml
+++ b/addons/document_ftp/wizard/ftp_browse_view.xml
@@ -8,8 +8,9 @@
<field name="arch" type="xml">
<form string="Browse Document" version="7.0">
<header>
- <button name="browse_ftp" string="_Browse" type="object" icon="gtk-ok"/>
- <button special="cancel" string="_Cancel" icon="gtk-cancel"/>
+ <button name="browse_ftp" string="_Browse" type="object" icon="gtk-ok" class="oe_highlight" />
+ or
+ <button string="Cancel" class="oe_link" special="cancel" />
</header>
<separator string="Browse Document"/>
<group>
diff --git a/addons/document_ftp/wizard/ftp_configuration_view.xml b/addons/document_ftp/wizard/ftp_configuration_view.xml
index 10c8463b02c..ed52a730023 100644
--- a/addons/document_ftp/wizard/ftp_configuration_view.xml
+++ b/addons/document_ftp/wizard/ftp_configuration_view.xml
@@ -18,11 +18,10 @@
<attribute name="string">Knowledge Application Configuration</attribute>
</form>
<group string="res_config_contents" position="replace">
- <separator string="Configure FTP Server" />
- <label string="Indicate the network address on which your OpenERP server should be reachable for end-users. This depends on your network topology and configuration, and will only affect the links displayed to the users. The format is HOST:PORT and the default host (localhost) is only suitable for access from the server machine itself.."/>
+ <separator string="Configure FTP Server" />
+ <label string="Indicate the network address on which your OpenERP server should be reachable for end-users. This depends on your network topology and configuration, and will only affect the links displayed to the users. The format is HOST:PORT and the default host (localhost) is only suitable for access from the server machine itself.."/>
<field name="host"/>
</group>
- <xpath expr="//button[@name='action_skip']" position="replace"/>
</data>
</field>
</record>