[Erp5-report] r17707 - in /erp5/trunk/bt5/erp5_ui_test: SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 20 18:13:27 CET 2007


Author: jerome
Date: Tue Nov 20 18:13:27 2007
New Revision: 17707

URL: http://svn.erp5.org?rev=17707&view=rev
Log:
FooModule_createObjects:
- create document in the context folder (compatible with current use)
- allow to specify the portal_type of created objects

Modified:
    erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.xml
    erp5/trunk/bt5/erp5_ui_test/bt/revision

Modified: erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.xml?rev=17707&r1=17706&r2=17707&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.xml (original)
+++ erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.xml Tue Nov 20 18:13:27 2007
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -69,13 +66,12 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>from DateTime import DateTime\n
-folder = context.foo_module\n
 category_list = (\'a\', \'b\', \'a/a1\', \'a/a2\')\n
 \n
 for i in range(start, start + num):\n
   category = category_list[i % len(category_list)]\n
-  foo = folder.newContent(id = str(i), title = \'Title %d\' % i, quantity = 10.0 - float(i),\n
-                    foo_category = category)\n
+  foo = context.newContent(id = str(i), title = \'Title %d\' % i, quantity = 10.0 - float(i),\n
+                    foo_category = category, portal_type=portal_type)\n
   if set_dates:\n
     foo.setStartDate(DateTime(i, i, i))\n
 return \'Created Successfully.\'\n
@@ -101,7 +97,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>start=0, num=10, set_dates=0</string> </value>
+            <value> <string>start=0, num=10, set_dates=0, portal_type=\'Foo\'</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -121,7 +117,7 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>3</int> </value>
+                        <value> <int>4</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -130,10 +126,8 @@
                             <string>start</string>
                             <string>num</string>
                             <string>set_dates</string>
+                            <string>portal_type</string>
                             <string>DateTime</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
-                            <string>folder</string>
                             <string>category_list</string>
                             <string>_getiter_</string>
                             <string>range</string>
@@ -141,6 +135,8 @@
                             <string>_getitem_</string>
                             <string>len</string>
                             <string>category</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
                             <string>str</string>
                             <string>float</string>
                             <string>foo</string>
@@ -159,6 +155,7 @@
                 <int>0</int>
                 <int>10</int>
                 <int>0</int>
+                <string>Foo</string>
               </tuple>
             </value>
         </item>

Modified: erp5/trunk/bt5/erp5_ui_test/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/bt/revision?rev=17707&r1=17706&r2=17707&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/bt/revision (original)
+++ erp5/trunk/bt5/erp5_ui_test/bt/revision Tue Nov 20 18:13:27 2007
@@ -1,1 +1,1 @@
-272
+273




More information about the Erp5-report mailing list