<odoo>
    <record id="view_saleorder_form" model="ir.ui.view">
        <field name="name">view_saleorder_form</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_order_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='partner_id']" position="after">
                <field name="mt_contract_id"
                       domain="[('partner_id','=',sec_partner_id),('company_id','=',company_id)]"
                       context="{'default_sec_partner_id':partner_id,'default_company_id':company_id,'default_type':'customer'}"/>
                <field name="sec_partner_id" invisible="1"/>
            </xpath>
        </field>
    </record>
</odoo>