diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_getProductList.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_getProductList.xml index 8d724e9e0ba348d1b0ad46a60882af14affe6fc1..c283cd64178b4b023590cd80548b451cf05ac174 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_getProductList.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/WebSection_getProductList.xml @@ -56,23 +56,17 @@ <value> <string>#TODO : USE CACHE\n #the goal of this script is to get all the related product of this section\n \n -if (context.getPortalType() != \'Web Section\'):\n - current_web_section = context.REQUEST.get(\'current_web_section\', context)\n -else:\n - current_web_section = context\n -\n +current_web_section = context.REQUEST.get(\'current_web_section\', context)\n product_list = []\n +\n kw[\'portal_type\'] = \'Product\'\n kw[\'limit\'] = limit\n -\n if current_web_section.getMembershipCriterionCategoryList() in (None, []) and current_web_section.getCriterionList() in (None, []):\n kw[\'product_line_uid\'] = context.REQUEST.get(\'current_web_site\').getLayoutProperty(\'ecommerce_base_product_line\', \'\')\n \n product_list = current_web_section.WebSection_getDocumentValueListBase(all_versions=1,\n all_languages=1,\n - **kw\n - )\n -\n + **kw)\n product_list = [x.getObject() for x in product_list if x.getPortalType() == \'Product\']\n \n # this step will be remove after have find a good way to improve WebSection_getDocumentValueListBase\n diff --git a/bt5/erp5_commerce/bt/revision b/bt5/erp5_commerce/bt/revision index 3021b562c412b715c2a99b67e34ffaaaa0ba1e17..1edbdbab424f88cbead2031e6ebbd898365e68ec 100644 --- a/bt5/erp5_commerce/bt/revision +++ b/bt5/erp5_commerce/bt/revision @@ -1 +1 @@ -184 \ No newline at end of file +185 \ No newline at end of file