X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fa7a37a2e2d294b1dfe6ef5b89e5acb0f8c4eb3b..5012e90c3dcec9566b23ee93f71bf78a30c9f35d:/SL/Controller/Part.pm?ds=inline diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 97c0159cc..6b76252cc 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -50,6 +50,7 @@ sub action_ajax_autocomplete { partnumber => $_->partnumber, description => $_->description, type => $_->type, + unit => $_->unit, } } @{ $self->parts }; # neato: if exact match triggers we don't even need the init_parts @@ -71,7 +72,7 @@ sub action_part_picker_result { } sub init_parts { - $_[0]->models->get (with_objects => [ qw(unit_obj) ]); + $_[0]->models->get; } sub init_models { @@ -79,14 +80,14 @@ sub init_models { SL::Controller::Helper::GetModels->new( controller => $self, - model => 'Part', sorted => { _default => { by => 'partnumber', dir => 1, }, partnumber => t8('Partnumber'), - } + }, + with_objects => [ qw(unit_obj) ], ); }