details: https://code.tryton.org/tryton/commit/4329c94e8d69
branch: default
user: Cédric Krier <[email protected]>
date: Sat Sep 19 15:36:05 2026 +0200
description:
Make Stripe idempotency key field readonly only once stored
When copying the default value is set to None but the actual default
value is a
random value. This triggers the check of access right on the readonly
field.
diffstat:
modules/account_payment_stripe/payment.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 37c09de48464 -r 4329c94e8d69 modules/account_payment_stripe/payment.py
--- a/modules/account_payment_stripe/payment.py Sat Sep 19 15:34:10 2026 +0200
+++ b/modules/account_payment_stripe/payment.py Sat Sep 19 15:36:05 2026 +0200
@@ -162,8 +162,9 @@
| ~Eval('stripe_capture_needed')),
})
stripe_idempotency_key = fields.Char(
- "Stripe Idempotency Key", readonly=True, strip=False,
+ "Stripe Idempotency Key", strip=False,
states={
+ 'readonly': Eval('id', -1) >= 0,
'invisible': Eval('process_method') != 'stripe',
})
stripe_error_message = fields.Char("Stripe Error Message", readonly=True,