Support replacing party on customer
issue8851 review252661002
This commit is contained in:
1 parent
5b8f1e4149
commit
e2a2a9ebde
2 files changed
+12
-1
No files matched your search
@@ -23,6 +23,7 @@ def register():
|
||||
module='account_payment_stripe', type_='model')
|
||||
Pool.register(
|
||||
payment.Checkout,
|
||||
party.Replace,
|
||||
module='account_payment_stripe', type_='wizard')
|
||||
Pool.register(
|
||||
payment.CheckoutPage,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.model import fields
|
||||
|
||||
__all__ = ['Party']
|
||||
__all__ = ['Party', 'Replace']
|
||||
|
||||
|
||||
class Party(metaclass=PoolMeta):
|
||||
@@ -11,3 +11,13 @@ class Party(metaclass=PoolMeta):
|
||||
|
||||
stripe_customers = fields.One2Many(
|
||||
'account.payment.stripe.customer', 'party', "Stripe Customers")
|
||||
|
||||
|
||||
class Replace(metaclass=PoolMeta):
|
||||
__name__ = 'party.replace'
|
||||
|
||||
@classmethod
|
||||
def fields_to_replace(cls):
|
||||
return super().fields_to_replace() + [
|
||||
('account.payment.stripe.customer', 'party'),
|
||||
]
|
||||
Reference in new issue
Block a user