]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/Part.pm
URLs für Links im ReportGenerator richtig escapen.
[mfinanz.git] / SL / Controller / Part.pm
index 97c0159cc77ac2f0ff2d2b24f2aa2f27d79d1ea2..6b76252cc8017b97a13f83f1cd169f3980b8bd88 100644 (file)
@@ -50,6 +50,7 @@ sub action_ajax_autocomplete {
      partnumber  => $_->partnumber,
      description => $_->description,
      type        => $_->type,
      partnumber  => $_->partnumber,
      description => $_->description,
      type        => $_->type,
+     unit        => $_->unit,
     }
   } @{ $self->parts }; # neato: if exact match triggers we don't even need the init_parts
 
     }
   } @{ $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 {
 }
 
 sub init_parts {
-  $_[0]->models->get (with_objects => [ qw(unit_obj) ]);
+  $_[0]->models->get;
 }
 
 sub init_models {
 }
 
 sub init_models {
@@ -79,14 +80,14 @@ sub init_models {
 
   SL::Controller::Helper::GetModels->new(
     controller => $self,
 
   SL::Controller::Helper::GetModels->new(
     controller => $self,
-    model  => 'Part',
     sorted => {
       _default  => {
         by => 'partnumber',
         dir  => 1,
       },
       partnumber  => t8('Partnumber'),
     sorted => {
       _default  => {
         by => 'partnumber',
         dir  => 1,
       },
       partnumber  => t8('Partnumber'),
-    }
+    },
+    with_objects => [ qw(unit_obj) ],
   );
 }
 
   );
 }