From 777672fde1f833b83a869a0308f06b6e8ffa63d4 Mon Sep 17 00:00:00 2001 From: "Nicolas (vin)" Date: Mon, 14 Sep 2020 12:04:26 +0000 Subject: [PATCH] [FIX] account: fix a warning caused by the upload bill wizard The upload bill wizard is missing a field related to its _inherits reference, which cause a warning regularly in the console. This commit will add this field to fix that. Task id #2338970 closes odoo/odoo#58426 X-original-commit: dbc3d7cbb60e291079e0a1fd3dfa6600d6206228 Signed-off-by: Laurent Smet --- 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 a29fe8f04ab..3611f419625 100644 --- a/addons/account/wizard/account_tour_upload_bill.py +++ b/addons/account/wizard/account_tour_upload_bill.py @@ -8,7 +8,9 @@ import base64 class AccountTourUploadBill(models.TransientModel): _name = 'account.tour.upload.bill' _description = 'Account tour upload bill' - _inherits = {'mail.compose.message':'composer_id'} + _inherits = {'mail.compose.message': 'composer_id'} + + composer_id = fields.Many2one('mail.compose.message', string='Composer', required=True, ondelete='cascade') selection = fields.Selection( selection=lambda self: self._selection_values(), @@ -91,4 +93,4 @@ class AccountTourUploadBillEmailConfirm(models.TransientModel): def apply(self): purchase_journal = self.env['account.journal'].search([('type', '=', 'purchase')], limit=1) bill_ids = self.env['account.move'].search([('journal_id', '=', purchase_journal.id)]).ids - return self.env['account.tour.upload.bill']._action_list_view_bill(bill_ids) \ No newline at end of file + return self.env['account.tour.upload.bill']._action_list_view_bill(bill_ids)