def METHOD_NAME(self):
    # compute because a simple related field makes the match_record fail
    for rec in self:
        if rec.partner_id.is_company:
            rec.nfe40_choice6 = "nfe40_CNPJ"
        else:
            rec.nfe40_choice6 = "nfe40_CPF"