[FIX] document_ftp: fix definition of config wizard

bzr revid: rco@openerp.com-20120420130724-drt6bhl82v7jgmy7
This commit is contained in:
Raphael Collet 2012-04-20 15:07:24 +02:00
parent 36f97a0f3a
commit e5c1b99380
3 changed files with 13 additions and 13 deletions

View File

@ -18,9 +18,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import ftpserver
import wizard
import res_config
post_load = ftpserver.start_server
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -26,8 +26,8 @@ class documnet_ftp_setting(osv.osv_memory):
_name = 'knowledge.configuration'
_inherit = 'knowledge.configuration'
_columns = {
'url': fields.char('Browse Documents',size=64,
help ="""It allow to browse the document from the relative URL""", readonly=True),
'document_ftp_url': fields.char('Browse Documents',size=64,
help ="""It allow to browse the document from the relative URL""", readonly=True),
}
def get_default_ftp_config(self, cr, uid, ids, context=None):
@ -45,5 +45,6 @@ class documnet_ftp_setting(osv.osv_memory):
url = url[:-1]
else:
url = '%s:%s' %(ftpserver.HOST, ftpserver.PORT)
return {'url':'ftp://%s@%s'%(current_user.login, url)}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
return {'document_ftp_url':'ftp://%s@%s'%(current_user.login, url)}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,17 +1,14 @@
<openerp>
<data>
<record id="view_document_ftp_configuration" model="ir.ui.view">
<field name="name">Knowledge Application</field>
<field name="model">knowledge.configuration</field>
<field name="type">form</field>
<field name="inherit_id" ref="document.view_knowledge_configuration"/>
<field name="inherit_id" ref="base_setup.view_knowledge_configuration"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='module_document_ftp']" position="after">
<group colspan="2" col="2">
<field name="url" widget="url" colspan="2"/>
</group>
</xpath>
<field name="module_document_ftp" position="after">
<field name="document_ftp_url" widget="url"/>
</field>
</field>
</record>
</data>