[Erp5-report] r29227 - in /erp5/trunk/bt5/erp5_apparel: SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 28 16:05:44 CEST 2009


Author: fabien
Date: Mon Sep 28 16:05:43 2009
New Revision: 29227

URL: http://svn.erp5.org?rev=29227&view=rev
Log:
- use contentValues instead of searchFolder in model listbox
- use Base_redirect instead of the old nosh
- use SQLQueue instead of implicit SQLDict which makes not possible to create
more than one Apparel Model Colour Variation. Now it's possible

Modified:
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyApparelColourRangeVariation.xml
    erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_view/listbox.xml
    erp5/trunk/bt5/erp5_apparel/bt/revision

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyApparelColourRangeVariation.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyApparelColourRangeVariation.xml?rev=29227&r1=29226&r2=29227&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyApparelColourRangeVariation.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyApparelColourRangeVariation.xml [utf8] Mon Sep 28 16:05:43 2009
@@ -57,13 +57,8 @@
 apparel_colour_range = context.getSpecialiseValue(portal_type=(\'Apparel Colour Range\',))\n
 \n
 if apparel_colour_range is None:\n
-  redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
-                              , form_id\n
-                              , \'portal_status_message=No+Apparel+Colour+Range+defined.\'\n
-                              )\n
-\n
+  msg = \'No Apparel Colour Range defined.\'\n
 else:\n
-\n
   apparel_colour_range_variation_list = map( lambda x: x.getObject(), apparel_colour_range.searchFolder(portal_type=(\'Apparel Colour Range Variation\',)))\n
 \n
   apparel_model_colour_variation_list  = context.searchFolder(portal_type=(\'Apparel Model Colour Variation\',))\n
@@ -75,26 +70,18 @@
     if apparel_colour_range_variation.getTitle() not in apparel_model_colour_variation_title_list:\n
       count += 1\n
       # Use portal activity for creating lot of variation\n
-      context.activate().newContent(\n
-        type_name = \'Apparel Model Colour Variation\',\n
+      context.activate(activity=\'SQLQueue\').newContent(\n
+        portal_type = \'Apparel Model Colour Variation\',\n
         title = apparel_colour_range_variation.getTitle(),\n
         description = apparel_colour_range_variation.getDescription()\n
       )\n
 \n
   if count != 0:\n
-    redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
-                                , form_id\n
-                                , \'portal_status_message=Creating+%s+Apparel+Model+Colour+Variation.\' % count\n
-                                )\n
+    msg = \'Creating %s Apparel Model Colour Variation.\' % count\n
   else:\n
+    msg = \'No new Apparel Colour Range Variation defined.\'\n
 \n
-    redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
-                                , form_id\n
-                                , \'portal_status_message=No+new+Apparel+Colour+Range+Variation+defined.\'\n
-                                )\n
-\n
-\n
-request[ \'RESPONSE\' ].redirect( redirect_url )\n
+context.Base_redirect(keep_items=dict(portal_status_message=msg))\n
 </string> </value>
         </item>
         <item>
@@ -137,7 +124,7 @@
                             <string>request</string>
                             <string>apparel_colour_range</string>
                             <string>None</string>
-                            <string>redirect_url</string>
+                            <string>msg</string>
                             <string>map</string>
                             <string>apparel_colour_range_variation_list</string>
                             <string>apparel_model_colour_variation_list</string>
@@ -146,7 +133,7 @@
                             <string>_getiter_</string>
                             <string>apparel_colour_range_variation</string>
                             <string>_inplacevar_</string>
-                            <string>_getitem_</string>
+                            <string>dict</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_view/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_view/listbox.xml?rev=29227&r1=29226&r2=29227&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_view/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_view/listbox.xml [utf8] Mon Sep 28 16:05:43 2009
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.ERP5Form.ListBox</string>
-          <string>ListBox</string>
-        </tuple>
-        <none/>
+        <global name="ListBox" module="Products.ERP5Form.ListBox"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -343,6 +340,10 @@
                     <value> <string></string> </value>
                 </item>
                 <item>
+                    <key> <string>anchor</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
                     <key> <string>columns</string> </key>
                     <value>
                       <list>
@@ -426,6 +427,10 @@
                     <value> <int>0</int> </value>
                 </item>
                 <item>
+                    <key> <string>hide_rows_on_no_search_criterion</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
                     <key> <string>lines</string> </key>
                     <value> <int>10</int> </value>
                 </item>
@@ -446,6 +451,10 @@
                     </value>
                 </item>
                 <item>
+                    <key> <string>page_template</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>portal_types</string> </key>
                     <value>
                       <list>
@@ -467,6 +476,10 @@
                     <value> <int>0</int> </value>
                 </item>
                 <item>
+                    <key> <string>row_css_method</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
                     <key> <string>search</string> </key>
                     <value> <int>0</int> </value>
                 </item>
@@ -509,6 +522,12 @@
                 <item>
                     <key> <string>title</string> </key>
                     <value> <string>Colour Variations</string> </value>
+                </item>
+                <item>
+                    <key> <string>untranslatable_columns</string> </key>
+                    <value>
+                      <list/>
+                    </value>
                 </item>
                 <item>
                     <key> <string>url_columns</string> </key>
@@ -525,18 +544,15 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.Formulator.MethodField</string>
-          <string>Method</string>
-        </tuple>
-        <none/>
+        <global name="Method" module="Products.Formulator.MethodField"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
             <key> <string>method_name</string> </key>
-            <value> <string>searchFolder</string> </value>
+            <value> <string>contentValues</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_apparel/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_apparel/bt/revision?rev=29227&r1=29226&r2=29227&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_apparel/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_apparel/bt/revision [utf8] Mon Sep 28 16:05:43 2009
@@ -1,1 +1,1 @@
-21
+22




More information about the Erp5-report mailing list