Commit 9a3c59b4 authored by Nicolas Dumazet's avatar Nicolas Dumazet

portal_sessions.newContent does not work as expected, use newTempSaleOrder instead

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38752 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 594492cf
......@@ -75,7 +75,8 @@ else:\n
session = portal_sessions[session_id]\n
if not shopping_cart_id in session.keys():\n
web_site = context.getWebSiteValue()\n
shopping_cart = portal_sessions.newContent(id=shopping_cart_id, portal_type=\'Sale Order\', temp_object=True)\n
from Products.ERP5Type.Document import newTempSaleOrder\n
shopping_cart = newTempSaleOrder(portal_sessions, shopping_cart_id)\n
shopping_cart.setPriceCurrency(web_site.WebSite_getShoppingCartDefaultCurrency().getRelativeUrl())\n
session[shopping_cart_id] = shopping_cart\n
\n
......@@ -141,7 +142,8 @@ else:\n
<string>_getitem_</string>
<string>session</string>
<string>web_site</string>
<string>True</string>
<string>Products.ERP5Type.Document</string>
<string>newTempSaleOrder</string>
<string>shopping_cart</string>
<string>_write_</string>
</tuple>
......
259
\ No newline at end of file
260
\ 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