[FIX] mail: self-author on 'Creating a new record...' message
Before this commit, when a record is in draft, the chatter message "Creating a new record..." shown no author. The intended showing is to display current user as author of this message. Persona model requires `id` and `type`, the latter to determine whether the persona is a guest or partner. Only the id of current user was provided, so it was not enough to determine the appropriate `Persona`. closes odoo/odoo#144864 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -107,7 +107,7 @@ patch(ThreadService.prototype, {
|
||||
if (id === false) {
|
||||
thread.messages.push({
|
||||
id: this.messageService.getNextTemporaryId(),
|
||||
author: { id: this.store.self.id },
|
||||
author: this.store.self,
|
||||
body: _t("Creating a new record..."),
|
||||
message_type: "notification",
|
||||
trackingValues: [],
|
||||
|
||||
@@ -312,6 +312,7 @@ QUnit.test("base rendering when chatter has no record", async () => {
|
||||
await contains(".o-mail-AttachmentBox", { count: 0 });
|
||||
await contains(".o-mail-Chatter .o-mail-Thread");
|
||||
await contains(".o-mail-Message");
|
||||
await contains(".o-mail-Message-author", { text: "Mitchell Admin" });
|
||||
await contains(".o-mail-Message-body", { text: "Creating a new record..." });
|
||||
await contains("button", { count: 0, text: "Load More" });
|
||||
await contains(".o-mail-Message-actions");
|
||||
|
||||
Reference in New Issue
Block a user