Commit eb2018ec authored by Jérome Perrin's avatar Jérome Perrin

Use a translatable message for "Initialized by Delivery Builder" message.

Don't hardcode wf_id when calling doActionFor in SalePackingList_copyOrderProperties

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18782 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed11c8e9
...@@ -65,15 +65,16 @@ ...@@ -65,15 +65,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = context\n <value> <string>from Products.ERP5Type.Message import Message\n
\n
packing_list = context\n
\n \n
# Then, modify state\n # Modify state\n
packing_list_state = packing_list.getSimulationState()\n packing_list_state = packing_list.getSimulationState()\n
if packing_list_state == "draft":\n if packing_list_state == "draft":\n
packing_list.portal_workflow.doActionFor(\n packing_list.portal_workflow.doActionFor(\n
packing_list,\n packing_list, \'confirm_action\',\n
\'confirm_action\',\n comment=Message(\'erp5_ui\', "Initialized by Delivery Builder"))\n
comment="Initialized by Delivery Builder")\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -123,6 +124,8 @@ if packing_list_state == "draft":\n ...@@ -123,6 +124,8 @@ if packing_list_state == "draft":\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>context</string> <string>context</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string> <string>_getattr_</string>
......
...@@ -65,7 +65,9 @@ ...@@ -65,7 +65,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = context\n <value> <string>from Products.ERP5Type.Message import Message\n
\n
packing_list = context\n
\n \n
# First, copy Order properties\n # First, copy Order properties\n
packing_list.PackingList_copyOrderProperties()\n packing_list.PackingList_copyOrderProperties()\n
...@@ -75,10 +77,8 @@ packing_list_state = packing_list.getSimulationState()\n ...@@ -75,10 +77,8 @@ packing_list_state = packing_list.getSimulationState()\n
\n \n
if packing_list_state == "draft":\n if packing_list_state == "draft":\n
packing_list.portal_workflow.doActionFor(\n packing_list.portal_workflow.doActionFor(\n
packing_list,\n packing_list, \'confirm_action\',\n
\'confirm_action\',\n comment=Message(\'erp5_ui\', "Initialized by Delivery Builder"))\n
wf_id=\'packing_list_workflow\',\n
comment="Initialized by Delivery Builder")\n
\n \n
# First set the packing_list in the building state\n # First set the packing_list in the building state\n
packing_list.startBuilding()\n packing_list.startBuilding()\n
...@@ -127,6 +127,8 @@ packing_list.activate(after_method_id=(\'immediateReindexObject\',\'recursiveImm ...@@ -127,6 +127,8 @@ packing_list.activate(after_method_id=(\'immediateReindexObject\',\'recursiveImm
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>context</string> <string>context</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string> <string>_getattr_</string>
......
156 157
\ 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