[Erp5-report] r20972 - in /erp5/trunk/bt5/erp5_trade: SkinTemplateItem/portal_skins/erp5_tr...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 14 19:46:32 CEST 2008
Author: jerome
Date: Wed May 14 19:46:32 2008
New Revision: 20972
URL: http://svn.erp5.org?rev=20972&view=rev
Log:
Don't copy Payment Condition and Discount from Order to Packing List, they should not be present in Packing List.
Add a TODO marker for manually copied properties, it's better to use movement group instead.
Modified:
erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PackingList_copyOrderProperties.xml
erp5/trunk/bt5/erp5_trade/bt/revision
Modified: erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PackingList_copyOrderProperties.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PackingList_copyOrderProperties.xml?rev=20972&r1=20971&r2=20972&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PackingList_copyOrderProperties.xml (original)
+++ erp5/trunk/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PackingList_copyOrderProperties.xml Wed May 14 19:46:32 2008
@@ -65,38 +65,21 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string encoding="cdata"><![CDATA[
-
-packing_list = context\n
+ <value> <string>packing_list = context\n
related_order = packing_list.getCausalityValue()\n
\n
if packing_list.getSimulationState() == \'draft\':\n
packing_list.edit(\n
comment = related_order.getComment(),\n
+ title = related_order.getTitle(),\n
+\n
+ # TODO: use movement group instead of copying those categories:\n
delivery_mode = related_order.getDeliveryMode(),\n
incoterm = related_order.getIncoterm(),\n
- source_administration_value = related_order.getSourceAdministrationValue()\n
+ source_administration_value = related_order.getSourceAdministrationValue(),\n
+\n
)\n
-\n
- # copy PaymentCondition if none is defined on Packing List\n
- filter_dict = {\'portal_type\': \'Payment Condition\'}\n
- if len(packing_list.contentIds(filter = filter_dict)) == 0 :\n
- to_copy = related_order.contentIds(filter = filter_dict)\n
- if len(to_copy)>0 :\n
- copy_data = related_order.manage_copyObjects(ids=to_copy)\n
- new_id_list = packing_list.manage_pasteObjects(copy_data)\n
-\n
- # copy Discount if none is defined on Packing List\n
- filter_dict = {\'portal_type\': \'Discount\'}\n
- if len(packing_list.contentIds(filter = filter_dict)) == 0 :\n
- to_copy=[]\n
- to_copy=related_order.contentIds(filter = filter_dict)\n
- if len(to_copy)>0 :\n
- copy_data = related_order.manage_copyObjects(ids=to_copy)\n
- new_id_list = packing_list.manage_pasteObjects(copy_data)\n
-
-
-]]></string> </value>
+</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -106,6 +89,12 @@
</item>
<item>
<key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
<value>
<none/>
</value>
@@ -142,11 +131,6 @@
<string>packing_list</string>
<string>_getattr_</string>
<string>related_order</string>
- <string>filter_dict</string>
- <string>len</string>
- <string>to_copy</string>
- <string>copy_data</string>
- <string>new_id_list</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_trade/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/bt/revision?rev=20972&r1=20971&r2=20972&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/bt/revision (original)
+++ erp5/trunk/bt5/erp5_trade/bt/revision Wed May 14 19:46:32 2008
@@ -1,1 +1,1 @@
-361
+362
More information about the Erp5-report
mailing list