Browse Source

publish muk_web_utils - 12.0

pull/115/head
MuK IT GmbH 5 years ago
parent
commit
58f7801b8a
  1. 2
      muk_web_utils/__manifest__.py
  2. 6
      muk_web_utils/controllers/attachment.py
  3. 14
      muk_web_utils/i18n/de.po

2
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",

6
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)

14
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 <manuel.marklo@mukit.at>\n"
"Language-Team: German <http://https://weblate.mukit.at/projects/web-12/"
"muk_web_utils/de/>\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 ""
Loading…
Cancel
Save