mirror of https://github.com/OCA/social.git
[IMP] mail_preview_audio: black, isort, prettier
parent
65f4378771
commit
61f90fbd45
|
@ -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'],
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue