Skip to content

Commit

Permalink
[FIX] account: when an attachment is submited and an invoice is suces…
Browse files Browse the repository at this point in the history
…sfully parsed it is posted in the chatter

Before this commit, the attachment was only posted if no decoder was able to parse the attachment.

See https://github.com/odoo/enterprise/pull/16138

closes odoo#65878

X-original-commit: d583de0
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
  • Loading branch information
bfr-o committed Feb 10, 2021
1 parent 513a91d commit 0fcab51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account/models/account_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ def create_invoice_from_attachment(self, attachment_ids=[]):
break
if not invoice:
invoice = self.env['account.move'].create({})
invoice.with_context(no_new_invoice=True).message_post(attachment_ids=[attachment.id])
invoice.with_context(no_new_invoice=True).message_post(attachment_ids=[attachment.id])
invoices += invoice

action_vals = {
Expand Down

0 comments on commit 0fcab51

Please sign in to comment.