[IMP] mail: properly pluralize x2many fields
Go through all the x2many javascript models fields and make their name plural when needed. closes odoo/odoo#81467 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -299,7 +299,7 @@ registerModel({
|
||||
attachmentLists: many2many('AttachmentList', {
|
||||
inverse: 'attachments',
|
||||
}),
|
||||
attachmentViewer: many2many('AttachmentViewer', {
|
||||
attachmentViewers: many2many('AttachmentViewer', {
|
||||
inverse: 'attachments',
|
||||
}),
|
||||
checksum: attr(),
|
||||
|
||||
@@ -83,7 +83,7 @@ registerModel({
|
||||
/**
|
||||
* Determines the attachment viewers displaying this attachment list (if any).
|
||||
*/
|
||||
attachmentViewer: one2many('AttachmentViewer', {
|
||||
attachmentViewers: one2many('AttachmentViewer', {
|
||||
inverse: 'attachmentList',
|
||||
isCausal: true,
|
||||
}),
|
||||
|
||||
@@ -40,12 +40,12 @@ registerModel({
|
||||
}),
|
||||
attachment: many2one('mail.attachment'),
|
||||
attachmentList: many2one('AttachmentList', {
|
||||
inverse: 'attachmentViewer',
|
||||
inverse: 'attachmentViewers',
|
||||
readonly: true,
|
||||
required: true,
|
||||
}),
|
||||
attachments: many2many('mail.attachment', {
|
||||
inverse: 'attachmentViewer',
|
||||
inverse: 'attachmentViewers',
|
||||
related: 'attachmentList.viewableAttachments',
|
||||
}),
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user