**Steps to reproduce:**
* Create a subcontractor.
* Create a BoM of type Subcontracting and assign the subcontractor.
* Create a children contact for the subcontractor.
* Creat a purchase order (or a receipt picking) with the children contact of the subcontractor.
* Confirm the document.
**Current behavior:**
Subcontractor documents are not created.
**Expected result:**
They should be created.
**Cause:**
The BoM search is not including possible parents of the partners.
**Solution:**
With the use of `parent_of` operator in the search, we cover both cases of the children
and the parent as initiators of the subcontracting.
closesodoo/odoo#46670
X-original-commit: 86726aba26f4ba8d7dadb29ed2415baf49fe54c0
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>