Page 1 of 1

Visibility Based on Transaction Type

Posted: Wed Jul 19, 2023 11:36 am
by kendale.wyatt
I know that I can make a document tree visible based on transaction type using:
return hasattr(Order, 'SettlementType') and str(Order.SettlementType)=='CDF'

but is there a way to do this so the tree is not visible on CDF but is visible on HUD and CSS?

Re: Visibility Based on Transaction Type

Posted: Wed Jul 19, 2023 4:16 pm
by PaulMcCullough
If you change the == to <> it will cause the tree to be visible only when the SettlementType does not equal 'CDF'.

Here is the full line you can try:

return hasattr(Order, 'SettlementType') and str(Order.SettlementType)<>'CDF'

Re: Visibility Based on Transaction Type

Posted: Wed Jul 19, 2023 6:41 pm
by kendale.wyatt
See, I really knew it was something so obvious and was trying to make it more complicated. Thank you!