What is the best solution to hide field eg. partner_id in
<xpath expr=".">
<field name="partner_id" />
</xpath>
Alternative way with more details to make field invisible, readonly etc at once based on specific condition.
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="attrs">{'invisible': [('field_name', 'Operator', Value)],
'readonly': [('field_name', 'Operator', Value)]}
</attribute>
</xpath>