Commit 2dda7a57 authored by Romain Courteaud's avatar Romain Courteaud

task_report_builder should group by source_project on Task Report level.

Copy description from Task.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17096 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2e10dc06
......@@ -36,6 +36,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>delivery_after_generation_script_id</string> </key>
<value> <string>TaskReport_copyOrderPropertiesAndNotifyAssignee</string> </value>
......@@ -69,6 +75,7 @@
<string>DateMovementGroup</string>
<string>SectionPathMovementGroup</string>
<string>PathMovementGroup</string>
<string>SourceProjectMovementGroup</string>
</tuple>
</value>
</item>
......@@ -77,7 +84,6 @@
<value>
<tuple>
<string>ResourceMovementGroup</string>
<string>SourceProjectMovementGroup</string>
<string>TitleMovementGroup</string>
<string>BaseVariantMovementGroup</string>
<string>RequirementMovementGroup</string>
......
......@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
......@@ -76,22 +79,12 @@ related_order = packing_list.getCausalityValue()\n
if packing_list.getSimulationState() == \'draft\':\n
packing_list.edit(\n
comment=related_order.getComment(),\n
description = related_order.getDescription(),\n
delivery_mode=related_order.getDeliveryMode(),\n
incoterm=related_order.getIncoterm(),\n
source_administration_value=related_order.getSourceAdministrationValue(),\n
title=related_order.getTitle()\n
)\n
\n
# Copy Source Project only if all Task Report Lines share the same value.\n
marker = source_project_value = []\n
for packing_list_line in packing_list.contentValues(filter={\'portal_type\': \'Task Report Line\'}):\n
if source_project_value is marker:\n
source_project_value = packing_list_line.getSourceProjectValue()\n
elif source_project_value != packing_list_line.getSourceProjectValue():\n
source_project_value = marker\n
break\n
if source_project_value is not marker:\n
packing_list.setSourceProjectValue(source_project_value)\n
\n
# If security definitions are implemented on the packing list, it is time to apply them\n
packing_list.assignRoleToSecurityGroup()\n
......@@ -188,10 +181,6 @@ packing_list.activate(after_method_id=(\'immediateReindexObject\',\'recursiveImm
<string>packing_list</string>
<string>_getattr_</string>
<string>related_order</string>
<string>marker</string>
<string>source_project_value</string>
<string>_getiter_</string>
<string>packing_list_line</string>
<string>source_person</string>
<string>destination_decision_person</string>
<string>None</string>
......
332
\ No newline at end of file
334
\ 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