[FIX] sms: fix some issues in JS widgets

PURPOSE

Followup of merge 4287481 .

SPECIFICATIONS

Correctly reload after sending SMS;
Correctly re-render the typing widget for SMS.

LINKS

Task 1922187
This commit is contained in:
Remi Rahir
2019-07-23 08:29:15 +00:00
committed by Thibault Delavallée
parent e20c1b6eff
commit cce91e35f7
2 changed files with 6 additions and 2 deletions
@@ -32,7 +32,7 @@ Phone.include({
default_number_field_name: this.name,
default_composition_mode: 'comment',
});
var self = this;
return this.do_action({
title: _t('Send SMS Text Message'),
type: 'ir.actions.act_window',
@@ -40,7 +40,10 @@ Phone.include({
target: 'new',
views: [[false, 'form']],
context: context,
});
}, {
on_close: function () {
self.trigger_up('reload');
}});
},
/**
@@ -37,6 +37,7 @@ var SmsWidget = FieldText.extend({
var def = this._super.apply(this, arguments);
this._compute();
$('.o_sms_container').remove();
var $sms_container = $('<div class="o_sms_container"/>');
$sms_container.append(this._renderSMSInfo());
$sms_container.append(this._renderIAPButton());