You can do it without creating a plugin... On the edit filter you select the object as a relational object, rather than the actual field. For example:
When you pick the field go to the "Related" section in the combo box:
Once you have done this you can chain them back to the part that you want:
Thus there is actually no need to create a plugin just as long as all relationships are created etc.