diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml index 8e1b0c99d8aa2425b24949add126ea81a7ee78c7..b2ed7bb42667877d11bf6a1d085eb138bcc6003e 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml @@ -23,6 +23,7 @@ <item> <key> <string>arguments_src</string> </key> <value> <string>from_table_list:list\r\n +from_expression\r\n where_expression\r\n order_by_expression\r\n group_by_expression\r\n @@ -142,17 +143,22 @@ SELECT\n <dtml-if select_expression>, <dtml-var select_expression></dtml-if>\n \n FROM\n - catalog, <dtml-var stock_table_id>\n -<dtml-if quantity_unit_uid>\n - LEFT JOIN quantity_unit_conversion ON \n - (quantity_unit_conversion.resource_uid = <dtml-var stock_table_id>.resource_uid\n - AND quantity_unit_conversion.quantity_unit_uid = <dtml-sqlvar quantity_unit_uid type=int>)\n -</dtml-if>\n +<dtml-if from_expression>\n + <dtml-var from_expression>\n +<dtml-else>\n + catalog\n <dtml-in prefix="table" expr="from_table_list"> \n <dtml-if expr="table_key not in (\'catalog\', stock_table_id)">\n , <dtml-var table_item> AS <dtml-var table_key>\n </dtml-if>\n </dtml-in>\n +, <dtml-var stock_table_id>\n +</dtml-if>\n +<dtml-if quantity_unit_uid> <dtml-comment>XXX quantity unit conversion will not work when using implict_join=False</dtml-comment>\n + LEFT JOIN quantity_unit_conversion ON \n + (quantity_unit_conversion.resource_uid = <dtml-var stock_table_id>.resource_uid\n + AND quantity_unit_conversion.quantity_unit_uid = <dtml-sqlvar quantity_unit_uid type=int>)\n +</dtml-if>\n <dtml-if selection_domain><dtml-let expression="portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_domain, category_table_alias=\'domain_category\')"><dtml-if expression>, <dtml-var expression></dtml-if></dtml-let></dtml-if>\n <dtml-if selection_report><dtml-let expression="portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_report, category_table_alias=\'report_category\')"><dtml-if expression>, <dtml-var expression></dtml-if></dtml-let></dtml-if>\n <dtml-if transformed_uid>, transformation, catalog as transformed_resource</dtml-if>\n diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml index c3acb3da9881e6ac1fc1ca74fb4b121a37bf9a29..81ba23ea166ef2638c86206eac42022c82a17f5e 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml @@ -417,7 +417,8 @@ </item> <item> <key> <string>arguments_src</string> </key> - <value> <string>from_table_list:list\r\n + <value> <string>from_expression\r\n +from_table_list:list\r\n where_expression\r\n order_by_expression\r\n group_by_expression\r\n @@ -512,12 +513,16 @@ SELECT\n stock.node_uid AS node_uid,\n stock.section_uid AS section_uid\n FROM\n +<dtml-if from_expression>\n + <dtml-var from_expression>\n +<dtml-else>\n stock\n <dtml-in prefix="table" expr="from_table_list"> \n <dtml-if expr="table_key != \'stock\'">\n , <dtml-var table_item> AS <dtml-var table_key>\n </dtml-if>\n </dtml-in>\n +</dtml-if>\n <dtml-if selection_domain><dtml-let expression="portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_domain, category_table_alias=\'domain_category\')"><dtml-if expression>, <dtml-var expression></dtml-if></dtml-let></dtml-if>\n <dtml-if selection_report><dtml-let expression="portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_report, category_table_alias=\'report_category\')"><dtml-if expression>, <dtml-var expression></dtml-if></dtml-let></dtml-if>\n \n