[IMP] mail: rename attachment image model

Rename javascript model `mail.attachment_image` to `AttachmentImage` in
order to distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81315

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Louis Wicket (wil)
2021-12-14 20:42:44 +00:00
parent 6a12cd65d5
commit ccabe512b3
4 changed files with 6 additions and 6 deletions
@@ -11,7 +11,7 @@ export class AttachmentImage extends Component {
*/
setup() {
super.setup();
useComponentToModel({ fieldName: 'component', modelName: 'mail.attachment_image', propNameAsRecordLocalId: 'attachmentImageLocalId' });
useComponentToModel({ fieldName: 'component', modelName: 'AttachmentImage', propNameAsRecordLocalId: 'attachmentImageLocalId' });
}
//--------------------------------------------------------------------------
@@ -19,10 +19,10 @@ export class AttachmentImage extends Component {
//--------------------------------------------------------------------------
/**
* @returns {mail.attachment_image}
* @returns {AttachmentImage}
*/
get attachmentImage() {
return this.messaging && this.messaging.models['mail.attachment_image'].get(this.props.attachmentImageLocalId);
return this.messaging && this.messaging.models['AttachmentImage'].get(this.props.attachmentImageLocalId);
}
}
@@ -289,7 +289,7 @@ registerModel({
/**
* States the attachment images that are displaying this attachment.
*/
attachmentImages: one2many('mail.attachment_image', {
attachmentImages: one2many('AttachmentImage', {
inverse: 'attachment',
isCausal: true,
}),
@@ -5,7 +5,7 @@ import { attr, many2one } from '@mail/model/model_field';
import { clear, insert, insertAndReplace, replace } from '@mail/model/model_field_command';
registerModel({
name: 'mail.attachment_image',
name: 'AttachmentImage',
identifyingFields: ['attachmentList', 'attachment'],
lifecycleHooks: {
_created() {
@@ -75,7 +75,7 @@ registerModel({
/**
* States the attachment images that are displaying this imageAttachments.
*/
attachmentImages: one2many('mail.attachment_image', {
attachmentImages: one2many('AttachmentImage', {
compute: '_computeAttachmentImages',
inverse: 'attachmentList',
isCausal: true,