Commit 5a0b9189 authored by Jérome Perrin's avatar Jérome Perrin

directly use portal_catalog on select methods

parent 6440c0a1
...@@ -52,10 +52,13 @@ ...@@ -52,10 +52,13 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_reference\'] = \'default_payment_rule\'\n <value> <string>kw[\'parent_specialise_reference\'] = \'default_payment_rule\'\n
kw[\'grand_parent_simulation_state\'] = \'started\'\n kw[\'grand_parent_simulation_state\'] = \'started\'\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
kw[\'max_movement_date\'] = DateTime() + 30 # XXX this is an arbitrary value for experimentation\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
# this could be an alarm configuration.\n kw[\'select_dict\'] = dict(delivery_uid=None)\n
return context.PaymentTransaction_zSelectMovement(src__=src__, **kw)\n kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Use_Database_Methods_Permission</string> </key>
<value>
<list>
<string>Member</string>
</list>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression\r\n
max_movement_date\r\n
limit_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransaction_zSelectMovement</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement\n
, catalog as parent\n
, catalog as grandparent\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key not in (\'catalog\', \'movement\')">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if>\n
\n
AND parent.uid = catalog.parent_uid\n
AND grandparent.uid = parent.parent_uid\n
\n
AND ((\n
grandparent.simulation_state NOT IN (\'cancelled\', \'deleted\')\n
AND ( movement.start_date < <dtml-sqlvar max_movement_date type="datetime"> OR \n
movement.stop_date < <dtml-sqlvar max_movement_date type="datetime"> )\n
) OR (\n
grandparent.simulation_state in (\'confirmed\', \'stopped\', \'delivered\')\n
))\n
\n
AND movement.uid = catalog.uid\n
AND movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>\n
<dtml-if limit_expression>\n
LIMIT <dtml-var limit_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -51,16 +51,22 @@ ...@@ -51,16 +51,22 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Simulation Rule\'\n <value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Simulation Rule\'\n
kw[\'explanation_portal_type\'] = \'Sale Order\', \'Sale Invoice\', \'Sale Packing List\'\n kw[\'explanation_portal_type\'] = \'Sale Order\', \'Sale Invoice\', \'Sale Packing List\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = \'started\'\n kw[\'grand_parent_simulation_state\'] = \'started\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.InvoiceTransaction_zSelectMovement(**kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>src__=0, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
108 109
\ No newline at end of file \ No newline at end of file
...@@ -51,8 +51,13 @@ ...@@ -51,8 +51,13 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Amortisation Rule\'\n <value> <string>kw[\'parent_specialise_portal_type\'] = \'Amortisation Rule\'\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.AmortisationTransaction_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression\r\n
limit_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AmortisationTransaction_zSelectMovement</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement as simulation_movement\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key != \'catalog\'">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if> AND simulation_movement.uid = catalog.uid\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>\n
<dtml-if limit_expression>\n
LIMIT <dtml-var limit_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
182 183
\ No newline at end of file \ No newline at end of file
...@@ -55,9 +55,6 @@ ...@@ -55,9 +55,6 @@
Simulation Movements can come from normal Invoice Transaction Rule\n Simulation Movements can come from normal Invoice Transaction Rule\n
and same rule which is children of Trade Model Rule """\n and same rule which is children of Trade Model Rule """\n
\n \n
buildSQLQuery = context.portal_catalog.buildSQLQuery\n
select = context.InvoiceTransaction_zSelectMovement\n
\n
# search for normal movements\n # search for normal movements\n
kw[\'parent_specialise_reference\'] = [\'default_invoice_transaction_rule\']\n kw[\'parent_specialise_reference\'] = [\'default_invoice_transaction_rule\']\n
kw[\'grand_grand_parent_specialise_reference\'] = [\n kw[\'grand_grand_parent_specialise_reference\'] = [\n
...@@ -74,19 +71,21 @@ else:\n ...@@ -74,19 +71,21 @@ else:\n
\'Returned %s Packing List\' % trade_type]\n \'Returned %s Packing List\' % trade_type]\n
kw[\'portal_type\'] = \'Simulation Movement\'\n kw[\'portal_type\'] = \'Simulation Movement\'\n
\n \n
kw[\'delivery_uid\'] = None\n
kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
search_kw = kw.copy()\n search_kw = kw.copy()\n
search_kw[\'grand_parent_simulation_state\'] = [\'started\']\n search_kw[\'grand_parent_simulation_state\'] = [\'started\']\n
search_kw.update(buildSQLQuery(**search_kw))\n
\n \n
movement_list = list(select(**search_kw))\n movement_list = list(context.portal_catalog(**search_kw))\n
\n \n
# update query to search for movements which are children of Trade Model Rule\n # update query to search for movements which are children of Trade Model Rule\n
kw[\'grand_grand_parent_specialise_reference\'] = \'default_trade_model_rule\'\n kw[\'grand_grand_parent_specialise_reference\'] = \'default_trade_model_rule\'\n
kw[\'grand_grand_grand_parent_simulation_state\'] = [\'started\']\n kw[\'grand_grand_grand_parent_simulation_state\'] = [\'started\']\n
\n \n
kw.update(buildSQLQuery(**kw))\n movement_list += list(context.portal_catalog(**kw))\n
\n
movement_list += select(**kw)\n
\n \n
return movement_list\n return movement_list\n
</string> </value> </string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Use_Database_Methods_Permission</string> </key>
<value>
<list>
<string>Member</string>
</list>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression\r\n
limit_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InvoiceTransaction_zSelectMovement</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key not in (\'catalog\', \'movement\')">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if>\n
\n
AND movement.uid = catalog.uid\n
AND movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>\n
<dtml-if limit_expression>\n
LIMIT <dtml-var limit_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -51,11 +51,16 @@ ...@@ -51,11 +51,16 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Simulation Rule\'\n <value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Simulation Rule\'\n
kw[\'explanation_portal_type\'] = \'Purchase Order\', \'Purchase Packing List\', \'Returned Purchase Packing List\'\n kw[\'explanation_portal_type\'] = \'Purchase Order\', \'Purchase Packing List\', \'Returned Purchase Packing List\'\n
kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\'\n kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.InvoiceTransaction_zSelectMovement(**kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -51,12 +51,17 @@ ...@@ -51,12 +51,17 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Trade Model Simulation Rule\'\n <value> <string>kw[\'parent_specialise_portal_type\'] = \'Trade Model Simulation Rule\'\n
kw[\'explanation_portal_type\'] = (\'Purchase Order\', \'Purchase Packing List\', \'Returned Purchase Packing List\',\n kw[\'explanation_portal_type\'] = (\'Purchase Order\', \'Purchase Packing List\', \'Returned Purchase Packing List\',\n
\'Purchase Invoice Transaction\', \'Purchase Invoice\')\n \'Purchase Invoice Transaction\', \'Purchase Invoice\')\n
kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\', \'confirmed\'\n kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\', \'confirmed\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.InvoiceTransaction_zSelectMovement(**kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -51,11 +51,16 @@ ...@@ -51,11 +51,16 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Simulation Rule\'\n <value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Simulation Rule\'\n
kw[\'explanation_portal_type\'] = \'Sale Order\', \'Sale Packing List\', \'Returned Sale Packing List\'\n kw[\'explanation_portal_type\'] = \'Sale Order\', \'Sale Packing List\', \'Returned Sale Packing List\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\'\n kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.InvoiceTransaction_zSelectMovement(**kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -51,12 +51,17 @@ ...@@ -51,12 +51,17 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Trade Model Simulation Rule\'\n <value> <string>kw[\'parent_specialise_portal_type\'] = \'Trade Model Simulation Rule\'\n
kw[\'explanation_portal_type\'] = (\'Sale Order\', \'Sale Packing List\', \'Returned Sale Packing List\',\n kw[\'explanation_portal_type\'] = (\'Sale Order\', \'Sale Packing List\', \'Returned Sale Packing List\',\n
\'Sale Invoice Transaction\', \'Sale Invoice\')\n \'Sale Invoice Transaction\', \'Sale Invoice\')\n
kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\', \'confirmed\'\n kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\', \'confirmed\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.InvoiceTransaction_zSelectMovement(**kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression\r\n
limit_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ProductionOrder_zSelectMovement</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement as simulation_movement\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key != \'catalog\'">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if>\n
AND simulation_movement.uid = catalog.uid\n
AND category.category_uid is NULL\n
AND simulation_movement.resource_uid is not NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>\n
<dtml-if limit_expression>\n
LIMIT <dtml-var limit_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -52,9 +52,15 @@ ...@@ -52,9 +52,15 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'explanation_portal_type\'] = \'Production Order\'\n <value> <string>kw[\'explanation_portal_type\'] = \'Production Order\'\n
kw[\'parent_specialise_portal_type\'] = \'Transformation Rule\'\n kw[\'parent_specialise_portal_type\'] = \'Transformation Rule\'\n
kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
result = context.ProductionOrder_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
result = context.portal_catalog(**kw)\n
if src__:\n if src__:\n
result\n result\n
\n \n
......
...@@ -52,8 +52,13 @@ ...@@ -52,8 +52,13 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'explanation_portal_type\'] = \'Production Order\'\n <value> <string>kw[\'explanation_portal_type\'] = \'Production Order\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
result = context.ProductionOrder_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
result = context.portal_catalog(**kw)\n
if src__:\n if src__:\n
result\n result\n
\n \n
......
477 478
\ No newline at end of file \ No newline at end of file
...@@ -52,12 +52,14 @@ ...@@ -52,12 +52,14 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = [\'Open Order Rule\']\n <value> <string>kw[\'parent_specialise_portal_type\'] = [\'Open Order Rule\']\n
kw[\'explanation_portal_type\'] = \'Open Sale Order\'\n kw[\'explanation_portal_type\'] = \'Open Sale Order\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'sort_on\'] = \'movement.start_date\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n \n
return [brain.getObject() for brain in context.DeliveryBuilder_zSelectOpenSaleOrderSimulationMovementList(**kw)]\n return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DeliveryBuilder_zSelectOpenSaleOrderSimulationMovementList</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement as simulation_movement\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key != \'catalog\'">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if>\n
AND catalog.simulation_state = \'started\'\n
AND simulation_movement.source_uid <> simulation_movement.destination_uid\n
AND simulation_movement.source_uid is not NULL\n
AND simulation_movement.destination_uid is not NULL\n
AND simulation_movement.uid = catalog.uid\n
AND simulation_movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
107 108
\ No newline at end of file \ No newline at end of file
...@@ -54,8 +54,13 @@ ...@@ -54,8 +54,13 @@
kw[\'explanation_portal_type\'] = \'Pay Sheet Transaction\'\n kw[\'explanation_portal_type\'] = \'Pay Sheet Transaction\'\n
kw[\'grand_parent_simulation_state\'] = \'confirmed\', \'started\'\n kw[\'grand_parent_simulation_state\'] = \'confirmed\', \'started\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.InvoiceTransaction_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
593 594
\ No newline at end of file \ No newline at end of file
...@@ -51,16 +51,22 @@ ...@@ -51,16 +51,22 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Simulation Rule\'\n <value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Simulation Rule\'\n
kw[\'explanation_portal_type\'] = \'Task\', \'Task Report\'\n kw[\'explanation_portal_type\'] = \'Task\', \'Task Report\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\'\n kw[\'grand_parent_simulation_state\'] = \'started\', \'stopped\', \'delivered\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.InvoiceTransaction_zSelectMovement(**kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>src__=0, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -54,8 +54,13 @@ ...@@ -54,8 +54,13 @@
kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n
kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.Order_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression\r\n
limit_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Task_zSelectMovement</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement as simulation_movement\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key != \'catalog\'">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if>\n
AND simulation_movement.source_uid is not NULL\n
AND simulation_movement.destination_uid is not NULL\n
AND simulation_movement.uid = catalog.uid\n
AND simulation_movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>\n
<dtml-if limit_expression>\n
LIMIT <dtml-var limit_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
820 821
\ No newline at end of file \ No newline at end of file
...@@ -54,8 +54,13 @@ ...@@ -54,8 +54,13 @@
kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n
kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.Order_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression\r\n
limit_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Order_zSelectMovement</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT DISTINCT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement as simulation_movement\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key != \'catalog\'">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if>\n
AND simulation_movement.source_uid is not NULL\n
AND simulation_movement.destination_uid is not NULL\n
AND simulation_movement.uid = catalog.uid\n
AND simulation_movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>\n
<dtml-if limit_expression>\n
LIMIT <dtml-var limit_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -54,8 +54,13 @@ ...@@ -54,8 +54,13 @@
kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n
kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.Order_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -54,8 +54,13 @@ ...@@ -54,8 +54,13 @@
kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n kw[\'parent_specialise_portal_type\'] = \'Delivery Simulation Rule\'\n
kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n kw[\'grand_parent_simulation_state\'] = \'confirmed\'\n
\n \n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n kw[\'delivery_uid\'] = None\n
return context.Order_zSelectMovement(src__=src__, **kw)\n kw[\'left_join_list\'] = [\'delivery_uid\']\n
kw[\'select_dict\'] = dict(delivery_uid=None)\n
kw[\'group_by\'] = (\'uid\',)\n
\n
kw[\'src__\'] = src__ \n
return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
1161 1162
\ No newline at end of file \ 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