From 9d806543e773dbc4b5e095e7987c43b81e401741 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Mon, 22 Sep 2014 18:37:39 +0200 Subject: [PATCH] [FIX] pass filename to column --- attachment_preview/static/src/js/attachment_preview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/attachment_preview/static/src/js/attachment_preview.js b/attachment_preview/static/src/js/attachment_preview.js index 51c6ef06..0bbeb7d5 100644 --- a/attachment_preview/static/src/js/attachment_preview.js +++ b/attachment_preview/static/src/js/attachment_preview.js @@ -153,6 +153,7 @@ openerp.attachment_preview = function(instance) }) .get(), $elements.attr('data-field'), + $elements.attr('data-filename'), ], {}) .then(function(extensions) @@ -181,12 +182,13 @@ openerp.attachment_preview = function(instance) { var link = this._super.apply(this, arguments); link += _.template( - '<%-preview_text%>', + '<%-preview_text%>', { preview_id: options.id, preview_text: _t('Preview'), preview_model: options.model, preview_field: this.id, + preview_filename: this.filename or '', }); return link; }