Create the module for Swift attachment

This commit is contained in:
Thierry Ducrest
2017-08-25 16:34:12 +02:00
parent e67626945e
commit 017e1c7bd9
6 changed files with 38 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
from . import ir_attachment
+19
View File
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import logging
from odoo import api, models
_logger = logging.getLogger(__name__)
class IrAttachment(models.Model):
_inherit = 'ir.attachment'
@api.model
def _file_write(self, value, checksum):
_logger.debug('Writing a file :)')
filename = super(IrAttachment, self)._file_write(value, checksum)
return filename