Commit 325c15ce authored by Yoshinori Okuji's avatar Yoshinori Okuji

2005-12-08 yo

* Fix the LEFT JOIN syntax in ProductionOrder_zSelectMovement.
* Add ProductionDelivery_getSupplyLinkList by seb.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4555 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 68d8eee0
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>supply_link_list = []\n
for movement in context.getMovementList():\n
for sim_movement in movement.getDeliveryRelatedValueList(portal_type=\'Simulation Movement\'):\n
causality = sim_movement.getCausalityValue()\n
if causality is not None and causality not in supply_link_list:\n
supply_link_list.append(causality)\n
return supply_link_list\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5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AABzAAAAAA==</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_mrp/ProductionDelivery_getSupplyLinkList</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>supply_link_list</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>movement</string>
<string>sim_movement</string>
<string>causality</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ProductionDelivery_getSupplyLinkList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -134,20 +134,16 @@ SELECT\n
catalog.id\n
\n
FROM\n
movement as simulation_movement,\n
<dtml-in from_table_list>\n
<dtml-var sequence-item> AS <dtml-var sequence-key>\n
<dtml-if sequence-end>\n
<dtml-else>,\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
\n
LEFT JOIN catalog AS base_category ON \n
base_category.portal_type = "Base Category"\n
AND base_category.id = "delivery"\n
LEFT JOIN category ON \n
base_category.uid=category.base_category_uid\n
AND catalog.uid=category.uid\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
......@@ -205,20 +201,16 @@ SELECT\n
catalog.id\n
\n
FROM\n
movement as simulation_movement,\n
<dtml-in from_table_list>\n
<dtml-var sequence-item> AS <dtml-var sequence-key>\n
<dtml-if sequence-end>\n
<dtml-else>,\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
\n
LEFT JOIN catalog AS base_category ON \n
base_category.portal_type = "Base Category"\n
AND base_category.id = "delivery"\n
LEFT JOIN category ON \n
base_category.uid=category.base_category_uid\n
AND catalog.uid=category.uid\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
......
......@@ -69,21 +69,29 @@
<value> <string>order = state_change.object\n
\n
if order.getSimulationState() in order.getPortalPlannedOrderStateList():\n
order.updateAppliedRule("default_production_order_rule")\n
# Be carreful, tags must corresponds to ones in production_order_workflow\n
previous_tag = order.getPath() + \'_firstUpdateAppliedRule\'\n
expand_tag = order.getPath() + \'_expand\'\n
order.activate(tag=expand_tag,after_tag=previous_tag).updateAppliedRule(tag=expand_tag,rule_id = \'default_production_order_rule\',priority=3)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAAAMAAAAGAAAAQwAA
AHNPAAAAdAAAfAAAZAEAgwIAfQIAdAAAfAIAZAIAgwIAgwAAdAAAfAIAZAMAgwIAgwAAagYAbxcA
AXQAAHwCAGQEAIMCAGQFAIMBAAFuAQABZAAAUygGAAAATnMGAAAAb2JqZWN0cxIAAABnZXRTaW11
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YWZ0ZXJfdGFncxEAAAB1cGRhdGVB
cHBsaWVkUnVsZXMHAAAAcnVsZV9pZHMdAAAAZGVmYXVsdF9wcm9kdWN0aW9uX29yZGVyX3J1bGVz
CAAAAHByaW9yaXR5aQMAAAAoBQAAAHMJAAAAX2dldGF0dHJfcwwAAABzdGF0ZV9jaGFuZ2VzBQAA
AG9yZGVycwwAAABwcmV2aW91c190YWdzCgAAAGV4cGFuZF90YWcoBQAAAHMMAAAAc3RhdGVfY2hh
bmdlcwkAAABfZ2V0YXR0cl9zBQAAAG9yZGVycwwAAABwcmV2aW91c190YWdzCgAAAGV4cGFuZF90
YWcoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzFwAAAE9yZGVyX3VwZGF0ZUFwcGxpZWRS
dWxlAQAAAHMIAAAADwIlAhYBHAEoAQAAAHMXAAAAT3JkZXJfdXBkYXRlQXBwbGllZFJ1bGUoAQAA
AHMXAAAAT3JkZXJfdXBkYXRlQXBwbGllZFJ1bGUoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhv
bilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
......@@ -120,6 +128,8 @@ DwAAAFNjcmlwdCAoUHl0aG9uKXMIAAAAPG1vZHVsZT4BAAAAcwAAAAA=</string> </value>
<string>state_change</string>
<string>_getattr_</string>
<string>order</string>
<string>previous_tag</string>
<string>expand_tag</string>
</tuple>
</value>
</item>
......
......@@ -70,38 +70,42 @@
\n
previous_tag = order.getPath() + \'_firstUpdateAppliedRule\'\n
expand_tag = order.getPath() + \'_expand\'\n
order.activate(tag=expand_tag,after_tag=previous_tag).updateAppliedRule(tag=expand_tag,rule_id = \'default_production_order_rule\',priority=3)\n
activate_kw = {\'tag\':expand_tag,\'priority\':3}\n
order.activate(tag=expand_tag,after_tag=previous_tag,priority=3).updateAppliedRule(rule_id = \'default_production_order_rule\',activate_kw=activate_kw)\n
\n
delivery_builder_list = [\n
order.portal_deliveries.production_report_builder,\n
order.portal_deliveries.production_packing_list_builder\n
]\n
\n
for delivery_builder in delivery_builder_list:\n
delivery_builder.activate(activity=\'SQLQueue\',after_tag=expand_tag).build(explanation_uid=order.getUid())\n
delivery_builder.activate(activity=\'SQLQueue\',after_tag=expand_tag,priority=3).build(explanation_uid=order.getUid(),activate_kw=activate_kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAAAgAAAANAAAAQwAA
AHP6AAAAdAAAfAAAZAEAgwIAfQIAdAAAfAIAZAIAgwIAgwAAZAMAF30DAHQAAHwCAGQCAIMCAIMA
AGQEABd9BAB0AAB0AAB8AgBkBQCDAgBkBgB8BABkBwB8AwCDAAJkCACDAgBkBgB8BABkCQBkCgBk
CwBkDACDAAMBdAAAdAAAfAIAZA0AgwIAZA4AgwIAdAAAdAAAfAIAZA0AgwIAZA8AgwIAZwIAfQUA
eE4AdAYAfAUAgwEARF1AAH0HAHQAAHQAAHwHAGQFAIMCAGQQAGQRAGQHAHwEAIMAAmQSAIMCAGQT
AHQAAHwCAGQUAIMCAIMAAIMAAQFxsgBXZAAAUygVAAAATnMGAAAAb2JqZWN0cwcAAABnZXRQYXRo
cxcAAABfZmlyc3RVcGRhdGVBcHBsaWVkUnVsZXMHAAAAX2V4cGFuZHMIAAAAYWN0aXZhdGVzAwAA
AHRhZ3MJAAAAYWZ0ZXJfdGFncxEAAAB1cGRhdGVBcHBsaWVkUnVsZXMHAAAAcnVsZV9pZHMdAAAA
ZGVmYXVsdF9wcm9kdWN0aW9uX29yZGVyX3J1bGVzCAAAAHByaW9yaXR5aQMAAABzEQAAAHBvcnRh
bF9kZWxpdmVyaWVzcxkAAABwcm9kdWN0aW9uX3JlcG9ydF9idWlsZGVycx8AAABwcm9kdWN0aW9u
X3BhY2tpbmdfbGlzdF9idWlsZGVycwgAAABhY3Rpd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AAABkZWxpdmVyeV9idWlsZGVyKAAAAAAo
AAAAAHMPAAAAU2NyaXB0IChQeXRob24pcxYAAABPcmRlcl9idWlsZFBhY2tpbmdMaXN0AQAAAHMU
AAAADwIWARYBHgE0AgYBFQEVAw0ADAEoAQAAAHMWAAAAT3JkZXJfYnVpbGRQYWNraW5nTGlzdCgB
AAAAcxYAAABPcmRlcl9idWlsZFBhY2tpbmdMaXN0KAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQeXRo
b24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
......@@ -146,6 +150,7 @@ dCgAAAAAKAAAAABzDwAAAFNjcmlwdCAoUHl0aG9uKXMIAAAAPG1vZHVsZT4BAAAAcwAAAAA=</string
<string>order</string>
<string>previous_tag</string>
<string>expand_tag</string>
<string>activate_kw</string>
<string>delivery_builder_list</string>
<string>_getiter_</string>
<string>delivery_builder</string>
......
2005-12-08 yo
* Fix the LEFT JOIN syntax in ProductionOrder_zSelectMovement.
* Add ProductionDelivery_getSupplyLinkList by seb.
2005-12-06 Seb
* Again update on after more testing production_order_workflow in order to add tags and priority
2005-12-01 Seb
* Started to update production_order_workflow in order to add tags and priority
* updated ProductionOrder_zSelectMovement, added alias on table movement
......
None
\ 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