From 7350778e420934c9b1e86babf6b03da25b13f8dc Mon Sep 17 00:00:00 2001 From: Lucas Carvalho <lucas@nexedi.com> Date: Tue, 29 Sep 2009 20:03:38 +0000 Subject: [PATCH] * Set Destination Section on Sale Order * Removed hardcoded value on SaleOrder_getShoppingCart * Removed proxy role from SaleOrder_getShoppingCartCustomer git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29306 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_commerce/SaleOrder_finalizeShopping.xml | 1 + .../portal_skins/erp5_commerce/SaleOrder_getShoppingCart.xml | 4 +++- .../erp5_commerce/SaleOrder_getShoppingCartCustomer.xml | 5 +---- bt5/erp5_commerce/bt/revision | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_finalizeShopping.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_finalizeShopping.xml index ef5b79d8c6..2a37ae4f70 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_finalizeShopping.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_finalizeShopping.xml @@ -214,6 +214,7 @@ if isAnon:\n sale_order_module = context.getPortalObject().sale_order_module\n sale_order = sale_order_module.newContent(portal_type=\'Sale Order\')\n sale_order.setDestination(customer.getRelativeUrl())\n +sale_order.setDestinationSection(customer.getRelativeUrl())\n sale_order.setStartDate(DateTime())\n sale_order.setReceivedDate(DateTime())\n sale_order.setComment(shopping_cart.getComment())\n diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCart.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCart.xml index e8fe693f1a..ac16c18657 100644 --- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCart.xml +++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_getShoppingCart.xml @@ -78,8 +78,9 @@ else:\n session = portal_sessions[session_id]\n if not shopping_cart_id in session.keys():\n from Products.ERP5Type.Document import newTempOrder\n + web_site = context.getWebSiteValue()\n shopping_cart = newTempOrder(portal_sessions, shopping_cart_id)\n - shopping_cart.setPriceCurrency(\'currency_module/EUR\')\n + shopping_cart.setPriceCurrency(web_site.WebSite_getShoppingCartDefaultCurrency().getRelativeUrl())\n session[shopping_cart_id] = shopping_cart\n \n ## return just a part of session for shopping cart\n @@ -145,6 +146,7 @@ else:\n <string>session</string> <string>Products.ERP5Type.Document</string> <string>newTempOrder</string> + <string>web_site</string> <string>shopping_cart</string> <string>_write_</string> </tuple> 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 93b0a51ba3..07643b7a4e 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 @@ -71,10 +71,7 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n <item> <key> <string>_proxy_roles</string> </key> <value> - <tuple> - <string>Assignor</string> - <string>Manager</string> - </tuple> + <tuple/> </value> </item> <item> diff --git a/bt5/erp5_commerce/bt/revision b/bt5/erp5_commerce/bt/revision index 7371afb09c..06690d5eea 100644 --- a/bt5/erp5_commerce/bt/revision +++ b/bt5/erp5_commerce/bt/revision @@ -1 +1 @@ -236 \ No newline at end of file +238 \ No newline at end of file -- 2.30.9