def METHOD_NAME(self):
    company = self.env.company
    if company.fatturapa_sender_partner:
        if not company.fatturapa_sender_partner.vat:
            raise UserError(
                _("Partner %s TIN not set.")
                % company.fatturapa_sender_partner.display_name
            )
        vat = company.fatturapa_sender_partner.vat
    else:
        if not company.vat:
            raise UserError(_("Company %s TIN not set.") % company.display_name)
        vat = company.vat
    vat = vat.replace(" ", "").replace(".", "").replace("-", "")
    return vat