Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
7628f15e
Commit
7628f15e
authored
Oct 31, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inventory API: support left join queries
parent
861467c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml
...tem/portal_skins/erp5_core/Resource_zGetInventoryList.xml
+12
-6
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
...rtal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
+6
-1
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml
View file @
7628f15e
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
<item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
from_table_list:list\r\n
<value>
<string>
from_table_list:list\r\n
from_expression\r\n
where_expression\r\n
where_expression\r\n
order_by_expression\r\n
order_by_expression\r\n
group_by_expression\r\n
group_by_expression\r\n
...
@@ -142,17 +143,22 @@ SELECT\n
...
@@ -142,17 +143,22 @@ SELECT\n
<dtml-if
select_expression
>
,
<dtml-var
select_expression
></dtml-if>
\n
<dtml-if
select_expression
>
,
<dtml-var
select_expression
></dtml-if>
\n
\n
\n
FROM\n
FROM\n
catalog,
<dtml-var
stock_table_id
>
\n
<dtml-if
from_expression
>
\n
<dtml-if
quantity_unit_uid
>
\n
<dtml-var
from_expression
>
\n
LEFT JOIN quantity_unit_conversion ON \n
<dtml-else>
\n
(quantity_unit_conversion.resource_uid =
<dtml-var
stock_table_id
>
.resource_uid\n
catalog\n
AND quantity_unit_conversion.quantity_unit_uid =
<dtml-sqlvar
quantity_unit_uid
type=
int
>
)\n
</dtml-if>
\n
<dtml-in
prefix=
"table"
expr=
"from_table_list"
>
\n
<dtml-in
prefix=
"table"
expr=
"from_table_list"
>
\n
<dtml-if
expr=
"table_key not in (\'catalog\', stock_table_id)"
>
\n
<dtml-if
expr=
"table_key not in (\'catalog\', stock_table_id)"
>
\n
,
<dtml-var
table_item
>
AS
<dtml-var
table_key
>
\n
,
<dtml-var
table_item
>
AS
<dtml-var
table_key
>
\n
</dtml-if>
\n
</dtml-if>
\n
</dtml-in>
\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_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
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
<dtml-if
transformed_uid
>
, transformation, catalog as transformed_resource
</dtml-if>
\n
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
View file @
7628f15e
...
@@ -417,7 +417,8 @@
...
@@ -417,7 +417,8 @@
</item>
</item>
<item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<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
where_expression\r\n
order_by_expression\r\n
order_by_expression\r\n
group_by_expression\r\n
group_by_expression\r\n
...
@@ -512,12 +513,16 @@ SELECT\n
...
@@ -512,12 +513,16 @@ SELECT\n
stock.node_uid AS node_uid,\n
stock.node_uid AS node_uid,\n
stock.section_uid AS section_uid\n
stock.section_uid AS section_uid\n
FROM\n
FROM\n
<dtml-if
from_expression
>
\n
<dtml-var
from_expression
>
\n
<dtml-else>
\n
stock\n
stock\n
<dtml-in
prefix=
"table"
expr=
"from_table_list"
>
\n
<dtml-in
prefix=
"table"
expr=
"from_table_list"
>
\n
<dtml-if
expr=
"table_key != \'stock\'"
>
\n
<dtml-if
expr=
"table_key != \'stock\'"
>
\n
,
<dtml-var
table_item
>
AS
<dtml-var
table_key
>
\n
,
<dtml-var
table_item
>
AS
<dtml-var
table_key
>
\n
</dtml-if>
\n
</dtml-if>
\n
</dtml-in>
\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_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
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
\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment