From c5843caf00ae830d55c1af9f6d949ef2ee9b540d Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Wed, 22 Jan 2025 10:12:27 +0100 Subject: [PATCH] fix error message on wrong buyer-party --- document.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/document.py b/document.py index 69acccd..4cd893a 100644 --- a/document.py +++ b/document.py @@ -380,7 +380,8 @@ class Incoming(metaclass=PoolMeta): 'document_incoming_invoice_xml.msg_no_supplierparty', partytxt=', '.join([ seller_party[x].replace('\n', '; ') - for x in seller_party.keys()]))) + for x in seller_party.keys() + if isinstance(seller_party[x], str)]))) # check if we found our company buyer_party = self.parsed_data.get('buyer_party', None) @@ -392,7 +393,8 @@ class Incoming(metaclass=PoolMeta): 'document_incoming_invoice_xml.msg_not_our_company', partytxt=', '.join([ buyer_party[x].replace('\n', '; ') - for x in buyer_party.keys()]))) + for x in buyer_party.keys() + if isinstance(buyer_party[x], str)]))) lines_data = copy.deepcopy(self.parsed_data.get('lines_data', None)) if lines_data: @@ -499,6 +501,7 @@ class Incoming(metaclass=PoolMeta): create_party=False) if buyer_party: self.parsed_data['buyer_party'] = buyer_party + print('\n# buyer_party-read:', buyer_party) # invoice - lines # rsm:CrossIndustryInvoice/