Commit 34b08028 authored by Alexandre Boeglin's avatar Alexandre Boeglin

trigger startBuilding at creation or update of Production related deliveries...

trigger startBuilding at creation or update of Production related deliveries (just like Sale Packing List)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16794 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2fa06056
......@@ -69,22 +69,25 @@
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = context\n
\n
\n
tag = packing_list.getPath() + \'_confirm\'\n
\n
# First, copy Order properties\n
related_order = packing_list.getCausalityValue()\n
packing_list.edit(\n
comment = related_order.getComment(),\n
delivery_mode = related_order.getDeliveryMode(),\n
incoterm = related_order.getIncoterm(),\n
destination_administration_value = related_order.\\\n
getDestinationAdministrationValue(),\n
title = related_order.getTitle()\n
comment=related_order.getComment(),\n
delivery_mode=related_order.getDeliveryMode(),\n
incoterm=related_order.getIncoterm(),\n
destination_administration_value=\\\n
related_order.getDestinationAdministrationValue(),\n
title=related_order.getTitle(),\n
activate_kw={\'tag\':tag},\n
)\n
\n
activity = packing_list.activate(\n
after_method_id=[\'immediateReindexObject\',\n
\'recursiveImmediateReindexObject\'])\n
activity.ProductionDelivery_confirm()\n
packing_list.startBuilding()\n
packing_list.activate(after_tag=tag).updateCausalityState()\n
\n
packing_list.activate(after_tag=tag).ProductionDelivery_confirm()\n
</string> </value>
</item>
<item>
......@@ -130,8 +133,8 @@ activity.ProductionDelivery_confirm()\n
<string>context</string>
<string>packing_list</string>
<string>_getattr_</string>
<string>tag</string>
<string>related_order</string>
<string>activity</string>
</tuple>
</value>
</item>
......
......@@ -70,6 +70,9 @@
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change[\'object\']\n
\n
packing_list.startBuilding()\n
packing_list.activate().updateCausalityState()\n
\n
packing_list.updateAppliedRule("default_production_packing_list_rule")\n
</string> </value>
</item>
......
39
\ No newline at end of file
40
\ 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