def METHOD_NAME(self):
    res = self.env["agreement"].fields_view_get(
        view_id=self.ref("agreement_legal.partner_agreement_form_view"),
        view_type="form",
    )
    doc = etree.XML(res["arch"])
    field = doc.xpath("//field[@name='partner_contact_id']")
    self.assertEqual(
        field[0].get("modifiers", ""), '{"readonly": [["readonly", "=", true]]}'
    )