diff --git a/muk_web_utils/__manifest__.py b/muk_web_utils/__manifest__.py index b797103..e9442e2 100644 --- a/muk_web_utils/__manifest__.py +++ b/muk_web_utils/__manifest__.py @@ -20,7 +20,7 @@ { "name": "MuK Web Utils", "summary": """Utility Features""", - "version": "12.0.2.9.4", + "version": "12.0.2.9.6", "category": "Extra Tools", "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_web_utils/controllers/attachment.py b/muk_web_utils/controllers/attachment.py index 2dd7a64..0c66986 100644 --- a/muk_web_utils/controllers/attachment.py +++ b/muk_web_utils/controllers/attachment.py @@ -40,11 +40,15 @@ class AttachmentController(http.Controller): 'type': 'binary', 'public': False, 'temporary': tmp, - 'mimetype': ufile.mimetype if ufile.mimetype and ufile.mimetype != 'application/octet-stream' else None, }) attachment.generate_access_token() + if ufile.mimetype and ufile.mimetype != 'application/octet-stream': + attachment.sudo().write({ + 'mimetype': ufile.mimetype, + }) base_url = request.env['ir.config_parameter'].sudo().get_param('web.base.url') result = attachment.read(['name', 'datas_fname', 'mimetype', 'checksum', 'access_token'])[0] result['url'] = '%s/web/content/%s?access_token=%s' % (base_url, attachment.id, attachment.access_token) + print(result) return json.dumps(result) \ No newline at end of file diff --git a/muk_web_utils/i18n/de.po b/muk_web_utils/i18n/de.po index d7ad12c..d7f58a9 100644 --- a/muk_web_utils/i18n/de.po +++ b/muk_web_utils/i18n/de.po @@ -7,13 +7,16 @@ msgstr "" "Project-Id-Version: Odoo Server 12.0-20190128\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-27 09:28+0000\n" -"PO-Revision-Date: 2019-02-27 09:28+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" +"PO-Revision-Date: 2019-05-12 17:18+0000\n" +"Last-Translator: Manuel Marklo \n" +"Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: muk_web_utils #. openerp-web @@ -163,7 +166,7 @@ msgstr "Konfiguration " #: code:addons/muk_web_utils/static/src/xml/share.xml:97 #, python-format msgid "Download" -msgstr "" +msgstr "Herunterladen" #. module: muk_web_utils #. openerp-web @@ -323,4 +326,3 @@ msgstr "" #, python-format msgid "shared a message with you!" msgstr "" -