[Erp5-report] r14075 - in /erp5/trunk/bt5/erp5_banking_cash: SkinTemplateItem/portal_skins/...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Apr 13 16:58:25 CEST 2007


Author: aurel
Date: Fri Apr 13 16:58:12 2007
New Revision: 14075

URL: http://svn.erp5.org?rev=14075&view=rev
Log:
fix destination/source script

Added:
    erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CounterRendering_getBaobabSource.xml
Modified:
    erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/InternalMoneyDeposit_getBaobabDestination.xml
    erp5/trunk/bt5/erp5_banking_cash/bt/revision

Added: erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CounterRendering_getBaobabSource.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CounterRendering_getBaobabSource.xml?rev=14075&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CounterRendering_getBaobabSource.xml (added)
+++ erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CounterRendering_getBaobabSource.xml Fri Apr 13 16:58:12 2007
@@ -1,0 +1,168 @@
+<?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>source = context.getSource()\n
+if source is not None:\n
+  return source\n
+# calculate the source\n
+# must use owner to know site letter\n
+site_list = context.Baobab_getUserAssignedSiteList(user_id=context.Base_getOwnerId())\n
+for site in site_list:\n
+  if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'/guichet\'):\n
+    return site\n
+from Products.ERP5Type.Message import Message\n
+message = Message(domain="ui", message="Object owner is not assigned to a counter.")\n
+raise ValueError,message\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>*args, **kw</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>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>args</string>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>source</string>
+                            <string>None</string>
+                            <string>site_list</string>
+                            <string>_getiter_</string>
+                            <string>site</string>
+                            <string>Products.ERP5Type.Message</string>
+                            <string>Message</string>
+                            <string>message</string>
+                            <string>ValueError</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>CounterRendering_getBaobabSource</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/InternalMoneyDeposit_getBaobabDestination.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/InternalMoneyDeposit_getBaobabDestination.xml?rev=14075&r1=14074&r2=14075&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/InternalMoneyDeposit_getBaobabDestination.xml (original)
+++ erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/InternalMoneyDeposit_getBaobabDestination.xml Fri Apr 13 16:58:12 2007
@@ -66,20 +66,17 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>destination = context.getDestination()\n
-if destination is None:\n
-  return None\n
-user_id = context.Base_getLastUserIdByTransition(workflow_id=\'internal_money_deposit_workflow\', transition_id=\'deliver_action\')\n
-if user_id is None:\n
-  return None\n
-site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n
+if destination is not None:\n
+  return destination+\'/encaisse_des_billets_et_monnaies/entrante\'\n
+# calculate the destination\n
+# must use owner to know site letter\n
+site_list = context.Baobab_getUserAssignedSiteList(user_id=context.Base_getOwnerId())\n
 for site in site_list:\n
-#   if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'guichet\') and (destination in site or site in destination):\n
-  if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'guichet\') and destination in site:\n
-    return site + \'/encaisse_des_billets_et_monnaies/entrante\'\n
-from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
+  if context.portal_categories.getCategoryValue(site).getVaultType().endswith(\'/guichet\'):\n
+    return site+"/entrante"\n
 from Products.ERP5Type.Message import Message\n
-msg = Message(domain=\'ui\', message=\'Your user is not well assigned\')\n
-raise ValidationFailed, (msg,)\n
+message = Message(domain="ui", message="Object owner is not assigned to a counter.")\n
+raise ValueError,message\n
 </string> </value>
         </item>
         <item>
@@ -102,7 +99,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>*args, **kw</string> </value>
+            <value> <string></string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -128,21 +125,17 @@
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
-                            <string>args</string>
-                            <string>kw</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>destination</string>
                             <string>None</string>
-                            <string>user_id</string>
                             <string>site_list</string>
                             <string>_getiter_</string>
                             <string>site</string>
-                            <string>Products.DCWorkflow.DCWorkflow</string>
-                            <string>ValidationFailed</string>
                             <string>Products.ERP5Type.Message</string>
                             <string>Message</string>
-                            <string>msg</string>
+                            <string>message</string>
+                            <string>ValueError</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_banking_cash/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/bt/revision?rev=14075&r1=14074&r2=14075&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_cash/bt/revision Fri Apr 13 16:58:12 2007
@@ -1,1 +1,1 @@
-275
+277




More information about the Erp5-report mailing list