[IMP] thunderbird :- set default value in binary field and remove button in configuration wizard.
bzr revid: ysa@tinyerp.co.in-20100512111032-ush01reg7imc7tsm
This commit is contained in:
parent
b6cf8a2767
commit
fe845cf695
|
@ -29,32 +29,20 @@ 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
|
||||
|
||||
def process_pdf_file(self, cr, uid, ids, context):
|
||||
"""
|
||||
Default Attach Thunderbird Plug-in Installation File.
|
||||
"""
|
||||
data = {}
|
||||
def default_get(self, cr, uid, fields, context={}):
|
||||
data = super(thunderbird_installer, self).default_get(cr, uid, fields, context)
|
||||
pdf_file = open(config['addons_path'] + "/thunderbird/doc/Installation Guide to OpenERP Thunderbid Plug-in.pdf", 'r')
|
||||
data['pdf_file'] = base64.encodestring(pdf_file.read())
|
||||
self.write(cr, uid, ids, data)
|
||||
return False
|
||||
file = open(config['addons_path'] + "/thunderbird/plugin/tiny_plugin-2.0.xpi", 'r')
|
||||
data['plugin_file'] = base64.encodestring(file.read())
|
||||
return data
|
||||
|
||||
_columns = {
|
||||
'name':fields.char('File name', size=34),
|
||||
'pdf_name':fields.char('File name', size=64),
|
||||
'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."),
|
||||
'pdf_file':fields.binary('Thunderbird Plug-in Installation File', help="The documentation file :- how to install Thunderbird Plug-in.", readonly=True),
|
||||
'pdf_file':fields.binary('Installation Manual', help="The documentation file :- how to install Thunderbird Plug-in.", readonly=True),
|
||||
'description':fields.text('Description', readonly=True)
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -25,10 +25,8 @@
|
|||
<newline/>
|
||||
|
||||
<field name="plugin_file" filename="name"/>
|
||||
<button name="process_plugin" icon="gtk-execute" string="Get Plugin File" type="object"/>
|
||||
<newline/>
|
||||
<field name="pdf_file" filename="pdf_name"/>
|
||||
<button name="process_pdf_file" icon="gtk-execute" string="Get Plugin Installation File" type="object"/>
|
||||
<newline/>
|
||||
<separator string="Thunderbird plugin installation note." colspan="4"/>
|
||||
<field name="description" nolabel="1" colspan="8"/>
|
||||
|
|
Loading…
Reference in New Issue