[IMP] mail: rename attachment list model
Rename javascript model `mail.attachment_list` to `AttachmentList` in order to distinguish javascript models from python models. Part of task-2701674. closes odoo/odoo#81316 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -7,10 +7,10 @@ const { Component } = owl;
|
||||
export class AttachmentList extends Component {
|
||||
|
||||
/**
|
||||
* @returns {mail.attachment_list}
|
||||
* @returns {AttachmentList}
|
||||
*/
|
||||
get attachmentList() {
|
||||
return this.messaging && this.messaging.models['mail.attachment_list'].get(this.props.attachmentListLocalId);
|
||||
return this.messaging && this.messaging.models['AttachmentList'].get(this.props.attachmentListLocalId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ registerModel({
|
||||
/**
|
||||
* States the attachment lists that are displaying this attachment.
|
||||
*/
|
||||
attachmentLists: many2many('mail.attachment_list', {
|
||||
attachmentLists: many2many('AttachmentList', {
|
||||
inverse: 'attachments',
|
||||
}),
|
||||
attachmentViewer: many2many('AttachmentViewer', {
|
||||
|
||||
@@ -73,7 +73,7 @@ registerModel({
|
||||
/**
|
||||
* States the attachmentList displaying this card.
|
||||
*/
|
||||
attachmentList: many2one('mail.attachment_list', {
|
||||
attachmentList: many2one('AttachmentList', {
|
||||
inverse: 'attachmentCards',
|
||||
readonly: true,
|
||||
required: true,
|
||||
|
||||
@@ -115,7 +115,7 @@ registerModel({
|
||||
/**
|
||||
* States the attachmentList displaying this attachment image.
|
||||
*/
|
||||
attachmentList: many2one('mail.attachment_list', {
|
||||
attachmentList: many2one('AttachmentList', {
|
||||
inverse: 'attachmentImages',
|
||||
readonly: true,
|
||||
required: true,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { many2many, many2one, one2many, one2one } from '@mail/model/model_field'
|
||||
import { clear, insertAndReplace, replace } from '@mail/model/model_field_command';
|
||||
|
||||
registerModel({
|
||||
name: 'mail.attachment_list',
|
||||
name: 'AttachmentList',
|
||||
identifyingFields: [['composerView', 'messageView', 'chatter']],
|
||||
recordMethods: {
|
||||
_computeAttachmentImages() {
|
||||
|
||||
@@ -39,7 +39,7 @@ registerModel({
|
||||
default: 0,
|
||||
}),
|
||||
attachment: many2one('mail.attachment'),
|
||||
attachmentList: many2one('mail.attachment_list', {
|
||||
attachmentList: many2one('AttachmentList', {
|
||||
inverse: 'attachmentViewer',
|
||||
readonly: true,
|
||||
required: true,
|
||||
|
||||
@@ -289,7 +289,7 @@ registerModel({
|
||||
/**
|
||||
* Determines the attachment list that will be used to display the attachments.
|
||||
*/
|
||||
attachmentList: one2one('mail.attachment_list', {
|
||||
attachmentList: one2one('AttachmentList', {
|
||||
compute: '_computeAttachmentList',
|
||||
inverse: 'chatter',
|
||||
isCausal: true,
|
||||
|
||||
@@ -853,7 +853,7 @@ registerModel({
|
||||
/**
|
||||
* Determines the attachment list that will be used to display the attachments.
|
||||
*/
|
||||
attachmentList: one2one('mail.attachment_list', {
|
||||
attachmentList: one2one('AttachmentList', {
|
||||
compute: '_computeAttachmentList',
|
||||
inverse: 'composerView',
|
||||
isCausal: true,
|
||||
|
||||
@@ -109,7 +109,7 @@ registerModel({
|
||||
* Determines the attachment list displaying the attachments of this
|
||||
* message (if any).
|
||||
*/
|
||||
attachmentList: one2one('mail.attachment_list', {
|
||||
attachmentList: one2one('AttachmentList', {
|
||||
compute: '_computeAttachmentList',
|
||||
inverse: 'messageView',
|
||||
isCausal: true,
|
||||
|
||||
Reference in New Issue
Block a user