X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FTopQuickSearch%2FArticle.pm;h=e689bbe81db14512c111130e96d283012909e9ce;hb=ecc4b0c2ef75ebb81706fe00e61956e602ac13c4;hp=e19e7736e59e4df895b4fbebe3286458d431a88e;hpb=f7027139b5a2403424817a929743c162a0880f6a;p=kivitendo-erp.git diff --git a/SL/Controller/TopQuickSearch/Article.pm b/SL/Controller/TopQuickSearch/Article.pm index e19e7736e..e689bbe81 100644 --- a/SL/Controller/TopQuickSearch/Article.pm +++ b/SL/Controller/TopQuickSearch/Article.pm @@ -35,7 +35,8 @@ sub query_autocomplete { } sub select_autocomplete { - redirect_to_part($::form->{id}); + my ($self) = @_; + $self->redirect_to_part($::form->{id}); } sub do_search { @@ -55,7 +56,7 @@ sub redirect_to_search { controller => 'ic.pl', action => 'generate_report', all => $term, - (searchitems => $self->type) x!!$self->type, + (searchitems => $self->part_type) x!!$self->part_type, ); } @@ -63,13 +64,13 @@ sub redirect_to_part { my ($self, $term) = @_; SL::Controller::Base->new->url_for( - controller => 'ic.pl', - action => 'edit', - id => $term, + controller => 'controller.pl', + action => 'Part/edit', + 'part.id' => $term, ); } -sub type { +sub part_type { () } @@ -81,7 +82,8 @@ sub init_models { model => 'Part', source => { filter => { - (type => $self->type) x!!$self->type, + (part_type => $self->part_type) x!!$self->part_type, + or => [ obsolete => undef, obsolete => 0 ], 'all:substr:multi::ilike' => $::form->{term}, }, },