diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-12 19:03:00 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-12 19:03:00 +0100 |
| commit | 56974322f8c67ec5680654ed4bcb08ca57117c46 (patch) | |
| tree | e64c00274a47c46cf78e99b6ba62df4bc4dbbba4 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | f6ef0c776096774fc4c6821449ab42cfc2f53e62 (diff) | |
| parent | 3b80a059ff4305fe10c9b40a3118508b1b849ead (diff) | |
[MERGE] forward port branch 11.0 up to 3b80a059ff4
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index d0662fe7cef..f3e66cee421 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -1094,6 +1094,7 @@ var AbstractFieldBinary = AbstractField.extend({ }, 'click .o_clear_file_button': 'on_clear', }), + context: { bin_size: true }, init: function (parent, name, record) { this._super.apply(this, arguments); this.fields = record.fields; @@ -1312,25 +1313,6 @@ var FieldBinaryFile = AbstractFieldBinary.extend({ }, }); -var FieldBinaryDownloadLink = AbstractFieldBinary.extend({ - template: 'FieldBinaryDownloadLink', - events: _.extend({}, AbstractFieldBinary.prototype.events, { - 'click': function (ev) { - ev.stopPropagation(); - }, - }), - supportedFieldTypes: ['binary'], - init: function () { - this._super.apply(this, arguments); - this.filename = _t("Binary File"); - if (this.nodeOptions.filename && this.recordData[this.nodeOptions.filename]) { - this.filename = this.recordData[this.nodeOptions.filename]; - } - this.url = "data:application/octet-stream;base64," + this.value; - this.text = _t("Download"); - }, -}); - var PriorityWidget = AbstractField.extend({ // the current implementation of this widget makes it // only usable for fields of type selection @@ -2561,7 +2543,6 @@ return { TranslatableFieldMixin: TranslatableFieldMixin, DebouncedField: DebouncedField, FieldEmail: FieldEmail, - FieldBinaryDownloadLink: FieldBinaryDownloadLink, FieldBinaryFile: FieldBinaryFile, FieldBinaryImage: FieldBinaryImage, FieldBoolean: FieldBoolean, |
