changeset 2348d81854fc in modules/account_payment_stripe:default
details:
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset&node=2348d81854fc
description:
Add option to remove leading and trailing white spaces from char
issue7914
review340511008
diffstat:
payment.py | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diffs (103 lines):
diff -r 990b40c7b2e0 -r 2348d81854fc payment.py
--- a/payment.py Sun Jul 17 19:07:38 2022 +0200
+++ b/payment.py Mon Sep 19 21:25:55 2022 +0200
@@ -92,7 +92,8 @@
class CheckoutMixin:
__slots__ = ()
- stripe_checkout_id = fields.Char("Stripe Checkout ID", readonly=True)
+ stripe_checkout_id = fields.Char(
+ "Stripe Checkout ID", readonly=True, strip=False)
@classmethod
def copy(cls, records, default=None):
@@ -131,7 +132,7 @@
fields.Boolean("Stripe Checkout Needed"),
'on_change_with_stripe_checkout_needed')
stripe_charge_id = fields.Char(
- "Stripe Charge ID", readonly=True,
+ "Stripe Charge ID", readonly=True, strip=False,
states={
'invisible': ((Eval('process_method') != 'stripe')
| ~Eval('stripe_charge_id')),
@@ -148,12 +149,12 @@
fields.Boolean("Stripe Capture Needed"),
'get_stripe_capture_needed')
stripe_token = fields.Char(
- "Stripe Token", readonly=True,
+ "Stripe Token", readonly=True, strip=False,
states={
'invisible': ~Eval('stripe_token'),
})
stripe_payment_intent_id = fields.Char(
- "Stripe Payment Intent", readonly=True,
+ "Stripe Payment Intent", readonly=True, strip=False,
states={
'invisible': ~Eval('stripe_payment_intent_id'),
})
@@ -171,7 +172,7 @@
| ~Eval('stripe_capture_needed')),
})
stripe_idempotency_key = fields.Char(
- "Stripe Idempotency Key", readonly=True)
+ "Stripe Idempotency Key", readonly=True, strip=False)
stripe_error_message = fields.Char("Stripe Error Message", readonly=True,
states={
'invisible': ~Eval('stripe_error_message'),
@@ -695,8 +696,9 @@
], "State", readonly=True, select=True, sort=False)
stripe_idempotency_key = fields.Char(
- "Stripe Idempotency Key", readonly=True)
- stripe_refund_id = fields.Char("Stripe Refund ID", readonly=True)
+ "Stripe Idempotency Key", readonly=True, strip=False)
+ stripe_refund_id = fields.Char(
+ "Stripe Refund ID", readonly=True, strip=False)
stripe_error_message = fields.Char("Stripe Error Message", readonly=True,
states={
'invisible': ~Eval('stripe_error_message'),
@@ -896,8 +898,9 @@
__name__ = 'account.payment.stripe.account'
name = fields.Char("Name", required=True)
- secret_key = fields.Char("Secret Key", required=True)
- publishable_key = fields.Char("Publishable Key", required=True)
+ secret_key = fields.Char("Secret Key", required=True, strip=False)
+ publishable_key = fields.Char(
+ "Publishable Key", required=True, strip=False)
webhook_identifier = fields.Char("Webhook Identifier", readonly=True)
webhook_endpoint = fields.Function(
fields.Char(
@@ -905,12 +908,12 @@
help="The URL to be called by Stripe."),
'on_change_with_webhook_endpoint')
webhook_signing_secret = fields.Char(
- "Webhook Signing Secret",
+ "Webhook Signing Secret", strip=False,
states={
'invisible': ~Eval('webhook_identifier'),
},
help="The Stripe's signing secret of the webhook.")
- last_event = fields.Char("Last Event", readonly=True)
+ last_event = fields.Char("Last Event", readonly=True, strip=False)
setup_intent_delay = fields.TimeDelta(
"Setup Intent Delay", required=True,
help="The delay before cancelling setup intent not succeeded.")
@@ -1320,14 +1323,14 @@
stripe_checkout_needed = fields.Function(
fields.Boolean("Stripe Checkout Needed"), 'get_stripe_checkout_needed')
stripe_customer_id = fields.Char(
- "Stripe Customer ID",
+ "Stripe Customer ID", strip=False,
states={
'readonly': ((Eval('stripe_customer_id') | Eval('stripe_token'))
& (Eval('id', -1) >= 0)),
})
- stripe_token = fields.Char("Stripe Token", readonly=True)
+ stripe_token = fields.Char("Stripe Token", readonly=True, strip=False)
stripe_setup_intent_id = fields.Char(
- "Stripe SetupIntent ID", readonly=True)
+ "Stripe SetupIntent ID", readonly=True, strip=False)
stripe_error_message = fields.Char("Stripe Error Message", readonly=True,
states={
'invisible': ~Eval('stripe_error_message'),