<odoo>
    <data>
        <record id="view_partner_form_school" model="ir.ui.view">
            <field name="name">res.partner.school.form</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='company_type']" position="after">
                    <group>
                    <field name="is_school" class="oe_edit_only" string="School" attrs="{'invisible':[('company_type','=','company')]}"/>
                    </group>
                </xpath>

                <xpath expr="//field[@name='parent_id']" position="replace">
                     <field name="parent_id"
                            placeholder="Company"
                            domain="[('is_school', '=', True)]" context="{'default_is_company': True}"
                            attrs="{'invisible': [('is_company','=', True)]}"/> 
                    </xpath>
            </field>
        </record>
    </data>
</odoo>

<odoo>
    <data>
        <record id="view_partner_form_school" model="ir.ui.view">
            <field name="name">res.partner.school.form</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='company_type']" position="after">
                    <group>
                    <field name="is_school" class="oe_edit_only" string="School" attrs="{'invisible':[('company_type','=','person')]}"/>
                    </group>
                </xpath>

                <xpath expr="//field[@name='parent_id']" position="replace">
                     <field name="parent_id"
                            placeholder="Company"
                            domain="[('is_school', '=', True)]" context="{'default_is_company': True}"
                            attrs="{'invisible': [('is_company','=', True)]}"/> 
                    </xpath>
            </field>
        </record>
    </data>
</odoo>

Change attributes in XML for field invisible
Change attributes in XML for field invisible
