[FIX] mail: Update legacy arguments for services.action.doAction
Emails could not be resent from the chatter after failing to be sent. This was due to parts of code not being updated after a refactoring of OWL. Multiple other instances of non-updated code are updated here. Task-2887153 closes odoo/odoo#94529 X-original-commit: 8fbdb1b52b9051e92e4980d5af73460a46fe70da Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -166,7 +166,7 @@ registerModel({
|
||||
'mail.action_discuss',
|
||||
{
|
||||
active_id: this.threadToActiveId(this),
|
||||
clear_breadcrumbs: false,
|
||||
clearBreadcrumbs: false,
|
||||
on_reverse_breadcrumb: () => this.close(), // this is useless, close is called by destroy anyway
|
||||
},
|
||||
);
|
||||
|
||||
@@ -225,7 +225,7 @@ registerModel({
|
||||
this.env.services.action.doAction(
|
||||
'mail.mail_resend_message_action',
|
||||
{
|
||||
additional_context: {
|
||||
additionalContext: {
|
||||
mail_message_to_resend: this.id,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ QUnit.test('Notification Error', async function (assert) {
|
||||
"action should be the one to resend email"
|
||||
);
|
||||
assert.strictEqual(
|
||||
options.additional_context.mail_message_to_resend,
|
||||
options.additionalContext.mail_message_to_resend,
|
||||
mailMessageId,
|
||||
"action should have correct message id"
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ patchRecordMethods('Message', {
|
||||
this.env.services.action.doAction(
|
||||
'sms.sms_resend_action',
|
||||
{
|
||||
additional_context: {
|
||||
additionalContext: {
|
||||
default_mail_message_id: this.id,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -123,7 +123,7 @@ QUnit.test('Notification Error', async function (assert) {
|
||||
"action should be the one to resend sms"
|
||||
);
|
||||
assert.strictEqual(
|
||||
options.additional_context.default_mail_message_id,
|
||||
options.additionalContext.default_mail_message_id,
|
||||
mailMessageId1,
|
||||
"action should have correct message id"
|
||||
);
|
||||
|
||||
@@ -25,7 +25,7 @@ addRecordMethods('Message', {
|
||||
this.env.services.action.doAction(
|
||||
'snailmail.snailmail_letter_format_error_action',
|
||||
{
|
||||
additional_context: {
|
||||
additionalContext: {
|
||||
message_id: this.id,
|
||||
},
|
||||
},
|
||||
@@ -43,7 +43,7 @@ addRecordMethods('Message', {
|
||||
this.env.services.action.doAction(
|
||||
'snailmail.snailmail_letter_missing_required_fields_action',
|
||||
{
|
||||
additional_context: {
|
||||
additionalContext: {
|
||||
default_letter_id: letterIds[0],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ QUnit.test('Format Error', async function (assert) {
|
||||
"action should be the one for format error"
|
||||
);
|
||||
assert.strictEqual(
|
||||
options.additional_context.message_id,
|
||||
options.additionalContext.message_id,
|
||||
mailMessageId1,
|
||||
"action should have correct message id"
|
||||
);
|
||||
@@ -645,7 +645,7 @@ QUnit.test('Missing Required Fields', async function (assert) {
|
||||
"action should be the one for missing fields"
|
||||
);
|
||||
assert.strictEqual(
|
||||
options.additional_context.default_letter_id,
|
||||
options.additionalContext.default_letter_id,
|
||||
snailMailLetterId1,
|
||||
"action should have correct letter id"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user