From 60f736656ce0b882f32c34dbcb954e0fff73bd24 Mon Sep 17 00:00:00 2001 From: "Nicolas (vin)" Date: Tue, 6 Oct 2020 05:59:03 +0000 Subject: [PATCH] [IMP] account: remove _inherits in account_tour_upload_bill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit account_tour_upload_bill is using an inherits only to use a single m2m field. This will remove the inherits and simply add the field directly into the account_tour_upload_bill model. task id #2339702 closes odoo/odoo#59169 Related: odoo/upgrade#1899 Signed-off-by: William André (wan) --- addons/account/wizard/account_tour_upload_bill.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_tour_upload_bill.py b/addons/account/wizard/account_tour_upload_bill.py index fdfac251cbc..4c0209d370f 100644 --- a/addons/account/wizard/account_tour_upload_bill.py +++ b/addons/account/wizard/account_tour_upload_bill.py @@ -8,9 +8,11 @@ import base64 class AccountTourUploadBill(models.TransientModel): _name = 'account.tour.upload.bill' _description = 'Account tour upload bill' - _inherits = {'mail.compose.message': 'composer_id'} - composer_id = fields.Many2one('mail.compose.message', string='Composer', required=True, ondelete='cascade') + attachment_ids = fields.Many2many( + comodel_name='ir.attachment', + relation='account_tour_upload_bill_ir_attachments_rel', + string='Attachments') selection = fields.Selection( selection=lambda self: self._selection_values(),