[MERGE] url -> act_url
bzr revid: fp@tinyerp.com-20120929143108-vc41x65svudrxvg8
This commit is contained in:
commit
d952128b8a
|
@ -39,7 +39,7 @@ class document_ftp_browse(osv.osv_memory):
|
|||
data_pool = self.pool.get('ir.model.data')
|
||||
aid = data_pool._get_id(cr, uid, 'document_ftp', 'action_document_browse')
|
||||
aid = data_pool.browse(cr, uid, aid, context=context).res_id
|
||||
ftp_url = self.pool.get('ir.actions.url').browse(cr, uid, aid, context=context)
|
||||
ftp_url = self.pool.get('ir.actions.act_url').browse(cr, uid, aid, context=context)
|
||||
url = ftp_url.url and ftp_url.url.split('ftp://') or []
|
||||
if url:
|
||||
url = url[1]
|
||||
|
|
|
@ -44,7 +44,7 @@ class document_ftp_configuration(osv.osv_memory):
|
|||
# Update the action for FTP browse.
|
||||
aid = data_pool._get_id(cr, uid, 'document_ftp', 'action_document_browse')
|
||||
aid = data_pool.browse(cr, uid, aid, context=context).res_id
|
||||
self.pool.get('ir.actions.url').write(cr, uid, [aid],
|
||||
self.pool.get('ir.actions.act_url').write(cr, uid, [aid],
|
||||
{'url': 'ftp://'+(conf.host or 'localhost:8021')+'/' + cr.dbname+'/'})
|
||||
|
||||
document_ftp_configuration()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="ir.actions.url" id="action_document_browse">
|
||||
<record model="ir.actions.act_url" id="action_document_browse">
|
||||
<field name="name">Browse Files</field>
|
||||
<field name="url">ftp://localhost:8021/</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue