* = hr, hr_holidays, sms, snailmail, website_livechat, account_invoice_extract, approvals, documents, mail_enterprise, calendar, crm, mrp, note, website_slides, crm_enterprise, sign, social, voip task-2510656 closes odoo/odoo#72712 Related: odoo/enterprise#19241 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
/** @odoo-module **/
|
|
|
|
import MockServer from 'web.MockServer';
|
|
|
|
MockServer.include({
|
|
//--------------------------------------------------------------------------
|
|
// Private
|
|
//--------------------------------------------------------------------------
|
|
|
|
/**
|
|
* @override
|
|
*/
|
|
async _performRpc(route, args) {
|
|
if (args.model === 'mail.message' && args.method === 'cancel_letter') {
|
|
const ids = args.args[0];
|
|
return this._mockMailMessageCancelLetter(ids);
|
|
}
|
|
if (args.model === 'mail.message' && args.method === 'send_letter') {
|
|
const ids = args.args[0];
|
|
return this._mockMailMessageSendLetter(ids);
|
|
}
|
|
return this._super(...arguments);
|
|
},
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Private Mocked Methods
|
|
//--------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Simulates `cancel_letter` on `mail.message`.
|
|
*
|
|
* @private
|
|
* @param {integer[]} ids
|
|
*/
|
|
_mockMailMessageCancelLetter(ids) {
|
|
// TODO implement this mock and improve related tests (task-2300496)
|
|
},
|
|
/**
|
|
* Simulates `send_letter` on `mail.message`.
|
|
*
|
|
* @private
|
|
* @param {integer[]} ids
|
|
*/
|
|
_mockMailMessageSendLetter(ids) {
|
|
// TODO implement this mock and improve related tests (task-2300496)
|
|
},
|
|
});
|