[18.0][ADD] helpdesk_mgmt_livechat: add new module - #954
CristianoMafraJunior wants to merge 1 commit into
Conversation
cd6c34e to
dcfbe96
Compare
dcfbe96 to
91d4816
Compare
91d4816 to
6c22dd7
Compare
|
This PR has the |
6c22dd7 to
07c650d
Compare
cgarcia-solvos
left a comment
There was a problem hiding this comment.
Code and Functional review:
/ticket command not working:
| import {insert} from "@mail/model/model_field_command"; | ||
| import {registerPatch} from "@mail/model/model_core"; | ||
|
|
||
| registerPatch({ | ||
| name: "MessagingInitializer", | ||
| recordMethods: { | ||
| /** | ||
| * @override | ||
| */ | ||
| _initCommands() { | ||
| this._super(); | ||
| this.messaging.update({ | ||
| commands: insert({ | ||
| help: this.env._t("Create a new ticket (/ticket ticket title)"), | ||
| methodName: "execute_command_ticket", | ||
| name: "ticket", | ||
| }), | ||
| }); | ||
| }, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
In older Odoo versions, commands were registered by patching MessagingInitializer via registerPatch (@mail/model/model_core, @mail/model/model_field_command). In modern versions, commands are registered directly via registry.category("discuss.channel_commands").
| import {insert} from "@mail/model/model_field_command"; | |
| import {registerPatch} from "@mail/model/model_core"; | |
| registerPatch({ | |
| name: "MessagingInitializer", | |
| recordMethods: { | |
| /** | |
| * @override | |
| */ | |
| _initCommands() { | |
| this._super(); | |
| this.messaging.update({ | |
| commands: insert({ | |
| help: this.env._t("Create a new ticket (/ticket ticket title)"), | |
| methodName: "execute_command_ticket", | |
| name: "ticket", | |
| }), | |
| }); | |
| }, | |
| }, | |
| }); | |
| import {_t} from "@web/core/l10n/translation"; | |
| import {registry} from "@web/core/registry"; | |
| registry.category("discuss.channel_commands").add("ticket", { | |
| help: _t("Create a new ticket (/ticket ticket title)"), | |
| methodName: "execute_command_ticket", | |
| }); |
| "assets": { | ||
| "mail.assets_messaging": [ | ||
| "helpdesk_mgmt_livechat/static/src/models/*.esm.js", | ||
| ], | ||
| }, |
There was a problem hiding this comment.
| "assets": { | |
| "mail.assets_messaging": [ | |
| "helpdesk_mgmt_livechat/static/src/models/*.esm.js", | |
| ], | |
| }, | |
| "assets": { | |
| "web.assets_backend": [ | |
| "helpdesk_mgmt_livechat/static/src/models/*.esm.js", | |
| ], | |
| }, |
07c650d to
3864329
Compare
|
3864329 to
56b9a10
Compare
|
This PR has the |
SuperSeed #884
@Escodoo MIGOCA-54
cc @marcelsavegnago @WesleyOliveira98 @kaynnan @JulioFabio