aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Dawn/views.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/Dawn/views.py b/python/Dawn/views.py
index 7c84db6d..2be67018 100644
--- a/python/Dawn/views.py
+++ b/python/Dawn/views.py
@@ -191,6 +191,12 @@ def get_form(trade, kind):
upfront_settle_date=today.date() + 3 * bus_day)
if kind == 'cds':
form.account_code.choices = fcm_accounts()
+ form.portfolio.choices = [c for c in form.portfolio.choices
+ if c[0] not in ('IR', 'IG', 'HY')]
+ form.folder.choices = [c for c in form.folder.choices
+ if (not c[0].startswith("SER_") or c[0].endswith("CURVE"))]
+ if kind == 'swaption':
+ form.portfolio.choices = [('OPTIONS', 'OPTIONS'), ('IR', 'IR')]
else:
form = Form(trade_date=today.date(),
settle_date=today.date() + 2 * bus_day)
@@ -328,8 +334,6 @@ def trade_manage(tradeid, kind):
form = _get_form(kind)()
form.cp_code.choices = form.cp_code.choices + list(cp_choices(kind))
- if kind == 'cds':
- form.account_code.choices = list(fcm_accounts())
if kind == 'bond':
old_ticket_name = trade.ticket
if kind == 'capfloor':