details: https://code.tryton.org/tryton/commit/6a4cef9afe82
branch: default
user: Adrià Tarroja Caubet <[email protected]>
date: Thu Sep 03 15:56:17 2026 +0200
description:
Restrict direct debit reception to receivable accounts
Closes #15059
diffstat:
modules/account_payment/account.py | 5 +----
modules/account_payment_sepa/account.xml | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diffs (27 lines):
diff -r e590b70d17ce -r 6a4cef9afe82 modules/account_payment/account.py
--- a/modules/account_payment/account.py Wed Sep 16 14:37:43 2026 +0200
+++ b/modules/account_payment/account.py Thu Sep 03 15:56:17 2026 +0200
@@ -267,10 +267,7 @@
@classmethod
def _pay_direct_debit_domain(cls, date):
return [
- ['OR',
- ('account.type.receivable', '=', True),
- ('account.type.payable', '=', True),
- ],
+ ('account.type.receivable', '=', True),
('party.reception_direct_debits', '!=', None),
('reconciliation', '=', None),
('payment_amount', '!=', 0),
diff -r e590b70d17ce -r 6a4cef9afe82 modules/account_payment_sepa/account.xml
--- a/modules/account_payment_sepa/account.xml Wed Sep 16 14:37:43 2026 +0200
+++ b/modules/account_payment_sepa/account.xml Thu Sep 03 15:56:17 2026 +0200
@@ -9,7 +9,7 @@
<field name="name">Receivable with Mandate</field>
<field name="sequence" eval="25"/>
<field name="domain"
- eval="['AND', ['OR', ('debit', '>', 0), ('credit', '<',
0)], ('party.sepa_mandates.state', '=', 'validated')]"
+ eval="['AND', ('account.type.receivable', '=', True), ['OR',
('debit', '>', 0), ('credit', '<', 0)], ('party.sepa_mandates.state',
'=', 'validated')]"
pyson="1"/>
<field name="count" eval="True"/>
<field name="act_window" ref="account_payment.act_move_line_form"/>