2010-04-30 10:00:37 +00:00
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
2010-08-03 11:12:14 +00:00
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
2010-04-30 10:00:37 +00:00
#
# 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
2010-08-03 10:38:58 +00:00
import addons
2010-09-13 13:51:42 +00:00
import difflib
2010-04-30 10:00:37 +00:00
class thunderbird_installer ( osv . osv_memory ) :
_name = ' thunderbird.installer '
_inherit = ' res.config.installer '
2010-11-22 10:37:53 +00:00
def default_get ( self , cr , uid , fields , context = None ) :
if not context :
context = { }
2010-06-01 06:42:47 +00:00
data = super ( thunderbird_installer , self ) . default_get ( cr , uid , fields , context )
2010-09-13 13:51:42 +00:00
data [ ' pdf_file ' ] = ' http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_thunderbird.html '
2010-08-03 11:12:14 +00:00
file = open ( addons . get_module_resource ( ' thunderbird ' , ' plugin ' , ' openerp_plugin.xpi ' ) , ' rb ' )
2010-06-01 06:42:47 +00:00
data [ ' plugin_file ' ] = base64 . encodestring ( file . read ( ) )
return data
2010-04-30 10:00:37 +00:00
_columns = {
' name ' : fields . char ( ' File name ' , size = 34 ) ,
' pdf_name ' : fields . char ( ' File name ' , size = 64 ) ,
2010-09-13 12:22:24 +00:00
' thunderbird ' : fields . boolean ( ' Thunderbird Plug-in ' , help = " Allows you to select an object that you’ d like to add to your email and its attachments. " ) ,
2010-06-01 06:42:47 +00:00
' plugin_file ' : fields . binary ( ' Thunderbird Plug-in ' , readonly = True , help = " Thunderbird plug-in file. Save as this file and install this plug-in in thunderbird. " ) ,
2010-09-13 13:51:42 +00:00
' pdf_file ' : fields . char ( ' Installation Manual ' , size = " 264 " , help = " The documentation file :- how to install Thunderbird Plug-in. " , readonly = True ) ,
2010-07-07 12:26:50 +00:00
' description ' : fields . text ( ' Description ' , readonly = True )
2010-08-13 12:20:05 +00:00
}
2010-04-30 10:00:37 +00:00
_defaults = {
' thunderbird ' : True ,
2010-08-03 11:12:14 +00:00
' name ' : ' openerp_plugin.xpi ' ,
2010-09-06 07:30:57 +00:00
' description ' : """
* Save the Thunderbird plug - in .
2010-09-01 12:26:56 +00:00
* Follow these steps to install Thunderbird plug - in .
1. From Menu Bar of Thunderbird , open Tools > Add - ons .
2010-09-03 13:09:42 +00:00
2. Click " Install " button .
2010-09-01 12:26:56 +00:00
3. Select the plug - in ( openerp_plugin . xpi file )
5. Click " Install Now " .
6. Restart Thunderbird .
* Follow the steps to configure OpenERP in Thunderbird .
1. Go to Tools > OpenERP Configuration .
2. Check data ( configured by default ) .
3. Click " Connect " .
4. A message appears with the state of your connection .
5. If your connection failed , check if your database is opened , and check data again .
6. If your database is connected successfully , you can start to archive your e - mail in OpenERP . """
2010-08-03 11:12:14 +00:00
}
2010-04-30 10:00:37 +00:00
thunderbird_installer ( )