Commit c41365ab authored by Jérome Perrin's avatar Jérome Perrin

Set order dates when finalizing

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15394 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5011e324
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
Do whatever is necessary to finalize an order.\n Do whatever is necessary to finalize an order.\n
This script is called after customer completes shopping.\n This script is called after customer completes shopping.\n
"""\n """\n
from DateTime import DateTime\n
request = context.REQUEST\n request = context.REQUEST\n
isAnon = context.portal_membership.isAnonymousUser()\n isAnon = context.portal_membership.isAnonymousUser()\n
translateString = context.Base_translateString\n translateString = context.Base_translateString\n
...@@ -226,6 +227,8 @@ if isAnon:\n ...@@ -226,6 +227,8 @@ 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.setStartDate(DateTime())\n
sale_order.setReceivedDate(DateTime())\n
\n \n
## set order default currency\n ## set order default currency\n
sale_order.setDefaultPriceCurrency(context.SaleOrder_getShoppingCartDefaultCurrency().getRelativeUrl())\n sale_order.setDefaultPriceCurrency(context.SaleOrder_getShoppingCartDefaultCurrency().getRelativeUrl())\n
...@@ -293,6 +296,7 @@ context.Base_redirect(\'SaleOrder_viewThankYouMessage\')\n ...@@ -293,6 +296,7 @@ context.Base_redirect(\'SaleOrder_viewThankYouMessage\')\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>DateTime</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
......
91 92
\ 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