[FIX] mail: done activity not updated

task-3331827

closes odoo/odoo#122633

X-original-commit: e27ce3ff448b05bbdf0785968a145f8aa952d1b5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Zelong Lin
2023-05-26 16:16:02 +02:00
parent 6861402746
commit d6a2ecb93b
4 changed files with 58 additions and 1 deletions
+1 -1
View File
@@ -337,7 +337,7 @@ export class Chatter extends Component {
async scheduleActivity() {
const schedule = async (threadId) => {
await this.activityService.schedule(this.props.threadModel, threadId);
this.load(this.props.threadId, ["activities"]);
this.load(this.props.threadId, ["activities", "messages"]);
};
if (this.props.threadId) {
schedule(this.props.threadId);
@@ -0,0 +1,36 @@
/* @odoo-module */
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add("mail_activity_schedule_from_chatter", {
test: true,
steps: [
{
trigger: "button:contains('Activities')",
},
{
trigger: "div[name='summary'] input",
run: "text Play Mario Party",
},
{
trigger: "button:contains('Schedule')",
},
{
trigger: ".o-mail-Activity:contains('Play Mario Party')",
},
{
trigger: "button:contains('Activities')",
},
{
trigger: "div[name='summary'] input",
run: "text Play Mario Kart",
},
{
trigger: "button:contains('Mark as Done')",
},
{
trigger: ".o-mail-Message:contains('Play Mario Kart')",
},
],
});
+1
View File
@@ -2,6 +2,7 @@
from . import test_get_model_definitions
from . import test_link_preview
from . import test_mail_chatter_reload
from . import test_mail_composer
from . import test_mail_full_composer
from . import test_mail_render
@@ -0,0 +1,20 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import tagged, HttpCase
@tagged("-at_install", "post_install")
class TestMailChatterReload(HttpCase):
def test_chatter_activity_tour(self):
testuser = self.env['res.users'].create({
'email': 'testuser@testuser.com',
'name': 'Test User',
'login': 'testuser',
'password': 'testuser',
})
self.start_tour(
f"/web#id={testuser.partner_id.id}&model=res.partner",
"mail_activity_schedule_from_chatter",
login="admin",
)