Commit 04f31746 authored by Jérome Perrin's avatar Jérome Perrin

use tag, activate_kw and after_tag so that updateCausalityState is done after build

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24861 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 057698d9
...@@ -102,21 +102,23 @@ if builder_by_ptype.has_key(delivery_portal_type) :\n ...@@ -102,21 +102,23 @@ if builder_by_ptype.has_key(delivery_portal_type) :\n
return\n return\n
### End of kev patch\n ### End of kev patch\n
\n \n
\n
# FIXME after_method_id is not enough here.\n
\n \n
# build accounting lines\n # build accounting lines\n
method_id_list = (\'expand\', \'edit\', \'updateAppliedRule\', \'Delivery_updateAppliedRule\',\n method_id_list = (\'expand\', \'edit\', \'updateAppliedRule\', \'Delivery_updateAppliedRule\',\n
\'immediateReindexObject\', \'recursiveImmediateReindexObject\')\n \'immediateReindexObject\', \'recursiveImmediateReindexObject\')\n
\n
tag = \'invoice_transaction_build_%s\' % delivery.getRelativeUrl()\n
builder.activate(\n builder.activate(\n
after_method_id=method_id_list).build()\n after_method_id=method_id_list,\n
tag=tag,\n
activate_kw=dict(tag=tag)).build(activate_kw=dict(tag=tag))\n
\n \n
# build related payment transactions\n # build related payment transactions\n
portal_deliveries.payment_transaction_builder.activate(after_method_id=method_id_list).build()\n portal_deliveries.payment_transaction_builder.activate(after_method_id=method_id_list).build()\n
\n \n
# set the object in building state.\n # set the object in building state.\n
delivery.startBuilding()\n delivery.startBuilding()\n
delivery.activate( after_path_and_method_id = (builder.getPath(), [\'build\']) ).updateCausalityState()\n delivery.activate(after_tag=tag).updateCausalityState()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -171,6 +173,8 @@ if builder_by_ptype.has_key(delivery_portal_type) :\n ...@@ -171,6 +173,8 @@ if builder_by_ptype.has_key(delivery_portal_type) :\n
<string>expand_tag</string> <string>expand_tag</string>
<string>activate_kw</string> <string>activate_kw</string>
<string>method_id_list</string> <string>method_id_list</string>
<string>tag</string>
<string>dict</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
829 830
\ 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