From 0fcab51a2681d3a4a76952aaf99642ed0d0f08a2 Mon Sep 17 00:00:00 2001 From: "Benjamin Frantzen (bfr)" Date: Tue, 9 Feb 2021 14:41:21 +0000 Subject: [PATCH] [FIX] account: when an attachment is submited and an invoice is sucessfully 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/odoo#65878 X-original-commit: d583de02392b7738e7eead4ef33f91ef8a47b0f6 Signed-off-by: Laurent Smet Signed-off-by: bfr-o --- addons/account/models/account_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_journal.py b/addons/account/models/account_journal.py index 701f4069a2943..4bc3e09a3603e 100644 --- a/addons/account/models/account_journal.py +++ b/addons/account/models/account_journal.py @@ -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 = {