-
-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] mail_tracking: Completed migration to 16.0
The following changes were implemented: 1 - Added Failed Message component and related components to reuse the Message component when rendering failed messages. This allows us to dispose of the messagefailed JS model altogether, since failed messages are now just regular messages that were marked as failed. 2 - Added Owl reactivity to failed message actions so that browser does not have to be reloaded each time a message is marked as reviewed or resent. 3 - Fixed 'Retry' and 'Set as reviewed' flows for failed messages. 4 - Fixed `Failed sent messages` filter on models by overriding `get_view` instead of `_fields_view_get` 5 - Refactored folder structure to more closely resemble the `mail` module's folder structure. 6 - Refactored module to utilize `Command` as a means to create, write, etc. instead of `[0, ...]`, `[4, ...]`. 7 - Fixed and added unit tests. 8 - Removed dead/unused code from previous version.
- Loading branch information
Showing
50 changed files
with
898 additions
and
1,190 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
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
21 changes: 21 additions & 0 deletions
21
mail_tracking/static/src/client_actions/failed_message_storage.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,21 @@ | ||
/** @odoo-module **/ | ||
|
||
const {reactive, useState} = owl; | ||
|
||
// Set reactive object to observe the current state of failed messages. | ||
// This allows re-rendering only non-reviewed failed messages without | ||
// reloading the window after a failed message has been dealt with. | ||
export const store = reactive({ | ||
reviewedChatterMessageIds: new Set(), | ||
reviewedDiscussMessageIds: new Set(), | ||
addChatterMessage(item) { | ||
this.reviewedChatterMessageIds.add(item); | ||
}, | ||
addDiscussMessage(item) { | ||
this.reviewedDiscussMessageIds.add(item); | ||
}, | ||
}); | ||
|
||
export function useStore() { | ||
return useState(store); | ||
} |
Oops, something went wrong.