From 9595b648b978e0d09bd2a5eeb1b948adbf67b1b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 14 Oct 2008 17:42:05 +0000
Subject: [PATCH] don't use movement relative_urls as keys, to be compatible
 with temp orders

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24182 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_trade/Delivery_updateTaxLineList.xml  | 6 +++---
 bt5/erp5_trade/bt/revision                                  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateTaxLineList.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateTaxLineList.xml
index 273d341fea..e7e642b4b0 100644
--- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateTaxLineList.xml
+++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateTaxLineList.xml
@@ -82,9 +82,9 @@ for tax_line in sorted(\n
       for base_contribution in movement.getBaseContributionList():\n
         # XXX non optimal loops, may needs optimisation\n
         if base_contribution == base_application:\n
-          applicable_movement_list[movement.getRelativeUrl()] = 1\n
+          applicable_movement_list[id(movement)] = movement\n
   \n
-  for movement in [portal.restrictedTraverse(x) for x in applicable_movement_list.keys()]:\n
+  for movement in applicable_movement_list.values():\n
     movement_price = movement.getTotalPrice(fast=0) or 0\n
     if tax_line.getProperty(\'calculation_script_id\'):\n
       raise NotImplementedError\n
@@ -156,7 +156,7 @@ for tax_line in sorted(\n
                             <string>base_contribution_list</string>
                             <string>base_contribution</string>
                             <string>_write_</string>
-                            <string>x</string>
+                            <string>id</string>
                             <string>movement_price</string>
                             <string>NotImplementedError</string>
                             <string>base_amount</string>
diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision
index 5da127eea4..22c04b349c 100644
--- a/bt5/erp5_trade/bt/revision
+++ b/bt5/erp5_trade/bt/revision
@@ -1 +1 @@
-507
\ No newline at end of file
+508
\ No newline at end of file
-- 
2.30.9