[FIX] base_report_designer: the plugin had no .zip extension when downloaded
bzr revid: qdp-launchpad@openerp.com-20130417093256-8tkf7n5x5ghk5pd5
This commit is contained in:
commit
c8c95c1e9e
|
@ -20,7 +20,7 @@
|
|||
<xpath expr="//separator[@string='title']" position="after">
|
||||
<group colspan="8" height="450" width="750">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="plugin_file" filename="name"/>
|
||||
<field name="plugin_file" filename="name" widget="url"/>
|
||||
<separator string="Installation and Configuration Steps" colspan="4"/>
|
||||
<field name="description" nolabel="1" colspan="8"/>
|
||||
</group>
|
||||
|
|
|
@ -23,7 +23,6 @@ from openerp.osv import fields
|
|||
from openerp.osv import osv
|
||||
import base64
|
||||
from openerp.tools.translate import _
|
||||
from openerp.modules.module import get_module_resource
|
||||
|
||||
class base_report_designer_installer(osv.osv_memory):
|
||||
_name = 'base_report_designer.installer'
|
||||
|
@ -31,13 +30,13 @@ class base_report_designer_installer(osv.osv_memory):
|
|||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
data = super(base_report_designer_installer, self).default_get(cr, uid, fields, context=context)
|
||||
plugin_file = open(get_module_resource('base_report_designer','plugin', 'openerp_report_designer.zip'),'rb')
|
||||
data['plugin_file'] = base64.encodestring(plugin_file.read())
|
||||
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
|
||||
data['plugin_file'] = base_url + '/base_report_designer/static/base-report-designer-plugin/openerp_report_designer.zip'
|
||||
return data
|
||||
|
||||
_columns = {
|
||||
'name':fields.char('File name', size=34),
|
||||
'plugin_file':fields.binary('OpenObject Report Designer Plug-in', readonly=True, help="OpenObject Report Designer plug-in file. Save as this file and install this plug-in in OpenOffice."),
|
||||
'plugin_file':fields.char('OpenObject Report Designer Plug-in', size=256, readonly=True, help="OpenObject Report Designer plug-in file. Save as this file and install this plug-in in OpenOffice."),
|
||||
'description':fields.text('Description', readonly=True)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue