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

slapos_jio: Display translated state on "State" columns for invoices

    Also inform payment_mode to let the script handle the display of information
parent 8902545e
......@@ -2,8 +2,12 @@ import json
state = context.AccountingTransaction_getPaymentState()
payment_transaction = None
payment_mode = None
if state == "Pay now":
payment_transaction = context.SaleInvoiceTransaction_getSlapOSPaymentRelatedValue().getRelativeUrl()
payment_transaction_value = context.SaleInvoiceTransaction_getSlapOSPaymentRelatedValue()
payment_transaction = payment_transaction_value.getRelativeUrl()
payment_mode = payment_transaction_value.getPaymentMode()
return json.dumps({"state": state,
return json.dumps({"state": context.Base_translateString(state),
"payment_mode": payment_mode,
"payment_transaction": payment_transaction})
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