diff --git a/addons/account/models/account_journal.py b/addons/account/models/account_journal.py index 2488f3049e0..caf15423fd2 100644 --- a/addons/account/models/account_journal.py +++ b/addons/account/models/account_journal.py @@ -741,9 +741,9 @@ class AccountJournal(models.Model): self = self.env['account.journal'].browse(self._context.get("default_journal_id")) move_type = self._context.get("default_move_type", "entry") if not self: - if move_type in self.env['account.move'].get_sale_types(): + if move_type in self.env['account.move'].get_sale_types(include_receipts=True): journal_type = "sale" - elif move_type in self.env['account.move'].get_purchase_types(): + elif move_type in self.env['account.move'].get_purchase_types(include_receipts=True): journal_type = "purchase" else: raise UserError(_("The journal in which to upload the invoice is not specified. "))