[Erp5-report] r27253 - in /erp5/trunk/bt5/erp5_item: SkinTemplateItem/portal_skins/erp5_ite...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 29 15:36:34 CEST 2009


Author: jerome
Date: Fri May 29 15:36:31 2009
New Revision: 27253

URL: http://svn.erp5.org?rev=27253&view=rev
Log:
get item portal_type after validation

Modified:
    erp5/trunk/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml
    erp5/trunk/bt5/erp5_item/bt/revision

Modified: erp5/trunk/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml?rev=27253&r1=27252&r2=27253&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml [utf8] Fri May 29 15:36:31 2009
@@ -59,7 +59,7 @@
 item_list = []\n
 request = context.REQUEST\n
 total_quantity = 0.0\n
-type = request.get("field_your_type") or \'Item\'\n
+item_portal_type = request[\'type\']\n
 if context.getPortalType()==\'Purchase Packing List Line\':\n
   cell_portal_type = \'Purchase Packing List Cell\'\n
 elif context.getPortalType()==\'Purchase Order Line\' :\n
@@ -81,15 +81,13 @@
                                                     mapping={\'line_id\': line[\'listbox_key\']})\n
       raise NotImplementedError(msg)\n
 \n
-    module = context.getDefaultModule(type)\n
-    item = module.newContent(portal_type=type,\n
+    module = context.getDefaultModule(item_portal_type)\n
+    item = module.newContent(portal_type=item_portal_type,\n
       title=line[\'title\'],\n
       reference=line[\'reference\'],\n
       quantity=line[\'quantity\'],\n
       quantity_unit=context.getQuantityUnit())\n
     item.validate()\n
-    item_list.append(item)  \n
-\n
  \n
     if line.has_key("variation_category_list") and line[\'variation_category_list\'] not in(\'\',[]):\n
       cell_found = None\n
@@ -187,13 +185,13 @@
                             <string>context</string>
                             <string>request</string>
                             <string>total_quantity</string>
-                            <string>type</string>
+                            <string>_getitem_</string>
+                            <string>item_portal_type</string>
                             <string>cell_portal_type</string>
                             <string>movement_cell_list</string>
                             <string>base_id</string>
                             <string>_getiter_</string>
                             <string>line</string>
-                            <string>_getitem_</string>
                             <string>None</string>
                             <string>msg</string>
                             <string>NotImplementedError</string>

Modified: erp5/trunk/bt5/erp5_item/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_item/bt/revision?rev=27253&r1=27252&r2=27253&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_item/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_item/bt/revision [utf8] Fri May 29 15:36:31 2009
@@ -1,1 +1,1 @@
-154
+155




More information about the Erp5-report mailing list