I am uncertain regarding what child_of does after reading the docs and the use of child_of operator over using in operator for filtering
Odoo v10 domain docs can be found here which states the following for child_of
is a child (descendant) of a value record.
Takes the semantics of the model into account (i.e following the relationship field named by _parent_name)
Consider the model product.product having a many2one field called pos_categ_id that points to model pos.category
To only get products with PoS category id of x, domain value of ['pos_categ_id', 'child_of', x] can be used, however ['pos_categ_id', 'in', [x]] seems to also do the same thing.
In addition to that, in operator can be used for many2many and one2many fields with same format as above example while use of child_of operator for those two field types cause errors.
Example the domain ['session_ids', 'child_of', [572]] where session_ids is a many2many field causes the following error Invalid field 'parent_id' in leaf \"<osv.ExtendedLeaf: ('parent_id', 'in', [572]) on pos_session (ctx: )>\"
So, what is the example case where child_of is preferred over in operator? Both seems to function the same except in can work on all types of relational fields. Second, what does the second line of docs for child_of mean by the phrase following the relationship field named by _parent_name?