Display child items with parent items in a collapsable list
It would be helpful to display child items with parent items in the stock overview list. Having this be collapsible (like the manage master data menu item) would help to make more sense of the list. Indicating child items as sub items could be helpful too.
Small enhancement to the feature request: perhaps in addition to being able to show child items as collapsible list, it would also be possible to show individual stock entries as child items of the aggregated stock entries. This could offer the best from both worlds regarding the stock overview and stock entries pages.
I'm not quite sure if this was intended by this request and the enhancement of @CrushaKRool. But it would also be very nice to count the stock of child items also for the parent items.
For example I have a product "juice" with two childs "apple juice" and "orange juice". I want to set the minimum amount of juice to three and if i have two apple juices and one orange juice, that minimum amount should be fullfiled.
By the way: Thanks a lot for this very cool software! Just startet yesterday and already loving it :-D
I want to set the minimum amount of juice to three and if i have two apple juices and one orange juice, that minimum amount should be fullfiled.
Is already possible when you enable the product option (checkbox) Accumulate sub products min. stock amount on the (parent) product juice.
Thank you very much! Loving this software more and more :-D
Hello,
I am trying to help the project for the first time by developping this enhancement.
Stock entries, stock journal and stock journal pages are now able to display children products entries if URI param children is set to "1" or if a checkbox in filters is checked. On stock overview, I added the new children URI param in order to display by default also the children entries, when we open the popups stock entries or stock journal. Link also updated on productcard. I added also a link to a popup on the agregated stock in order to open directly the entries stock page with children entries.
I made updates in my fork of grocy : https://github.com/fuhraih/grocy/tree/449-child-items I don't know what is the process for next step and for review. I added also a new label, so I dont' know how to manage it with Transifex.
Thanks, but this request here is about a collapsable list, as the title says. So something like that any row in any table, which shows a parent product, can be "expanded" to show any child - IMHO also the most natural way to solve this. Haven't looked at your fork so far, but when you have more than one parent product in any list, how show should it be clear to which parent which child belongs? I guess something like that only works when there is clearly one parent product in a list...
The normal way would be to just create a pull request, if you want to have this added (I'm currently not sure if we need it that way). And any localization strings only need to be added to the *.pot files in the localization directory (automatically happens when MODE = DEV). Translations are managed via Transifex as mentioned in README.
Yes, what I have done is only working for 1 level parent / children. I will see how I could manage the grandchildren,...
For the collapse, I am not sure it is possible with the DataTable, but I will continue to see if I can find a solution.
I am not sure it is possible with the DataTable
It's all PHP/HTML/JS/CSS here, so just like always only imagination and time are the limitations...
https://datatables.net/examples/api/row_details.html
https://datatables.net/forums/discussion/61725/child-row-with-parent-row-with-matching-columns
Maybe also the (already in grocy used) RowGroup feature can be somehow used for that: https://datatables.net/extensions/rowgroup/
In my fork, I've succeeded to add collapsing rows for children products. But I could not add all the columns for children because of the hidden columns of datatable. On the added rows, the hidden columns are not managed.
Related, but possibly a new/separate issue: It would be nice if the parent/child item list was displayed not only in the product overview page, but also in the consume/transfer/inventory page.
Example:
- I have a parent product
Coffeeand multiple K-cup child products; each by flavor - I am brewing a K-cup titled as
K-Cup <flavor> - I go to the consume page, and type in "coffee"
- I should see all child products of coffee, so that I can select the flavor of K-cup I'm currently brewing.
Also see #2033
This here is about having a collapsable list of parent/child products on the stock overview page, nothing else will be tracked here. One topic per request, everything else is untrackable.
- I go to the consume page, and type in "coffee"
- I should see all child products of coffee, so that I can select the flavor of K-cup I'm currently brewing.
Simply include the word coffee in all product names and you have exactly that right now (also related to #1066).
Or use the product's barcode or an own stock entry label and make tracking things even more easy and fast.