diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartCustomer.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartCustomer.xml index 96ea12290d728fe3ee64c8234a31e72b507770f1..c7771be683567c7aed5fe9b08b8a697c2075e7b8 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartCustomer.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCartCustomer.xml @@ -55,14 +55,18 @@ <key> <string>_body</string> </key> <value> <string># based on current Authenticated Member this script must return\n # the Person object\n -# XXX: it must be cached.\n from Products.ERP5Type.Cache import CachingMethod\n \n user_id = context.portal_membership.getAuthenticatedMember().getId()\n if context.portal_membership.isAnonymousUser():\n return None\n \n -return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue(user_name=user_id)\n +def getAuthenticatedMemberPersonValue(user_id):\n + return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue(user_name=user_id)\n +\n +getAuthenticatedMemberPersonValue = CachingMethod(getAuthenticatedMemberPersonValue,\n + id=script.getId())\n +return getAuthenticatedMemberPersonValue(user_id)\n </string> </value> </item> <item> @@ -114,6 +118,8 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue(user <string>context</string> <string>user_id</string> <string>None</string> + <string>getAuthenticatedMemberPersonValue</string> + <string>script</string> </tuple> </value> </item> diff --git a/bt5/erp5_commerce/bt/revision b/bt5/erp5_commerce/bt/revision index c5a644422fb8f683632c43a9973c6f9bf3d5a12e..fca7fbef0e3e82105ad15b6f5f6850d017cb09a9 100644 --- a/bt5/erp5_commerce/bt/revision +++ b/bt5/erp5_commerce/bt/revision @@ -1 +1 @@ -221 \ No newline at end of file +223 \ No newline at end of file