Visibility Based on Transaction Type

Discussions related to ReadyDoc development.
Post Reply
kendale.wyatt
Posts: 27
Joined: Wed Sep 26, 2018 1:24 pm

Visibility Based on Transaction Type

Post 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?
PaulMcCullough
Posts: 23
Joined: Wed Jul 12, 2023 11:29 am

Re: Visibility Based on Transaction Type

Post 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'
kendale.wyatt
Posts: 27
Joined: Wed Sep 26, 2018 1:24 pm

Re: Visibility Based on Transaction Type

Post by kendale.wyatt »

See, I really knew it was something so obvious and was trying to make it more complicated. Thank you!
Post Reply