[FIX]document: sidebar menu Attachment(s) should be visible only on form view on the document

Steps to reproduce:
1. Install "Document" module.
2. go to the list view say "Sale Order", here you see side bar option "Attachment(s)" on tree/form view both
3. should be visible only on form view.

This branch fixed this issue. 
you should use getParent method instead of __parentedParent