mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-19 10:32:00 +02:00
Initial commit: Core packages
This commit is contained in:
commit
12c29a983b
9512 changed files with 8379910 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import '@mail/../tests/helpers/mock_server'; // ensure mail overrides are applied first
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { MockServer } from "@web/../tests/helpers/mock_server";
|
||||
|
||||
patch(MockServer.prototype, 'rating', {
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
_mockMailMessageMessageFormat(ids) {
|
||||
const formattedMessages = this._super(...arguments);
|
||||
for (const formattedMessage of formattedMessages) {
|
||||
const [rating] = this.getRecords('rating.rating', [
|
||||
['message_id', '=', formattedMessage.id],
|
||||
]);
|
||||
if (rating) {
|
||||
formattedMessage['rating'] = {
|
||||
'id': rating.id,
|
||||
'ratingImageUrl': rating.rating_image_url,
|
||||
'ratingText': rating.rating_text,
|
||||
};
|
||||
}
|
||||
}
|
||||
return formattedMessages;
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import { addModelNamesToFetch } from '@bus/../tests/helpers/model_definitions_helpers';
|
||||
|
||||
addModelNamesToFetch(['rating.rating']);
|
||||
Loading…
Add table
Add a link
Reference in a new issue