edit
administrator/components/com_virtuemart/classes/ps_product_category.php
disable code in line 686 and line 810
$allowed = false;
to
//$allowed = false;
For Dtree:
In components/com_virtuemart/js/vm_dtree.php change line 38 from
$openAll = 'false';
to
$openAll = 'true';