Commit 7350778e authored by Lucas Carvalho's avatar Lucas Carvalho

* 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
parent 683d5de2
...@@ -214,6 +214,7 @@ if isAnon:\n ...@@ -214,6 +214,7 @@ if isAnon:\n
sale_order_module = context.getPortalObject().sale_order_module\n sale_order_module = context.getPortalObject().sale_order_module\n
sale_order = sale_order_module.newContent(portal_type=\'Sale Order\')\n sale_order = sale_order_module.newContent(portal_type=\'Sale Order\')\n
sale_order.setDestination(customer.getRelativeUrl())\n sale_order.setDestination(customer.getRelativeUrl())\n
sale_order.setDestinationSection(customer.getRelativeUrl())\n
sale_order.setStartDate(DateTime())\n sale_order.setStartDate(DateTime())\n
sale_order.setReceivedDate(DateTime())\n sale_order.setReceivedDate(DateTime())\n
sale_order.setComment(shopping_cart.getComment())\n sale_order.setComment(shopping_cart.getComment())\n
......
...@@ -78,8 +78,9 @@ else:\n ...@@ -78,8 +78,9 @@ else:\n
session = portal_sessions[session_id]\n session = portal_sessions[session_id]\n
if not shopping_cart_id in session.keys():\n if not shopping_cart_id in session.keys():\n
from Products.ERP5Type.Document import newTempOrder\n from Products.ERP5Type.Document import newTempOrder\n
web_site = context.getWebSiteValue()\n
shopping_cart = newTempOrder(portal_sessions, shopping_cart_id)\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 session[shopping_cart_id] = shopping_cart\n
\n \n
## return just a part of session for shopping cart\n ## return just a part of session for shopping cart\n
...@@ -145,6 +146,7 @@ else:\n ...@@ -145,6 +146,7 @@ else:\n
<string>session</string> <string>session</string>
<string>Products.ERP5Type.Document</string> <string>Products.ERP5Type.Document</string>
<string>newTempOrder</string> <string>newTempOrder</string>
<string>web_site</string>
<string>shopping_cart</string> <string>shopping_cart</string>
<string>_write_</string> <string>_write_</string>
</tuple> </tuple>
......
...@@ -71,10 +71,7 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n ...@@ -71,10 +71,7 @@ return context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
<value> <value>
<tuple> <tuple/>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
236 238
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment