Show customer and charge ids instead of token
issue6694 review38531002
This commit is contained in:
1 parent
52a2b0fb49
commit
7bc0ced00c
2 files changed
+9
-2
No files matched your search
+7
-2
@@ -77,7 +77,12 @@ class Payment:
|
||||
stripe_checkout_needed = fields.Function(
|
||||
fields.Boolean("Stripe Checkout Needed"), 'get_stripe_checkout_needed')
|
||||
stripe_checkout_id = fields.Char("Stripe Checkout ID", readonly=True)
|
||||
stripe_charge_id = fields.Char("Stripe Charge ID", readonly=True)
|
||||
stripe_charge_id = fields.Char(
|
||||
"Stripe Charge ID", readonly=True,
|
||||
states={
|
||||
'invisible': ~Eval('stripe_journal') & ~Eval('stripe_charge_id'),
|
||||
},
|
||||
depends=['stripe_journal'])
|
||||
stripe_capture = fields.Boolean(
|
||||
"Stripe Capture",
|
||||
states={
|
||||
@@ -404,7 +409,7 @@ class Customer(ModelSQL, ModelView):
|
||||
|
||||
def get_rec_name(self, name):
|
||||
name = super(Customer, self).get_rec_name(name)
|
||||
return self.stripe_token if self.stripe_token else name
|
||||
return self.stripe_customer_id if self.stripe_customer_id else name
|
||||
|
||||
@classmethod
|
||||
def delete(cls, customers):
|
||||
|
||||
@@ -8,6 +8,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='date']" position="after">
|
||||
<newline/>
|
||||
<label name="stripe_charge_id"/>
|
||||
<field name="stripe_charge_id" colspan="3"/>
|
||||
<label name="stripe_customer"/>
|
||||
<field name="stripe_customer" colspan="3"/>
|
||||
<label name="stripe_token"/>
|
||||
|
||||
Reference in new issue
Block a user