diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2017-09-20 14:23:27 +0200 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2017-09-26 09:37:16 +0200 |
| commit | e64762e535504a82c5a55615b9a3e17dbf7ac562 (patch) | |
| tree | 32340a98c0e8f17a0b250362ffee508509b95844 /addons/web/static/src/js/fields | |
| parent | b4824d78ebdbe3363286458f16175fe78069d6c9 (diff) | |
[FIX] web, google_drive: fixed display of field link
Before this commit, a field handled with a widget url was given its value (href) as its text, fully displaying the url.
Moreover, the display was odd and did not match that of buttons
After this commit, if the field contains a text attribute, we use is as the text of the link.
The link also correctly displays and looks like a button (in a form view)
Of course, a test for this new field widget feature is implemented
closes #19587
Diffstat (limited to 'addons/web/static/src/js/fields')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index dc4887eacc7..1139b234edd 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -1049,7 +1049,7 @@ var UrlWidget = InputField.extend({ * @private */ _renderReadonly: function () { - this.$el.text(this.value) + this.$el.text(this.attrs.text || this.value) .addClass('o_form_uri o_text_overflow') .attr('href', this.value); } |
