diff --git a/__openerp__.py b/__openerp__.py index 592affad..439d74c6 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################### # -# file_buffer_from_mail for OpenERP +# file_email for OpenERP # Copyright (C) 2012-TODAY Akretion . # @author Sébastien BEAU # @@ -21,7 +21,7 @@ ############################################################################### { - 'name': 'file_buffer_from_mail', + 'name': 'file_email', 'version': '0.1', 'category': 'Generic Modules/Others', 'license': 'AGPL-3', @@ -32,9 +32,9 @@ """, 'author': 'Akretion', 'website': 'http://www.akretion.com/', - 'depends': ['file_buffer'], + 'depends': ['file_buffer'], 'init_xml': [], - 'update_xml': [ + 'update_xml': [ ], 'demo_xml': [], 'installable': True, diff --git a/file_buffer.py b/file_buffer.py index 8e5fe50e..ee712b1f 100644 --- a/file_buffer.py +++ b/file_buffer.py @@ -20,10 +20,10 @@ # ############################################################################### -from openerp.osv import fields -from openerp.osv.orm import Model +from openerp.osv import fields, orm -class file_buffer(Model): + +class file_buffer(orm.Model): _inherit = "file.buffer" def _prepare_data_for_file_buffer(self, cr, uid, msg, context=None): @@ -44,14 +44,8 @@ class file_buffer(Model): file_id = self.create(cr, uid, vals, context=context) self.create_file_buffer_attachment(cr, uid, file_id, datas, file_name, - context=context, + context=context, extension=vals['extension']) create_ids = file_id return create_ids return None - - - - - -