From 74e481c5e35e76521f5f5370a5d21be47bd96277 Mon Sep 17 00:00:00 2001
From: Mame Coumba Sall <mame@nexedi.com>
Date: Tue, 26 May 2009 12:53:24 +0000
Subject: [PATCH] 2009-05-26 mame * use quantity_unit defined on movement to
 define quantity_unit on item

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27189 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_item/DeliveryLine_createItemList.xml      | 2 +-
 .../portal_skins/erp5_item/Item_getQuantityUnit.xml             | 2 +-
 bt5/erp5_item/bt/revision                                       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml
index 8c9207dac4..3eb8f562a6 100644
--- a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml
+++ b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/DeliveryLine_createItemList.xml
@@ -78,7 +78,7 @@ for line in kw.get(\'listbox\'):\n
       title=line[\'title\'],\n
       reference=line[\'reference\'],\n
       quantity=line[\'quantity\'],\n
-      quantity_unit=context.getResourceValue().getQuantityUnit())\n
+      quantity_unit=context.getQuantityUnit())\n
     item.validate()\n
     item_list.append(item)  \n
 \n
diff --git a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getQuantityUnit.xml b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getQuantityUnit.xml
index 52e1358f06..6b7cf4ed70 100644
--- a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getQuantityUnit.xml
+++ b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getQuantityUnit.xml
@@ -57,7 +57,7 @@
   result = context.Item_getResourceValue() and context.Item_getResourceValue().getQuantityUnitList() and [(\'\', \'\')] + [(x.getTranslatedLogicalPath(), x.getCategoryRelativeUrl(base=0)) for x in context.Item_getResourceValue().getQuantityUnitValueList()] or [(\'\', \'\')]\n
 \n
 else:\n
-  result = [(\'\', \'\')]\n
+  result = [(x.getTranslatedLogicalPath(), x.getCategoryRelativeUrl(base=0)) for x in context.AggregateValue().getQuantityUnitValueList()] or [(\'\', \'\')]\n
 return result\n
 </string> </value>
         </item>
diff --git a/bt5/erp5_item/bt/revision b/bt5/erp5_item/bt/revision
index 5a396e28e8..3fdc173dab 100644
--- a/bt5/erp5_item/bt/revision
+++ b/bt5/erp5_item/bt/revision
@@ -1 +1 @@
-121
\ No newline at end of file
+122
\ No newline at end of file
-- 
2.30.9