From 201c9038c6c64d91b9be59991b6b6449c33a0d4f Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 17 Oct 2016 17:18:30 +0200 Subject: [PATCH] =?utf8?q?Relationship=20delivery=5Forder=5Fstock=5Fentrie?= =?utf8?q?s=20f=C3=BCr=20DeliveryOrderItem?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/DeliveryOrderItem.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SL/DB/DeliveryOrderItem.pm b/SL/DB/DeliveryOrderItem.pm index ba2c2e099..bac466017 100644 --- a/SL/DB/DeliveryOrderItem.pm +++ b/SL/DB/DeliveryOrderItem.pm @@ -19,6 +19,17 @@ use SL::DB::Helper::CustomVariables ( __PACKAGE__->meta->make_manager_class; +__PACKAGE__->meta->add_relationship( + delivery_order_stock_entries => { + type => 'one to many', + class => 'SL::DB::DeliveryOrderItemsStock', + column_map => { id => 'delivery_order_item_id' }, + manager_args => { + with_objects => [ 'inventory' ] + }, + }, +); + __PACKAGE__->meta->initialize; __PACKAGE__->configure_acts_as_list(group_by => [qw(delivery_order_id)]); -- 2.20.1