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 @@
<item>
<key> <string>_body</string> </key>
<value> <string># Set preferred text format\n
context.edit(text_format = context.portal_preferences.getPreferredTextFormat())\n
context.setStartDate(DateTime())\n
portal = context.getPortalObject()\n
edit_kw = {\'content_type\': portal.portal_preferences.getPreferredTextFormat(),\n
\'start_date\': DateTime(),\n
\'destination_value_list\': context.BugLine_getRecipientValueList()}\n
\n
# Define a Reporter as Source Trade\n
person = context.Bug_getUserPersonValue()\n
if person is not None:\n
context.setSourceValue(person)\n
edit_kw[\'source_value\'] = person\n
\n
# Define Recipents\n
context.setDestinationValueList(context.BugLine_getRecipientValueList())\n
context.edit(**edit_kw)\n
</string> </value>
</item>
<item>
......@@ -104,9 +105,13 @@ context.setDestinationValueList(context.BugLine_getRecipientValueList())\n
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>DateTime</string>
<string>edit_kw</string>
<string>person</string>
<string>None</string>
<string>_write_</string>
<string>_apply_</string>
</tuple>
</value>
</item>
......
581
\ No newline at end of file
585
\ 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