Browse Source

[FIX] Before call 'send_mail_action' create 'mail.compose.message' record

pull/33/head
x620 9 years ago
parent
commit
300b9a4a13
  1. 11
      mail_base/static/src/js/base.js

11
mail_base/static/src/js/base.js

@ -798,14 +798,9 @@ chat_manager.post_message = function (data, options) {
} else { } else {
options.model = 'mail.compose.message'; options.model = 'mail.compose.message';
var compose_model = new Model(options.model); var compose_model = new Model(options.model);
return compose_model.call('send_mail_action', [options.res_id, {
res_model: options.model,
res_id: options.res_id,
context: {
default_parent_id: options.parent_id
}
}]);
return compose_model.call('create', [msg, {default_parent_id: options.parent_id}]).then(function(id){
return compose_model.call('send_mail_action', [id, {}]);
});
} }
} }
}; };

Loading…
Cancel
Save