From 283b4fc0ca6f8099c35c9bdad541af5ef984eba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 24 Mar 2026 16:36:12 +0100 Subject: [PATCH] Set direct debit based on party configuration if there is no payment mandate define Closes #14702 --- modules/edocument_ubl/edocument.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/edocument_ubl/edocument.py b/modules/edocument_ubl/edocument.py index 1e40205d92..ae20bbc20e 100644 --- a/modules/edocument_ubl/edocument.py +++ b/modules/edocument_ubl/edocument.py @@ -1384,6 +1384,9 @@ class Invoice_Payment(metaclass=PoolMeta): invoice, attachments = super()._parse_invoice_2(root) if root.find('./{*}PaymentMeans/{*}PaymentMandate') is not None: invoice.payment_direct_debit = True + else: + invoice.payment_direct_debit = invoice.party.get_multivalue( + 'payment_direct_debit', company=invoice.company.id) return invoice, attachments @classmethod @@ -1391,6 +1394,9 @@ class Invoice_Payment(metaclass=PoolMeta): invoice, attachments = super()._parse_invoice_2(root) if root.find('./{*}PaymentMeans/{*}PaymentMandate') is not None: invoice.payment_direct_debit = True + else: + invoice.payment_direct_debit = invoice.party.get_multivalue( + 'payment_direct_debit', company=invoice.company.id) return invoice, attachments