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 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -196,8 +193,6 @@ ...@@ -196,8 +193,6 @@
shipping.\n shipping.\n
"""\n """\n
\n \n
from Products.ERP5Type.Document import newTempOrderLine\n
\n
request = context.REQUEST\n request = context.REQUEST\n
translateString = context.Base_translateString \n translateString = context.Base_translateString \n
quantity = field_my_buy_quantity\n quantity = field_my_buy_quantity\n
...@@ -290,8 +285,6 @@ return context.SaleOrder_paymentRedirect(field_my_comment, field_my_payment_mode ...@@ -290,8 +285,6 @@ return context.SaleOrder_paymentRedirect(field_my_comment, field_my_payment_mode
<string>field_my_comment</string> <string>field_my_comment</string>
<string>field_my_payment_mode</string> <string>field_my_payment_mode</string>
<string>kw</string> <string>kw</string>
<string>Products.ERP5Type.Document</string>
<string>newTempOrderLine</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -77,9 +74,8 @@ else:\n ...@@ -77,9 +74,8 @@ else:\n
shopping_cart_id = \'shopping_cart\'\n shopping_cart_id = \'shopping_cart\'\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
web_site = context.getWebSiteValue()\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 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
...@@ -144,9 +140,8 @@ else:\n ...@@ -144,9 +140,8 @@ else:\n
<string>shopping_cart_id</string> <string>shopping_cart_id</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>session</string> <string>session</string>
<string>Products.ERP5Type.Document</string>
<string>newTempOrder</string>
<string>web_site</string> <string>web_site</string>
<string>True</string>
<string>shopping_cart</string> <string>shopping_cart</string>
<string>_write_</string> <string>_write_</string>
</tuple> </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 2009-09-14 lucas
* added navigation for Anonymous user * added navigation for Anonymous user
......
258 259
\ 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