Hi there,
i need to show a Doctype TreeView
in Dialog
(i.e. Warehouse
, Item Group
), so that will be possible to select a group from tree?
Any hint?
Thx
Hi there,
i need to show a Doctype TreeView
in Dialog
(i.e. Warehouse
, Item Group
), so that will be possible to select a group from tree?
Any hint?
Thx
were you able to find a way? Looking for the same.
What is the use case?
Great …
Let’s say you want to show item group tree path in the item and not just it’s group
Yes this is correct. I’m using this now GitHub - justinchmura/js-treeview: TreeView implemented with vanilla JavaScript
use case : if you have scanners and OCRed your invoice then the data can appear in a tree format.
yes just add files under “dist” from this repo GitHub - justinchmura/js-treeview: TreeView implemented with vanilla JavaScript and to the following directories:
/public/css
/public/js
edit your build.json and add the path of the files
OR your hooks.py should have like this:
app_include_css = “/assets/erpnext_ocr/css/treeview.min.css”
app_include_js = “/assets/erpnext_ocr/js/treeview.min.js”
and then
var tree = new TreeView([
{ name: ‘Item 1’, children: },
{ name: ‘Item 2’, expanded: true, children: [
{ name: ‘Sub Item 1’, children: },
{ name: ‘Sub Item 2’, children: }
]
}
], ‘tree’);
No need for the
var TreeView = require(‘js-treeview’);