From: G. Richardson Date: Sun, 13 Nov 2016 10:31:47 +0000 (+0100) Subject: Part - history_entries Relationship X-Git-Tag: release-3.5.4~1885 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2fd17923352490ab2c797c641a9c1fd19f8320f4;p=kivitendo-erp.git Part - history_entries Relationship --- diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 901f57aa8..32571276b 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -46,6 +46,13 @@ __PACKAGE__->meta->add_relationships( class => 'SL::DB::AssortmentItem', column_map => { id => 'assortment_id' }, }, + history_entries => { + type => 'one to many', + class => 'SL::DB::History', + column_map => { id => 'trans_id' }, + query_args => [ what_done => 'part' ], + manager_args => { sort_by => 'itime' }, + }, ); __PACKAGE__->meta->initialize;