Parts: buchungsgruppen und partsgroup verlinkt.
[kivitendo-erp.git] / SL / DB / Part.pm
index 1acd8ef..ce9738f 100644 (file)
@@ -18,6 +18,11 @@ __PACKAGE__->meta->add_relationships(
     class        => 'SL::DB::Assembly',
     column_map   => { id => 'id' },
   },
+  partsgroup                     => {
+    type         => 'one to one',
+    class        => 'SL::DB::PartsGroup',
+    column_map   => { partsgroup_id => 'id' },
+  },
 );
 
 __PACKAGE__->meta->initialize;
@@ -103,6 +108,11 @@ sub available_units {
   shift->unit_obj->convertible_units;
 }
 
+# autogenerated accessor is slightly off...
+sub buchungsgruppe {
+  shift->buchungsgruppen(@_);
+}
+
 1;
 
 __END__