From 2a7387874304fd3eca4a7fa6cd0e8a6f3a1cd602 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 14 Apr 2020 16:32:54 +0200 Subject: [PATCH] [MIG] account_invoice_import_facturx to v12 Update technical name of module to remove '-' Up-port PR #78 Auto-creation of bank accounts upon invoice import is now optional Fix returned action when using the import wizard --- .../models/business_document_import.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/base_business_document_import/models/business_document_import.py b/base_business_document_import/models/business_document_import.py index c4bdd3dbbcc..91fbb488764 100644 --- a/base_business_document_import/models/business_document_import.py +++ b/base_business_document_import/models/business_document_import.py @@ -321,9 +321,19 @@ def _match_partner_bank( }) chatter_msg.append(_( "The bank account IBAN %s has been automatically " - "added on the supplier %s") % ( - iban, partner.name)) + "added on the supplier " + "%s") % ( + iban, partner.id, partner.display_name)) return partner_bank + else: + chatter_msg.append(_( + "The analysis of the business document returned " + "IBAN %s as bank account, but there is no such " + "bank account in Odoo linked to partner " + "%s and " + "the option to automatically create bank " + "accounts upon import is disabled.") + % (iban, partner.id, partner.display_name)) @api.model def _match_product(self, product_dict, chatter_msg, seller=False):