[ADD] Thuderbird :- add configuration wizard.
bzr revid: ysa@tinyerp.co.in-20100422114502-c1j5f8oxkkohl9nm
This commit is contained in:
parent
166c537f10
commit
9b5c16eff3
|
@ -28,7 +28,7 @@ If you don't think you need any of these right now, you can easily install them
|
|||
<field name="account"/> <field name="purchase"/>
|
||||
<field name="hr"/> <field name="point_of_sale"/>
|
||||
<field name="marketing"/> <field name="misc_tools"/>
|
||||
<field name="report_designer"/>
|
||||
<field name="report_designer"/> <field name="thunderbird"/>
|
||||
<separator string="Vertical Modules" colspan="4"/>
|
||||
<field name="profile_association"/>
|
||||
<field name="profile_training"/>
|
||||
|
|
|
@ -73,6 +73,7 @@ class base_setup_installer(osv.osv_memory):
|
|||
'report_designer':fields.boolean('Advanced Reporting',
|
||||
help="Lets you install various tools to simplify and enhance "
|
||||
"OpenERP's report creation."),
|
||||
'thunderbird' :fields.boolean('Thunderbird'),
|
||||
# Vertical modules
|
||||
'profile_association':fields.boolean('Associations',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
|
|
|
@ -47,4 +47,4 @@
|
|||
##############################################################################
|
||||
|
||||
import partner
|
||||
|
||||
import installer
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
Select a section for which you want to create case.''',
|
||||
"init_xml" : [],
|
||||
"demo_xml" : [],
|
||||
"update_xml" : ['security/ir.model.access.csv'],
|
||||
"update_xml" : ['thunderbird_installer.xml',
|
||||
'security/ir.model.access.csv'],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 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 thunderbird_installer(osv.osv_memory):
|
||||
_name = 'thunderbird.installer'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
def process_plugin(self, cr, uid, ids, context):
|
||||
"""
|
||||
Default Attach Thunderbird Plug-in File.
|
||||
"""
|
||||
data = {}
|
||||
file = open(config['addons_path'] + "/thunderbird/plugin/tiny_plugin-2.0.xpi", 'r')
|
||||
data['plugin_file'] = base64.encodestring(file.read())
|
||||
self.write(cr, uid, ids, data)
|
||||
return False
|
||||
|
||||
_columns = {
|
||||
'name':fields.char('File name', size=34, required=True, help='Save Thunderbird plugin file.'),
|
||||
'thunderbird':fields.boolean('Thunderbird Module ', help="Allows you to select an object that you’d like to add to your email and its attachments."),
|
||||
'plugin_file':fields.binary('Thunderbird Plug-in', readonly=True, help="Thunderbird plug-in file. Save as this file and install this plug-in in thunderbir."),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'thunderbird' : True,
|
||||
'name' : 'tiny_plugin-2.0.xpi',
|
||||
}
|
||||
|
||||
thunderbird_installer()
|
|
@ -0,0 +1,103 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_thunderbird_installer" model="ir.ui.view">
|
||||
<field name="name">thunderbird.installer.view</field>
|
||||
<field name="model">thunderbird.installer</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">Thunderbird Module Installation</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Configure Thunderbird Module</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">This module is required for the thuderbird plug-in to work properly.This allows you to select an object that you had like to add to your email and its attachments. You can select a partner, a task, a project, an analytical account, or any other object and attach selected mail as .eml file in attachment of selected record.</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<separator string="Thunderbird" colspan="4"/>
|
||||
<field name="thunderbird"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<newline/>
|
||||
|
||||
<field name="plugin_file"/>
|
||||
<button name="process_plugin" icon="gtk-execute" string="Get Plugin File" type="object"/>
|
||||
<newline/>
|
||||
<separator string="Thunderbird plugin installation note." colspan="4"/>
|
||||
<label colspan="8" string="Save The thunderbird plugin Follow the following step to install thunderbird plugin ? 1. From Menu Bar, Open Tools > Add ons. 2. Now click on install button and a browser window will appear. 3. Just select the (.xpi) file from thunderbird/plugin directory and click ok, a new software installation window will appear and within a short time Install Now button will be enabled. 4. Click on Install Now and restart Thunderbird. 5. Now Thunderbird plugin is installed."/>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_thunderbird_installer" model="ir.actions.act_window">
|
||||
<field name="name">Thunderbird Module Installation</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">thunderbird.installer</field>
|
||||
<field name="view_id" ref="view_thunderbird_installer"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="thunderbird_installer_todo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_thunderbird_installer"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
|
||||
<!-- Configuration wizard. -->
|
||||
|
||||
<record id="view_thunderbird_wizard" model="ir.ui.view">
|
||||
<field name="name">thunderbird.wizard</field>
|
||||
<field name="model">thunderbird.installer</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string= "Thunderbird Installation">
|
||||
<group colspan="4">
|
||||
<separator string="Configure Thunderbird Module" colspan="4"/>
|
||||
<group colspan="4" col="10">
|
||||
<group colspan="2">
|
||||
<image name="gtk-dialog-info"/>
|
||||
<newline/>
|
||||
<label align="0.0" string="This module is required for the thuderbird plug-in to work properly.This allows you to select an object that you had like to add to your email and its attachments. You can select a partner, a task, a project, an analytical account, or any other object and attach selected mail as .eml file in attachment of selected record." width="200"/>
|
||||
</group>
|
||||
<group colspan="8">
|
||||
<separator string="Thunderbird" colspan="4"/>
|
||||
<field name="thunderbird"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<newline/>
|
||||
<field name="plugin_file"/>
|
||||
<button name="process_plugin" icon="gtk-execute" string="Get Plugin File" type="object"/>
|
||||
<newline/>
|
||||
<separator string="Thunderbird plugin installation note." colspan="4"/>
|
||||
<label colspan="8" string="Save The thunderbird plugin Follow the following step to install thunderbird plugin ? 1. From Menu Bar, Open Tools > Add ons. 2. Now click on install button and a browser window will appear. 3. Just select the (.xpi) file from thunderbird/plugin directory and click ok, a new software installation window will appear and within a short time Install Now button will be enabled. 4. Click on Install Now and restart Thunderbird. 5. Now Thunderbird plugin is installed."/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4">
|
||||
<label align="0.0" string="" colspan="3"/>
|
||||
<button colspan="1" icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_thunderbird_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Thunderbird Module Installation</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">thunderbird.installer</field>
|
||||
<field name="view_id" ref="view_thunderbird_wizard"/>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_base_config_plugins" name="Plugins" parent="base.menu_base_config" sequence="10" />
|
||||
<menuitem id="menu_base_config_plugins_thunderbird" action="action_thunderbird_wizard" name="Thunderbird" parent="menu_base_config_plugins" sequence="10" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue