[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:
Louis Wicket (wil)
2021-12-15 22:31:16 +00:00
parent 86db17588e
commit 9705820334
3 changed files with 4 additions and 4 deletions
@@ -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',
}),
/**