mirror of
https://github.com/bringout/oca-ocb-mail.git
synced 2026-04-22 11:22:03 +02:00
19.0 vanilla
This commit is contained in:
parent
5df8c07b59
commit
daa394e8b0
2114 changed files with 564841 additions and 299642 deletions
|
|
@ -0,0 +1,32 @@
|
|||
import { MessagingMenu } from "@mail/core/public_web/messaging_menu";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(MessagingMenu.prototype, {
|
||||
openFailureView(failure) {
|
||||
if (failure.type === "email") {
|
||||
return super.openFailureView(failure);
|
||||
}
|
||||
this.env.services.action.doAction({
|
||||
name: _t("SMS Failures"),
|
||||
type: "ir.actions.act_window",
|
||||
view_mode: "kanban,list,form",
|
||||
views: [
|
||||
[false, "kanban"],
|
||||
[false, "list"],
|
||||
[false, "form"],
|
||||
],
|
||||
target: "current",
|
||||
res_model: failure.resModel,
|
||||
domain: [["message_has_sms_error", "=", true]],
|
||||
context: { create: false },
|
||||
});
|
||||
this.dropdown.close();
|
||||
},
|
||||
getFailureNotificationName(failure) {
|
||||
if (failure.type === "sms") {
|
||||
return _t("SMS Failure: %(modelName)s", { modelName: failure.modelName });
|
||||
}
|
||||
return super.getFailureNotificationName(...arguments);
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue