From: Moritz Bunkus Date: Wed, 2 Mar 2011 13:04:13 +0000 (+0100) Subject: Gewisse Spalten nicht ins Profil aufnehmen X-Git-Tag: release-2.7.0beta1~396^2~33 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=07ad0fee6523cc8d9272dcb847a79f899fdeaf67;p=kivitendo-erp.git Gewisse Spalten nicht ins Profil aufnehmen --- diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index e865a8612..e85429121 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -51,8 +51,11 @@ sub init_profile { eval "require " . $self->class; + my %unwanted = map { ( $_ => 1 ) } (qw(itime mtime), map { $_->name } @{ $self->class->meta->primary_key_columns }); my %profile; for my $col ($self->class->meta->columns) { + next if $unwanted{$col}; + my $name = $col->isa('Rose::DB::Object::Metadata::Column::Numeric') ? "$col\_as_number" : $col->isa('Rose::DB::Object::Metadata::Column::Date') ? "$col\_as_date" : $col->isa('Rose::DB::Object::Metadata::Column::Timestamp') ? "$col\_as_date" diff --git a/menu.ini b/menu.ini index 8dcdf0121..9145cc864 100644 --- a/menu.ini +++ b/menu.ini @@ -794,10 +794,10 @@ module=controller.pl action=CsvImport/new profile.type=addresses -# [System--Import CSV2--Parts] -# module=controller.pl -# action=CsvImport/new -# profile.type=parts +[System--Import CSV2--Parts] +module=controller.pl +action=CsvImport/new +profile.type=parts [System--Templates]