Commit 741107c1 authored by Jérome Perrin's avatar Jérome Perrin

Some suggested changes for the clone order section

parent 0ad24fe5
...@@ -45,14 +45,15 @@ ...@@ -45,14 +45,15 @@
"\n", "\n",
"start_date = context.getStartDate()\n", "start_date = context.getStartDate()\n",
"\n", "\n",
"for i in range(100):\n", "for i in range(360):\n",
" quantity = 10 * (1 + cos(i / 20.0))\n", " quantity = 10 * (1 + cos(i / 20.0)) + something random\n",
" # Add one day\n",
" start_date += 1\n", " start_date += 1\n",
" new_order = context.Base_createCloneDocument(batch_mode=1)\n", " new_order = context.Base_createCloneDocument(batch_mode=True)\n",
" new_order.edit(start_date=start_date, stop_date=start_date)\n", " new_order.edit(start_date=start_date, stop_date=start_date)\n",
" line = new_order['1']\n", " line = new_order['1']\n",
" line.edit(quantity=quantity, start_date=start_date, stop_date=start_date)\n", " line.edit(quantity=quantity)\n",
" new_order.activate().plan()\n", " new_order.plan()\n",
"```\n", "```\n",
"\n", "\n",
"Once it is saved you can run the script on the previously created sale order be entering this URL in your browser: `https://<your_instance_url>/sale_order_module/<number_of_the_order>/SaleOrder_generateCloneData`. If it works properly you should see the message 'done' in the page." "Once it is saved you can run the script on the previously created sale order be entering this URL in your browser: `https://<your_instance_url>/sale_order_module/<number_of_the_order>/SaleOrder_generateCloneData`. If it works properly you should see the message 'done' in the page."
...@@ -620,4 +621,4 @@ ...@@ -620,4 +621,4 @@
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 0 "nbformat_minor": 0
} }
\ 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