[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 <smetl@users.noreply.github.com>
This commit is contained in:
Nicolas (vin)
2020-09-24 12:37:47 +00:00
parent 636cd61acd
commit 777672fde1
@@ -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)
return self.env['account.tour.upload.bill']._action_list_view_bill(bill_ids)