my $all_linked_records = $self->object->linked_records(direction => 'from', recursive => 1);
my $filtered_orders = [ grep { 'SL::DB::Order' eq ref $_ && $_->is_type('sales_order') } @$all_linked_records ];
+
+ # no orders no call to linked_records via batch mode
+ # but instead return default list
+ return $self->object->linked_records(direction => 'both', recursive => 1, save_path => 1)
+ unless scalar @$filtered_orders;
+
+ # we have a order, therefore get the tree view from the top (order)
my $id_ref = [ map { $_->id } @$filtered_orders ];
my $linked_records = SL::DB::Order->new->linked_records(direction => 'to', recursive => 1, batch => $id_ref);
push @{ $linked_records }, @$filtered_orders;