﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28871	Autocomplete select for new lines in inline model do not open	Marcus Götling	Tim Graham	"When a model has an Inline model, autocomplete select does not show for new rows.

Select box is is replaced with Select2 style, but clicking it does not show the select list.

**model.py**
{{{#!python
class Item(models.Model):
    name = models.CharField(max_length=100)

class Category(models.Model):
    name = models.CharField(max_length=100)

    def __str__(self):
        return self.name

class LineItem(models.Model):
    item = models.ForeignKey(
        'Item',
        on_delete=models.CASCADE
    )
    category = models.ForeignKey(
        'Category',
        on_delete=models.CASCADE
    )
}}}

**admin.py**
{{{#!python
class LineItemInline(admin.TabularInline):
    model = LineItem
    extra = 1

    autocomplete_fields = ('category',)

@admin.register(Item)
class ItemAdmin(admin.ModelAdmin):
    list_display = ('name',)
    search_fields = ('name',)

    inlines = [
        LineItemInline
    ]

@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
    list_display = ('name',)
    search_fields = ('name',)
}}}


== Github repo
With demo and instructions on how to reproduce

https://github.com/gotling/bug-django2-autocomplete"	Bug	closed	contrib.admin	2.0	Release blocker	fixed	autocomplete select2	Johannes Maron	Accepted	1	0	0	0	0	1
