-
-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] mail_forward: Migration to version 17.0
- Loading branch information
1 parent
807ef4a
commit f65b385
Showing
11 changed files
with
74 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
mail_forward/static/src/components/forward_message/forward_message.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
mail_forward/static/src/components/message_action_list/message_action_list.xml
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
mail_forward/static/src/core/common/message_actions.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* @odoo-module */ | ||
/* Copyright 2024 Tecnativa - Carlos Lopez | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
*/ | ||
|
||
import {ForwardMessage} from "../../components/forward_message/forward_message.esm"; | ||
import {messageActionsRegistry} from "@mail/core/common/message_actions"; | ||
|
||
messageActionsRegistry.add("forward", { | ||
callComponent: ForwardMessage, | ||
props: (component) => ({message: component.props.message}), | ||
condition: (component) => | ||
component.props.message.is_discussion && !component.props.message.is_note, | ||
sequence: 10, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ class TestMailForward(TestMailComposer, HttpCase): | |
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.test_record.write({"name": "Test Forward", "email": "[email protected]"}) | ||
cls.partner_follower1 = cls.env["res.partner"].create( | ||
{"name": "Follower1", "email": "[email protected]"} | ||
) | ||
|
@@ -29,7 +30,7 @@ def test_01_mail_forward(self): | |
""" | ||
ctx = { | ||
"default_model": self.test_record._name, | ||
"default_res_id": self.test_record.id, | ||
"default_res_ids": [self.test_record.id], | ||
} | ||
composer_form = Form(self.env["mail.compose.message"].with_context(**ctx)) | ||
composer_form.body = "<p>Hello</p>" | ||
|
@@ -69,9 +70,15 @@ def test_01_mail_forward(self): | |
self.assertIn("---------- Forwarded message ---------", forward_message.body) | ||
|
||
def test_02_mail_forward_tour(self): | ||
self.test_record.message_post( | ||
body="Hello World", message_type="comment", subtype_xmlid="mail.mt_comment" | ||
) | ||
self.start_tour("/web", "mail_forward.mail_forward_tour", login="admin") | ||
|
||
def test_03_mail_note_not_forward_tour(self): | ||
self.test_record.message_post( | ||
body="This is a note", message_type="comment", subtype_xmlid="mail.mt_note" | ||
) | ||
self.start_tour( | ||
"/web", "mail_forward.mail_note_not_forward_tour", login="admin" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters