Clear stripe customer field when party is changed

Those fields depend on the selected party.

issue6805
review44351002
This commit is contained in:
Cédric Krier committed 2017-10-05 10:56:52 +02:00
1 parent 377cab6083
commit 8524c46ef6
1 file changed
+7
+7
View File
@@ -203,6 +203,13 @@ class Payment:
else:
return False
@fields.depends('party')
def on_change_party(self):
super(Payment, self).on_change_party()
self.stripe_customer = None
self.stripe_customer_source = None
self.stripe_customer_source_selection = None
@fields.depends('stripe_customer', 'stripe_customer_source')
def get_stripe_customer_sources(self):
sources = [('', '')]