Commit 65474881 authored by Jean-Paul Smets's avatar Jean-Paul Smets

improved by jps


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@86 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90a2054a
...@@ -4,8 +4,8 @@ connection_id:MySQL ...@@ -4,8 +4,8 @@ connection_id:MySQL
max_rows:1000 max_rows:1000
max_cache:100 max_cache:100
cache_time:0 cache_time:0
class_name: class_name:InventoryListBrain
class_file: class_file:InventoryBrain.py
</dtml-comment> </dtml-comment>
<params>resource_uid:list <params>resource_uid:list
resource:list resource:list
...@@ -18,11 +18,15 @@ section ...@@ -18,11 +18,15 @@ section
variation_text variation_text
node_category node_category
section_category section_category
resource_category</params> resource_category
simulation_state</params>
SELECT SELECT
catalog.path as path,
catalog.uid as uid,
catalog.relative_url as relative_url,
movement.start_date AS start_date, movement.start_date AS start_date,
movement.stop_date AS stop_date, movement.stop_date AS stop_date,
stock.quantity AS quantity, SUM(stock.quantity) AS quantity,
node.title AS node_title, node.title AS node_title,
node.relative_url AS node_relative_url, node.relative_url AS node_relative_url,
section.title AS section_title, section.title AS section_title,
...@@ -60,6 +64,9 @@ AND section_membership.uid = section.uid ...@@ -60,6 +64,9 @@ AND section_membership.uid = section.uid
AND resource_membership.category_uid = resource_c.uid AND resource_membership.category_uid = resource_c.uid
AND resource_membership.base_category_uid = resource_bc.uid AND resource_membership.base_category_uid = resource_bc.uid
AND resource_membership.uid = resource.uid AND resource_membership.uid = resource.uid
</dtml-if><dtml-if simulation_state>AND (<dtml-in simulation_state> catalog.simulation_state = <dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else> OR </dtml-if></dtml-in>)
</dtml-if> </dtml-if>
GROUP BY
movement.delivery_uid, resource.uid, movement.variation_text, node.uid, section.uid
ORDER BY ORDER BY
movement.stop_date, node.title, resource.title, movement.quantity movement.stop_date, node.title, resource.title, movement.quantity
\ No newline at end of file
...@@ -55,12 +55,12 @@ ...@@ -55,12 +55,12 @@
<title>bottom</title> <title>bottom</title>
<fields> <fields>
<field><id>movement_listbox</id> <type>ListBox</type> <field><id>listbox</id> <type>ListBox</type>
<values> <values>
<all_columns type="list">[]</all_columns> <all_columns type="list">[]</all_columns>
<all_editable_columns type="list">[]</all_editable_columns> <all_editable_columns type="list">[]</all_editable_columns>
<alternate_name></alternate_name> <alternate_name></alternate_name>
<columns type="list">[('start_date', 'start_date'), ('node_title', 'Stock'), ('section_title', 'Propri\xe9taire'), ('variation_text', 'Variante'), ('quantity', 'Quantit\xe9'), ('simulation_state', 'simulation_state')]</columns> <columns type="list">[('start_date', 'start_date'), ('getExplanationText', 'Explication'), ('node_title', 'Stock'), ('section_title', 'Propri\xe9taire'), ('variation_text', 'Variante'), ('quantity', 'Quantit\xe9'), ('simulation_state', 'simulation_state')]</columns>
<css_class></css_class> <css_class></css_class>
<default></default> <default></default>
<default_params type="list">[]</default_params> <default_params type="list">[]</default_params>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<report_root_list type="list">[]</report_root_list> <report_root_list type="list">[]</report_root_list>
<report_tree type="int">0</report_tree> <report_tree type="int">0</report_tree>
<search type="int">0</search> <search type="int">0</search>
<search_columns></search_columns> <search_columns type="list">[]</search_columns>
<select type="int">0</select> <select type="int">0</select>
<selection_name>movement_selection</selection_name> <selection_name>movement_selection</selection_name>
<sort type="list">[]</sort> <sort type="list">[]</sort>
......
...@@ -23,6 +23,7 @@ WHERE ...@@ -23,6 +23,7 @@ WHERE
<dtml-if resource_uid>AND (<dtml-in resource_uid> movement.resource_uid = <dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if></dtml-in>) <dtml-if resource_uid>AND (<dtml-in resource_uid> movement.resource_uid = <dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if></dtml-in>)
</dtml-if><dtml-if variation_text>AND movement.variation_text = <dtml-sqlvar variation_text type="string"> </dtml-if><dtml-if variation_text>AND movement.variation_text = <dtml-sqlvar variation_text type="string">
</dtml-if> </dtml-if>
AND movement.is_accountable = 1 AND movement.is_accountable = 1
AND catalog.portal_type <> "Container" AND catalog.portal_type <> "Container"
AND catalog.portal_type <> "Simulation Movement"
AND catalog.uid = movement.uid AND catalog.uid = movement.uid
\ 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