[Erp5-report] r15392 - in /erp5/trunk/bt5/erp5_commerce: SkinTemplateItem/portal_skins/erp5...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jul 30 19:03:39 CEST 2007
Author: jerome
Date: Mon Jul 30 19:03:39 2007
New Revision: 15392
URL: http://svn.erp5.org?rev=15392&view=rev
Log:
Use getPortalResourceTypeList to know portal types that can be used as a resource
Modified:
erp5/trunk/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getAvailableShippingResourceList.xml
erp5/trunk/bt5/erp5_commerce/bt/revision
Modified: erp5/trunk/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getAvailableShippingResourceList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getAvailableShippingResourceList.xml?rev=15392&r1=15391&r2=15392&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getAvailableShippingResourceList.xml (original)
+++ erp5/trunk/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getAvailableShippingResourceList.xml Mon Jul 30 19:03:39 2007
@@ -205,12 +205,17 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
- This will return all Products that have set product_line=\'shipping\'.\n
+ This will return all Products that have set product_line=\'shipping\'. XXX\n
Such products are used for shipping purposes i.e. they can not be sold.\n
"""\n
+portal = context.getPortalObject()\n
\n
-result = [r.getObject() for r in context.portal_catalog(portal_type=\'Product\')]\n
-return [o for o in result if o.getProductLine() in (\'shipping\',)]\n
+# XXX hardcoded category\n
+shipping_product_line_category_uid = portal.portal_categories.product_line.shipping.getUid()\n
+\n
+return [r.getObject() for r in portal.portal_catalog(\n
+ product_line_uid=shipping_product_line_category_uid,\n
+ portal_type=portal.getPortalResourceTypeList())]\n
</string> </value>
</item>
<item>
@@ -262,14 +267,14 @@
<key> <string>co_varnames</string> </key>
<value>
<tuple>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>portal</string>
+ <string>shipping_product_line_category_uid</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
- <string>_getattr_</string>
- <string>context</string>
<string>r</string>
- <string>result</string>
- <string>o</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_commerce/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_commerce/bt/revision?rev=15392&r1=15391&r2=15392&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_commerce/bt/revision (original)
+++ erp5/trunk/bt5/erp5_commerce/bt/revision Mon Jul 30 19:03:39 2007
@@ -1,1 +1,1 @@
-89
+90
More information about the Erp5-report
mailing list