details: https://code.tryton.org/tryton/commit/918bb8531e94
branch: default
user: Cédric Krier <[email protected]>
date: Tue Mar 24 16:36:12 2026 +0100
description:
Set direct debit based on party configuration if there is no payment
mandate define
Closes #14702
diffstat:
modules/edocument_ubl/edocument.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (23 lines):
diff -r df2a9f9c4b54 -r 918bb8531e94 modules/edocument_ubl/edocument.py
--- a/modules/edocument_ubl/edocument.py Fri Mar 20 19:19:15 2026 +0100
+++ b/modules/edocument_ubl/edocument.py Tue Mar 24 16:36:12 2026 +0100
@@ -1384,6 +1384,9 @@
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 @@
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