summaryrefslogtreecommitdiff
path: root/addons/sms/static/src
diff options
context:
space:
mode:
authorDebauche Stéphane <std@odoo.com>2020-01-20 14:28:35 +0000
committerThibault Delavallée <tde@odoo.com>2020-01-28 09:14:43 +0000
commit75f7ab0608bfb9770e99fe2ce1ad55e76c70ac72 (patch)
tree16654596a1fc75b24e71c56f56d27a65b96f5739 /addons/sms/static/src
parent1ec887b773581b6316902997fec94176bbae1ac0 (diff)
[FIX] web: fix email and phone widgets with empty value
When the value is empty in a related field, string of the element was displaying "false" instead of an empty string which is not what we expect. This commit fixes that issue. Task ID 2119333 PR #40949
Diffstat (limited to 'addons/sms/static/src')
-rw-r--r--addons/sms/static/src/js/fields_phone_widget.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sms/static/src/js/fields_phone_widget.js b/addons/sms/static/src/js/fields_phone_widget.js
index 4dd9a033e23..84809f2b044 100644
--- a/addons/sms/static/src/js/fields_phone_widget.js
+++ b/addons/sms/static/src/js/fields_phone_widget.js
@@ -79,7 +79,7 @@ Phone.include({
*/
_renderReadonly: function () {
var def = this._super.apply(this, arguments);
- if (this.enableSMS) {
+ if (this.enableSMS && this.value) {
var $composerButton = $('<a>', {
title: _t('Send SMS Text Message'),
href: '',