[Erp5-report] r19012 - in /erp5/trunk/bt5/erp5_banking_core: SkinTemplateItem/portal_skins/...

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Feb 3 13:17:39 CET 2008


Author: aurel
Date: Sun Feb  3 13:17:38 2008
New Revision: 19012

URL: http://svn.erp5.org?rev=19012&view=rev
Log:
change way to retrieve an organisation for a site
add new script to get agency for a given site

Added:
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAgencyForSite.xml
Modified:
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAccountForSite.xml
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_callContainerReportDialog.xml
    erp5/trunk/bt5/erp5_banking_core/bt/revision

Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAccountForSite.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAccountForSite.xml?rev=19012&r1=19011&r2=19012&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAccountForSite.xml (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAccountForSite.xml Sun Feb  3 13:17:38 2008
@@ -65,10 +65,11 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>organisation_list = [x.getObject() for x in context.portal_catalog(portal_type=\'Organisation\', site_uid=site.getUid()) if x.getObject().getRole()==\'internal\']\n
-if len(organisation_list) != 1:\n
-  raise ValueError, \'Must not get %d organisation for the site %s\' %(len(organisation_list),site.getTitle())\n
-organisation = organisation_list[0]\n
+            <value> <string>if isinstance(site, str):\n
+  site = context.portal_categories.site.restrictedTraverse(site)\n
+orga_id = "site_%3s" %(site.getCodification())\n
+organisation = context.organisation_module[orga_id]\n
+\n
 account_list = [x for x in organisation.objectValues(portal_type=\'Bank Account\') if x.getValidationState() == \'valid\']\n
 if len(account_list)!=1:\n
   raise ValueError, \'Must not get %d account for the organisation %s\' %(len(account_list),organisation.getTitle())\n
@@ -122,18 +123,20 @@
                         <value>
                           <tuple>
                             <string>site</string>
+                            <string>isinstance</string>
+                            <string>str</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>orga_id</string>
+                            <string>_getitem_</string>
+                            <string>organisation</string>
                             <string>append</string>
                             <string>$append0</string>
                             <string>_getiter_</string>
-                            <string>_getattr_</string>
-<string>context</string>
                             <string>x</string>
-                            <string>organisation_list</string>
+                            <string>account_list</string>
                             <string>len</string>
                             <string>ValueError</string>
-                            <string>_getitem_</string>
-                            <string>organisation</string>
-                            <string>account_list</string>
                           </tuple>
                         </value>
                     </item>

Added: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAgencyForSite.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAgencyForSite.xml?rev=19012&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAgencyForSite.xml (added)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getAgencyForSite.xml Sun Feb  3 13:17:38 2008
@@ -1,0 +1,158 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>if isinstance(site, str):\n
+  site = context.portal_categories.site.restrictedTraverse(site)\n
+\n
+orga_id = "site_%3s" %(site.getCodification())\n
+org = context.organisation_module[orga_id]\n
+\n
+return org\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>site</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>site</string>
+                            <string>isinstance</string>
+                            <string>str</string>
+                            <string>_getattr_</string>
+<string>context</string>
+                            <string>orga_id</string>
+                            <string>_getitem_</string>
+                            <string>org</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Baobab_getAgencyForSite</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_callContainerReportDialog.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_callContainerReportDialog.xml?rev=19012&r1=19011&r2=19012&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_callContainerReportDialog.xml (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_callContainerReportDialog.xml Sun Feb  3 13:17:38 2008
@@ -67,6 +67,7 @@
             <key> <string>_body</string> </key>
             <value> <string>from DateTime import DateTime\n
 node = context.REQUEST.form[\'vault\']\n
+\n
 container_portal_type_list = ["Monetary Reception",]\n
 \n
 base_price_dict = {}\n

Modified: erp5/trunk/bt5/erp5_banking_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/bt/revision?rev=19012&r1=19011&r2=19012&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_core/bt/revision Sun Feb  3 13:17:38 2008
@@ -1,1 +1,1 @@
-412
+414




More information about the Erp5-report mailing list