Commit 5ce08b4f authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_panel: Accept None payment_mode

   It must lead to "Contact us" page. Allow us use accounting for other configurations, so it
   allow the user generate a payment and contact us to make the wire transfer or pay from
   some non-automated system.
parent 42b1a116
...@@ -14,7 +14,6 @@ ledger_uid = portal.portal_categories.ledger.automated.getUid() ...@@ -14,7 +14,6 @@ ledger_uid = portal.portal_categories.ledger.automated.getUid()
currency_uid = currency_value.getUid() currency_uid = currency_value.getUid()
payment_mode = context.Base_getPaymentModeForCurrency(currency_value.getUid()) payment_mode = context.Base_getPaymentModeForCurrency(currency_value.getUid())
assert payment_mode is not None
outstanding_amount_list = context.Entity_getOutstandingDepositAmountList( outstanding_amount_list = context.Entity_getOutstandingDepositAmountList(
resource_uid=currency_uid, ledger_uid=ledger_uid) resource_uid=currency_uid, ledger_uid=ledger_uid)
...@@ -40,5 +39,4 @@ payment_transaction = context.Person_restrictMethodAsShadowUser( ...@@ -40,5 +39,4 @@ payment_transaction = context.Person_restrictMethodAsShadowUser(
argument_list=[context, deposit_price, currency_value, payment_mode]) argument_list=[context, deposit_price, currency_value, payment_mode])
web_site = context.getWebSiteValue() web_site = context.getWebSiteValue()
assert web_site is not None
return payment_transaction.PaymentTransaction_redirectToManualPayment(web_site=web_site) return payment_transaction.PaymentTransaction_redirectToManualPayment(web_site=web_site)
...@@ -10,7 +10,6 @@ assert outstanding_amount.getLedgerUid() == portal.portal_categories.ledger.auto ...@@ -10,7 +10,6 @@ assert outstanding_amount.getLedgerUid() == portal.portal_categories.ledger.auto
assert outstanding_amount.getDestinationSectionUid() == entity.getUid() assert outstanding_amount.getDestinationSectionUid() == entity.getUid()
payment_mode = outstanding_amount.Base_getPaymentModeForCurrency(outstanding_amount.getPriceCurrencyUid()) payment_mode = outstanding_amount.Base_getPaymentModeForCurrency(outstanding_amount.getPriceCurrencyUid())
assert payment_mode is not None
def wrapWithShadow(entity, outstanding_amount, payment_mode): def wrapWithShadow(entity, outstanding_amount, payment_mode):
return entity.Entity_createPaymentTransaction( return entity.Entity_createPaymentTransaction(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment