"There should be 101 orders, the original and 100 clones. You can add more if you want to add some randomness to the cosine generation. "
"There should be 101 orders, the original and 100 clones. You can add more if you want to add some randomness to the cosine generation. "
]
]
},
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Extract order data from database\n",
"\n",
"In order to create a time series of orders we must create the report of the past orders to be used by the method. So we need to create a new Z SQL Method. You must go to the 'custom' folder in 'portal_skins' (`https://<your_instance_url>/portal_skins/custom/manage`), click in 'Add' and then in 'Z SQL Method'. Use 'SaleOrderModule_zGetStock' as SQL Method ID.\n",
"\n",
"Then you will type the following query:\n",
"\n",
"```sql\n",
"SELECT\n",
" stock.date AS date, stock.quantity\n",
"FROM\n",
" stock\n",
"```\n",
"\n",
"All the filtering, grouping and processing of this data will be done using `Pandas` later."