<data priority="50">
    <xpath expr="//field[@name='carrier_id']" position="attributes">
        <attribute name="attrs">{'readonly': ['|', ('is_locked', '=', True), ('state', 'in', [('done', 'cancel')])]}</attribute>
    </xpath>
</data>
