def METHOD_NAME(self):
    for partner in self.filtered(lambda p: p.vat and p.country_id):
        repeat_partner = self._get_repeat_partner(partner)
        if bool(partner.vat) and not partner.parent_id and repeat_partner:
            raise UserError(
                _("The VAT number %s already exists in other contacts: %s")
                % (
                    repeat_partner.vat,
                    repeat_partner.name,
                )
            )