[IMP] mail_preview_audio: black, isort, prettier

pull/1117/head
Jaime Arroyo 2020-09-28 12:00:14 +02:00 committed by David
parent 65f4378771
commit 61f90fbd45
2 changed files with 14 additions and 19 deletions

View File

@ -2,18 +2,14 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
'name': 'Preview audio files', "name": "Preview audio files",
'summary': """ "summary": """
Allow to preview audio files""", Allow to preview audio files""",
'version': '12.0.1.0.0', "version": "13.0.1.0.0",
'license': 'AGPL-3', "license": "AGPL-3",
'author': 'Creu Blanca,Odoo Community Association (OCA)', "author": "Creu Blanca,Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/social', "website": "https://github.com/OCA/social",
'depends': [ "depends": ["mail_preview_base"],
"mail_preview_base" "data": ["template/assets.xml"],
], "qweb": ["static/src/xml/preview.xml"],
'data': [
"template/assets.xml"
],
'qweb': ['static/src/xml/preview.xml'],
} }

View File

@ -3,7 +3,7 @@
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
**********************************************************************************/ **********************************************************************************/
odoo.define("audio_file.preview", function(require) { odoo.define("audio_file.preview", function (require) {
"use strict"; "use strict";
var DocumentViewer = require("mail.DocumentViewer"); var DocumentViewer = require("mail.DocumentViewer");
@ -11,8 +11,7 @@ odoo.define("audio_file.preview", function(require) {
DocumentViewer.include({ DocumentViewer.include({
_checkAttachment: function (attachment) { _checkAttachment: function (attachment) {
if ( if (
attachment.type !== 'url' attachment.type !== 'url' && attachment.mimetype.match("audio")
&& attachment.mimetype.match("audio")
) { ) {
attachment.type = 'audio'; attachment.type = 'audio';
attachment.source_url = this._getImageUrl(attachment); attachment.source_url = this._getImageUrl(attachment);