我的python函数返回一个操作URL,之后我的按钮被禁用。 OpenERP向我的disable="disable"
添加了一个属性button
。我不想disable button
。
我的代码是
<button name="play_file" type="object" string="Play or download" />
def play_file(self, cr, uid, ids, context=None):
res = self.read(cr, uid, ids, ['file_name'], context=context)
file_name = res[0]['file_name']
return{
'type': 'ir.actions.act_url',
'url':'ftp://test.claudion.com:123/'+file_name,
# 'target': 'new',
}