Commit 968cd504 authored by Jérome Perrin's avatar Jérome Perrin

Inventory API: support selection domains others than categories

parent 6e5aabdb
......@@ -155,8 +155,8 @@ FROM\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
<dtml-if selection_domain>, <dtml-var "portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_domain)"> </dtml-if>\n
<dtml-if selection_report>, <dtml-var "portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_report)"> </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
\n
WHERE\n
......@@ -183,10 +183,10 @@ WHERE\n
AND <dtml-var stock_table_id>.is_accountable\n
</dtml-if>\n
<dtml-if selection_domain>\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_domain, join_table=stock_table_id, join_column=\'node_uid\')">\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_domain, category_table_alias=\'domain_category\', join_table=stock_table_id, join_column=\'node_uid\')">\n
</dtml-if>\n
<dtml-if selection_report>\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_report, strict_membership=1)">\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_report, category_table_alias=\'report_category\', strict_membership=1)">\n
</dtml-if>\n
\n
<dtml-if convert_quantity_result>\n
......
......@@ -518,8 +518,8 @@ FROM\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
<dtml-if selection_domain>, <dtml-var "portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_domain)"> </dtml-if>\n
<dtml-if selection_report>, <dtml-var "portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_report)"> </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
WHERE\n
1 = 1\n
......@@ -596,10 +596,10 @@ WHERE\n
</dtml-if>\n
\n
<dtml-if selection_domain>\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_domain, join_table=\'stock\', join_column=\'node_uid\')">\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_domain, category_table_alias=\'domain_category\', join_table=\'stock\', join_column=\'node_uid\')">\n
</dtml-if>\n
<dtml-if selection_report>\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_report, strict_membership=1)">\n
AND <dtml-var "portal_selections.buildSQLExpressionFromDomainSelection(selection_report, category_table_alias=\'report_category\', strict_membership=1)">\n
</dtml-if>\n
\n
<dtml-if group_by_expression>\n
......
41079
\ No newline at end of file
41080
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment