Commit 105281b0 authored by Nicolas Dumazet's avatar Nicolas Dumazet

2010-09-29

* do not use newTempOrder, create temporary sale order instead (portal type classes require the portal type to exist to create temporary objects, and 'Order' portal type does not exist)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38744 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aab8c38d
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -196,8 +193,6 @@
shipping.\n
"""\n
\n
from Products.ERP5Type.Document import newTempOrderLine\n
\n
request = context.REQUEST\n
translateString = context.Base_translateString \n
quantity = field_my_buy_quantity\n
......@@ -290,8 +285,6 @@ return context.SaleOrder_paymentRedirect(field_my_comment, field_my_payment_mode
<string>field_my_comment</string>
<string>field_my_payment_mode</string>
<string>kw</string>
<string>Products.ERP5Type.Document</string>
<string>newTempOrderLine</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -77,9 +74,8 @@ else:\n
shopping_cart_id = \'shopping_cart\'\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 = portal_sessions.newContent(id=shopping_cart_id, portal_type=\'Sale Order\', temp_object=True)\n
shopping_cart.setPriceCurrency(web_site.WebSite_getShoppingCartDefaultCurrency().getRelativeUrl())\n
session[shopping_cart_id] = shopping_cart\n
\n
......@@ -144,9 +140,8 @@ else:\n
<string>shopping_cart_id</string>
<string>_getitem_</string>
<string>session</string>
<string>Products.ERP5Type.Document</string>
<string>newTempOrder</string>
<string>web_site</string>
<string>True</string>
<string>shopping_cart</string>
<string>_write_</string>
</tuple>
......
2010-09-29
* do not use newTempOrder, create temporary sale order instead (portal type classes require the portal type to exist to create temporary objects, and 'Order' portal type does not exist)
2009-09-14 lucas
* added navigation for Anonymous user
......
258
\ No newline at end of file
259
\ 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