[FIX] rename ir.actions.url to match action's type
bzr revid: xmo@openerp.com-20120608101715-ri3upmywr6kl850q
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user