changeset 69c3eaa4293b in modules/account_payment_clearing:default
details: 
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset&node=69c3eaa4293b
description:
        Enforce positive timedelta

        issue11869
        review421921004
diffstat:

 payment.py |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r a071ba07530b -r 69c3eaa4293b payment.py
--- a/payment.py        Mon Oct 31 17:08:30 2022 +0100
+++ b/payment.py        Thu Nov 24 19:16:50 2022 +0100
@@ -9,7 +9,7 @@
 from trytond import backend
 from trytond.model import ModelView, Workflow, fields
 from trytond.pool import Pool, PoolMeta
-from trytond.pyson import Bool, Eval
+from trytond.pyson import Bool, Eval, TimeDelta
 from trytond.tools import grouped_slice, reduce_ids
 from trytond.transaction import Transaction
 from trytond.wizard import Button, StateTransition, StateView, Wizard
@@ -32,6 +32,10 @@
             })
     clearing_posting_delay = fields.TimeDelta(
         "Clearing Posting Delay",
+        domain=['OR',
+            ('clearing_posting_delay', '=', None),
+            ('clearing_posting_delay', '>=', TimeDelta()),
+            ],
         help="Post automatically the clearing moves after the delay.\n"
         "Leave empty for no posting.")
 

Reply via email to