base_report_desinger: add the installer file
bzr revid: sbh@tinyerp.com-20100611142134-pu64qm1tmizuedqr
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_base_report_designer" model="ir.ui.view">
|
||||
<field name="name">OpenOffice Report Designer</field>
|
||||
<field name="model">base.openoffice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Base Report Designer Module Installation</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Base Report Designer</attribute>
|
||||
</separator>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
</xpath>
|
||||
<group colspan="8" height="250" width="700">
|
||||
<separator string="OpenOffice Report Desinger" colspan="4"/>
|
||||
<field name="base_desinger_url" widget="url" />
|
||||
<newline/>
|
||||
<field name="plugin_file"/>
|
||||
<button name="add_plugin" string="Click To Get the plugin"
|
||||
colspan="1" type="object" icon="gtk-execute" />
|
||||
|
||||
<newline/>
|
||||
<field name="pdf_file"/>
|
||||
<button name="process_pdf_file" string="Click To Documenation"
|
||||
colspan="1" type="object" icon="gtk-execute" />
|
||||
<newline/>
|
||||
<separator string="Openoffice Report Desinger plugin installation note." colspan="4"/>
|
||||
<label colspan="2" string="Save The plugin and Documenation read the step to How to install it from Documenation"/>
|
||||
<button special="cancel" string="Close" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_base_report_designer" model="ir.actions.act_window">
|
||||
<field name="name">Base Report Designer Module Installation</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">base.openoffice</field>
|
||||
<field name="view_id" ref="view_base_report_designer"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="report_designer_installer_todo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_base_report_designer"/>
|
||||
<field name="sequence">4</field>
|
||||
</record>
|
||||
|
||||
<record id="view_report_designer" model="ir.ui.view">
|
||||
<field name="name">OpenOffice Report Designer</field>
|
||||
<field name="model">base.openoffice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Report Desinger">
|
||||
<group colspan="8" height="250" width="700">
|
||||
<separator string="OpenOffice Report Desinger" colspan="4"/>
|
||||
<field name="base_desinger_url" widget="url" />
|
||||
<newline/>
|
||||
<field name="plugin_file"/>
|
||||
<button name="add_plugin" string="Click To Get the plugin"
|
||||
colspan="1" type="object" icon="gtk-execute" />
|
||||
|
||||
<newline/>
|
||||
<field name="pdf_file"/>
|
||||
<button name="process_pdf_file" string="Click To Documenation"
|
||||
colspan="1" type="object" icon="gtk-execute" />
|
||||
<newline/>
|
||||
<separator string="Openoffice Report Desinger plugin installation note." colspan="4"/>
|
||||
<label colspan="2" string="Save The plugin and Documenation read the step to How to install it from Documenation"/>
|
||||
<button special="cancel" string="Close" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_designer" model="ir.actions.act_window">
|
||||
<field name="name">OpenOffice Report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">base.openoffice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="report_designer_ir_actions_todo_tree" model="ir.ui.view">
|
||||
<field name="model">ir.actions.todo</field>
|
||||
<field name="name">report_desinger</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_report_designer)d" states="open,skip" string="Report Desinger" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
from tools import config
|
||||
|
||||
import base64
|
||||
class base_openoffice(osv.osv_memory):
|
||||
_name = "base.openoffice"
|
||||
_inherit = 'res.config.installer'
|
||||
_description = "Open Office Report Desinger"
|
||||
_columns = {
|
||||
'base_desinger_url': fields.char('Documentation URL', size=300, readonly=True),
|
||||
'plugin_file':fields.binary('OpenOffice Report Desinger',readonly=True),
|
||||
'pdf_file':fields.binary('Documenation', size=64 ,readonly=True),
|
||||
}
|
||||
def add_plugin(self, cr, uid, ids, context):
|
||||
data = {}
|
||||
file = open(config['addons_path'] + "/base_report_designer/report_desinger/openoffice_report_designer/openerp_report_designer.zip", 'r')
|
||||
data['plugin_file'] = base64.encodestring(file.read())
|
||||
self.write(cr, uid, ids, data)
|
||||
return False
|
||||
|
||||
def process_pdf_file(self, cr, uid, ids, context):
|
||||
"""
|
||||
Default Attach Thunderbird Plug-in Installation File.
|
||||
"""
|
||||
data = {}
|
||||
pdf_file = open(config['addons_path'] + "/base_report_designer/report_desinger/doc/OpenOffice.pdf", 'r')
|
||||
data['pdf_file'] = base64.encodestring(pdf_file.read())
|
||||
self.write(cr, uid, ids, data)
|
||||
return False
|
||||
_defaults = {
|
||||
'name' : 'tiny_plugin-2.0.xpi',
|
||||
'pdf_name' : 'Installation Guide to OpenOffice Report Desinger.pdf',
|
||||
'base_desinger_url':'http://doc.openerp.com/developer/7_23_RAD_tools/index.html#open-office-report-designer'
|
||||
|
||||
}
|
||||
|
||||
base_openoffice()
|
||||
Reference in New Issue
Block a user