[open-ils-commits] r8865 - branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 5 12:34:12 EST 2008


Author: erickson
Date: 2008-03-05 12:01:49 -0500 (Wed, 05 Mar 2008)
New Revision: 8865

Modified:
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py
Log:
making the move from fund_source to funding_source for consistency.  have to commit before i can change the file name

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py	2008-03-05 03:30:53 UTC (rev 8864)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund_source.py	2008-03-05 17:01:49 UTC (rev 8865)
@@ -22,8 +22,8 @@
         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 @@
             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 @@
         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')
 



More information about the open-ils-commits mailing list