Commit 1d094572 authored by Jérome Perrin's avatar Jérome Perrin

getInventoryList is not appropriate here. I left you as exercice to find which...

getInventoryList is not appropriate here. I left you as exercice to find which method is appropriate for this use case.
Also some parameters are missing because here you get all the inventory of everything the company is selling or buying and all other movements made in that ERP5
parent 4a4fd356
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
" product = self.portal_catalog(title='Test Product', portal_type=\"Product\")[0]\n", " product = self.portal_catalog(title='Test Product', portal_type=\"Product\")[0]\n",
" nexedi = self.portal_catalog(title='Demo Clothes', portal_type='Organisation')[0]\n", " nexedi = self.portal_catalog(title='Demo Clothes', portal_type='Organisation')[0]\n",
" columns = ['date', 'quantity']\n", " columns = ['date', 'quantity']\n",
" #### getInventoryList is indended to use with group_by (node, section, resource etc) to return aggregated quantities with group criterions. The API to get the list of movement is different (try to find out yourself)\n",
" quantity_list = ([item['date'], item['total_quantity']] for item in self.portal_simulation.getInventoryList()) \n", " quantity_list = ([item['date'], item['total_quantity']] for item in self.portal_simulation.getInventoryList()) \n",
" \n", " \n",
" csv_file = StringIO.StringIO()\n", " csv_file = StringIO.StringIO()\n",
......
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