[FIX] mail: chatter: dialog's form view not ready
Since rev. 002660a9, form views are instantiated with their fields_view. This
had an impact in FormViewDialog as the inner form view instantiation was made
asynchronous. Unfortunately, an event handler was set on this form view in the
chatter, and it produced a traceback as the form view wasn't instantiated yet.
This commit is contained in:
@@ -187,11 +187,13 @@ var ChatterComposer = composer.BasicComposer.extend({
|
||||
dialog.on('closed', self, function () {
|
||||
deferred.resolve();
|
||||
});
|
||||
dialog.view_form.on('on_button_cancel', self, function () {
|
||||
names_to_remove.push(partner_name);
|
||||
if (partner_id) {
|
||||
recipient_ids_to_remove.push(partner_id);
|
||||
}
|
||||
dialog.opened().then(function () {
|
||||
dialog.view_form.on('on_button_cancel', self, function () {
|
||||
names_to_remove.push(partner_name);
|
||||
if (partner_id) {
|
||||
recipient_ids_to_remove.push(partner_id);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
$.when.apply($, emails_deferred).then(function () {
|
||||
|
||||
Reference in New Issue
Block a user