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
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
class_name:InventoryListBrain
class_file:InventoryBrain.py
</dtml-comment>
<params>resource_uid:list
resource:list
......@@ -18,11 +18,15 @@ section
variation_text
node_category
section_category
resource_category</params>
resource_category
simulation_state</params>
SELECT
catalog.path as path,
catalog.uid as uid,
catalog.relative_url as relative_url,
movement.start_date AS start_date,
movement.stop_date AS stop_date,
stock.quantity AS quantity,
SUM(stock.quantity) AS quantity,
node.title AS node_title,
node.relative_url AS node_relative_url,
section.title AS section_title,
......@@ -60,6 +64,9 @@ AND section_membership.uid = section.uid
AND resource_membership.category_uid = resource_c.uid
AND resource_membership.base_category_uid = resource_bc.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>
GROUP BY
movement.delivery_uid, resource.uid, movement.variation_text, node.uid, section.uid
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 @@
<title>bottom</title>
<fields>
<field><id>movement_listbox</id> <type>ListBox</type>
<field><id>listbox</id> <type>ListBox</type>
<values>
<all_columns type="list">[]</all_columns>
<all_editable_columns type="list">[]</all_editable_columns>
<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>
<default></default>
<default_params type="list">[]</default_params>
......@@ -79,7 +79,7 @@
<report_root_list type="list">[]</report_root_list>
<report_tree type="int">0</report_tree>
<search type="int">0</search>
<search_columns></search_columns>
<search_columns type="list">[]</search_columns>
<select type="int">0</select>
<selection_name>movement_selection</selection_name>
<sort type="list">[]</sort>
......
......@@ -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><dtml-if variation_text>AND movement.variation_text = <dtml-sqlvar variation_text type="string">
</dtml-if>
AND movement.is_accountable = 1
AND catalog.portal_type <> "Container"
AND movement.is_accountable = 1
AND catalog.portal_type <> "Container"
AND catalog.portal_type <> "Simulation Movement"
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