[IMP] mail: rename dialog model
Rename javascript model `mail.dialog` to `Dialog` in order to distinguish javascript models from python models. Part of task-2701674. closes odoo/odoo#81333 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -37,10 +37,10 @@ export class Dialog extends Component {
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @returns {mail.dialog}
|
||||
* @returns {Dialog}
|
||||
*/
|
||||
get dialog() {
|
||||
return this.messaging && this.messaging.models['mail.dialog'].get(this.props.dialogLocalId);
|
||||
return this.messaging && this.messaging.models['Dialog'].get(this.props.dialogLocalId);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -11,7 +11,7 @@ registerModel({
|
||||
* Close the attachment viewer by closing its linked dialog.
|
||||
*/
|
||||
close() {
|
||||
const dialog = this.messaging.models['mail.dialog'].find(dialog => dialog.record === this);
|
||||
const dialog = this.messaging.models['Dialog'].find(dialog => dialog.record === this);
|
||||
if (dialog) {
|
||||
dialog.delete();
|
||||
}
|
||||
@@ -51,7 +51,7 @@ registerModel({
|
||||
/**
|
||||
* Determines the dialog displaying this attachment viewer.
|
||||
*/
|
||||
dialog: one2one('mail.dialog', {
|
||||
dialog: one2one('Dialog', {
|
||||
inverse: 'attachmentViewer',
|
||||
isCausal: true,
|
||||
readonly: true,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { attr, many2one, one2one } from '@mail/model/model_field';
|
||||
import { clear, replace } from '@mail/model/model_field_command';
|
||||
|
||||
registerModel({
|
||||
name: 'mail.dialog',
|
||||
name: 'Dialog',
|
||||
identifyingFields: ['manager', ['attachmentViewer', 'followerSubtypeList']],
|
||||
recordMethods: {
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@ registerModel({
|
||||
identifyingFields: ['messaging'],
|
||||
fields: {
|
||||
// FIXME: dependent on implementation that uses insert order in relations!!
|
||||
dialogs: one2many('mail.dialog', {
|
||||
dialogs: one2many('Dialog', {
|
||||
inverse: 'manager',
|
||||
isCausal: true,
|
||||
}),
|
||||
|
||||
@@ -10,7 +10,7 @@ registerModel({
|
||||
/**
|
||||
* States the dialog displaying this follower subtype list.
|
||||
*/
|
||||
dialog: one2one('mail.dialog', {
|
||||
dialog: one2one('Dialog', {
|
||||
inverse: 'followerSubtypeList',
|
||||
isCausal: true,
|
||||
readonly: true,
|
||||
|
||||
Reference in New Issue
Block a user