Commit f7a11189 authored by Nicolas Delaby's avatar Nicolas Delaby

* small refactoring to just call edit only once

* replace text_format by content_type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35321 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8a00c591
...@@ -54,16 +54,17 @@ ...@@ -54,16 +54,17 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># Set preferred text format\n <value> <string># Set preferred text format\n
context.edit(text_format = context.portal_preferences.getPreferredTextFormat())\n portal = context.getPortalObject()\n
context.setStartDate(DateTime())\n edit_kw = {\'content_type\': portal.portal_preferences.getPreferredTextFormat(),\n
\'start_date\': DateTime(),\n
\'destination_value_list\': context.BugLine_getRecipientValueList()}\n
\n \n
# Define a Reporter as Source Trade\n # Define a Reporter as Source Trade\n
person = context.Bug_getUserPersonValue()\n person = context.Bug_getUserPersonValue()\n
if person is not None:\n if person is not None:\n
context.setSourceValue(person)\n edit_kw[\'source_value\'] = person\n
\n \n
# Define Recipents\n context.edit(**edit_kw)\n
context.setDestinationValueList(context.BugLine_getRecipientValueList())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -104,9 +105,13 @@ context.setDestinationValueList(context.BugLine_getRecipientValueList())\n ...@@ -104,9 +105,13 @@ context.setDestinationValueList(context.BugLine_getRecipientValueList())\n
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string>
<string>DateTime</string> <string>DateTime</string>
<string>edit_kw</string>
<string>person</string> <string>person</string>
<string>None</string> <string>None</string>
<string>_write_</string>
<string>_apply_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
581 585
\ 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