From 80b9934594aa480c5ccee5642f10f00670f3ead1 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 5 Mar 2008 17:01:49 +0000 Subject: [PATCH] making the move from fund_source to funding_source for consistency. have to commit before i can change the file name git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8865 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../oilsweb/oilsweb/controllers/acq/fund_source.py | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py index 8c9b0419e2..9d7d913e6b 100644 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py +++ b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py @@ -22,8 +22,8 @@ class FundSourceController(BaseController): Event.parse_and_raise(source) source.owner(OrgUtil.get_org_unit(source.owner())) # flesh the owner - r.ctx.acq.fund_source.value = source - return r.render('acq/financial/view_fund_source.html') + r.ctx.acq.funding_source.value = source + return r.render('acq/financial/view_funding_source.html') def list(self): r = RequestMgr() @@ -34,24 +34,24 @@ class FundSourceController(BaseController): r.ctx.core.authtoken.value, None, {"flesh_summary":1}).recv().content() Event.parse_and_raise(sources) - r.ctx.acq.fund_source_list.value = sources + r.ctx.acq.funding_source_list.value = sources for source in sources: source.owner(OrgUtil.get_org_unit(source.owner())) - return r.render('acq/financial/list_fund_sources.html') + return r.render('acq/financial/list_funding_sources.html') def create(self): r = RequestMgr() fund_mgr = oilsweb.lib.acq.fund.FundMgr(r) - if r.ctx.acq.fund_source_name.value: + if r.ctx.acq.funding_source_name.value: source = osrf.net_obj.NetworkObject.acqfs() - source.name(r.ctx.acq.fund_source_name.value) - source.owner(r.ctx.acq.fund_source_owner.value) - source.currency_type(r.ctx.acq.fund_source_currency_type.value) - source_id = fund_mgr.create_fund_source(source) - return redirect_to(controller='acq/fund_source', action='view', id=source_id) + source.name(r.ctx.acq.funding_source_name.value) + source.owner(r.ctx.acq.funding_source_owner.value) + source.currency_type(r.ctx.acq.funding_source_currency_type.value) + source_id = fund_mgr.create_funding_source(source) + return redirect_to(controller='acq/funding_source', action='view', id=source_id) perm_orgs = ClientSession.atomic_request( 'open-ils.actor', @@ -64,29 +64,29 @@ class FundSourceController(BaseController): r.ctx.core.perm_tree.value['CREATE_FUNDING_SOURCE'] = OrgUtil.get_union_tree(perm_orgs) r.ctx.core.high_perm_orgs.value['CREATE_FUNDING_SOURCE'] = perm_orgs r.ctx.acq.currency_types.value = fund_mgr.fetch_currency_types() - return r.render('acq/financial/create_fund_source.html') + return r.render('acq/financial/create_funding_source.html') def create_credit(self): r = RequestMgr() ses = ClientSession(oils.const.OILS_APP_ACQ) - if r.ctx.acq.fund_source_credit_amount.value: + if r.ctx.acq.funding_source_credit_amount.value: credit = osrf.net_obj.NetworkObject.acqfscred() - credit.funding_source(r.ctx.acq.fund_source_id.value) - credit.amount(r.ctx.acq.fund_source_credit_amount.value) - credit.note(r.ctx.acq.fund_source_credit_note.value) + credit.funding_source(r.ctx.acq.funding_source_id.value) + credit.amount(r.ctx.acq.funding_source_credit_amount.value) + credit.note(r.ctx.acq.funding_source_credit_note.value) status = ses.request( 'open-ils.acq.funding_source_credit.create', r.ctx.core.authtoken.value, credit).recv().content() status = Event.parse_and_raise(status) - return redirect_to(controller='acq/fund_source', action='view', id=r.ctx.acq.fund_source_id.value) + return redirect_to(controller='acq/funding_source', action='view', id=r.ctx.acq.funding_source_id.value) source = ses.request('open-ils.acq.funding_source.retrieve', - r.ctx.core.authtoken.value, r.ctx.acq.fund_source_id.value, {"flesh_summary":1}).recv().content() - r.ctx.acq.fund_source.value = Event.parse_and_raise(source) + r.ctx.core.authtoken.value, r.ctx.acq.funding_source_id.value, {"flesh_summary":1}).recv().content() + r.ctx.acq.funding_source.value = Event.parse_and_raise(source) source.owner(OrgUtil.get_org_unit(source.owner())) return r.render('acq/financial/create_funding_source_credit.html') -- 2.11.0