From 6e170b1c470699c24fee4be595cbaa5c0049e3ff Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Thu, 26 Apr 2007 18:34:09 +0000
Subject: [PATCH] make sure to also update currency exchange line predicate
 information if required

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14255 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../CurrencyExchangeLine_updateMatrix.xml     | 21 +++++++++++++------
 bt5/erp5_base/bt/revision                     |  2 +-
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml
index 82d0539fdb..f30e3c7504 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml
@@ -76,7 +76,13 @@ kwd = {\'base_id\': base_id}\n
 \n
 context.updateCellRange(script_id=\'CurrencyExchangeLine_asCellRange\', base_id=base_id)\n
 cell_range_key_list = context.getCellRangeKeyList(base_id = base_id)\n
-\n
+resource_list = [\'resource/%s\' % context.getParent().getRelativeUrl()]\n
+price_currency_list = [\'price_currency/%s\' % context.getPriceCurrency()]\n
+membership_list = resource_list+price_currency_list\n
+context.setMembershipCriterionBaseCategoryList([x.split(\'/\')[0] for x in membership_list])\n
+context.setMembershipCriterionCategoryList(membership_list)\n
+context.setResource(context.getParentValue().getRelativeUrl())\n
+context.setMappedValuePropertyList((\'base_price\',\'discount\'))\n
 if cell_range_key_list != [[None, None]] :\n
   i = 0\n
   for k in cell_range_key_list:\n
@@ -138,18 +144,21 @@ if cell_range_key_list != [[None, None]] :\n
                             <string>base_id</string>
                             <string>kwd</string>
                             <string>cell_range_key_list</string>
+                            <string>resource_list</string>
+                            <string>price_currency_list</string>
+                            <string>membership_list</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>_getiter_</string>
+                            <string>x</string>
+                            <string>_getitem_</string>
                             <string>None</string>
                             <string>i</string>
-                            <string>_getiter_</string>
                             <string>k</string>
                             <string>filter</string>
                             <string>category_list</string>
                             <string>_apply_</string>
                             <string>c</string>
-                            <string>append</string>
-                            <string>$append0</string>
-                            <string>x</string>
-                            <string>_getitem_</string>
                           </tuple>
                         </value>
                     </item>
diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision
index e3b5acb834..615088b548 100644
--- a/bt5/erp5_base/bt/revision
+++ b/bt5/erp5_base/bt/revision
@@ -1 +1 @@
-107
\ No newline at end of file
+108
\ No newline at end of file
-- 
2.30.9