[IMP] mail, snailmail: rename notification model

Rename javascript model `mail.notification` to `Notification` in order
to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81418

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Louis Wicket (wil)
2021-12-15 11:12:50 +00:00
parent db0afd3760
commit d54f224f2b
5 changed files with 7 additions and 7 deletions
@@ -96,7 +96,7 @@ registerModel({
}
if ('notifications' in data) {
data2.notifications = insert(data.notifications.map(notificationData =>
this.messaging.models['mail.notification'].convertData(notificationData)
this.messaging.models['Notification'].convertData(notificationData)
));
}
if ('parentMessage' in data) {
@@ -578,7 +578,7 @@ registerModel({
compute: '_computeDateFromNow',
}),
email_from: attr(),
failureNotifications: one2many('mail.notification', {
failureNotifications: one2many('Notification', {
compute: '_computeFailureNotifications',
}),
guestAuthor: many2one('Guest', {
@@ -709,7 +709,7 @@ registerModel({
inverse: 'message',
isCausal: true,
}),
notifications: one2many('mail.notification', {
notifications: one2many('Notification', {
inverse: 'message',
isCausal: true,
}),
@@ -5,7 +5,7 @@ import { attr, many2one } from '@mail/model/model_field';
import { clear, insert, insertAndReplace, unlinkAll } from '@mail/model/model_field_command';
registerModel({
name: 'mail.notification',
name: 'Notification',
identifyingFields: ['id'],
modelMethods: {
/**
@@ -124,7 +124,7 @@ registerModel({
notification_type: attr({
readonly: true,
}),
notifications: one2many('mail.notification', {
notifications: one2many('Notification', {
inverse: 'notificationGroup',
}),
res_id: attr({
@@ -31,7 +31,7 @@ class SnailmailErrorDialog extends Component {
}
/**
* @returns {mail.notification}
* @returns {Notification}
*/
get notification() {
// Messages from snailmail are considered to have at most one notification.
@@ -46,7 +46,7 @@ class SnailmailNotificationPopover extends Component {
}
/**
* @returns {mail.notification}
* @returns {Notification}
*/
get notification() {
// Messages from snailmail are considered to have at most one notification.