Open tfeldmann opened 3 years ago
See the screenshot, the amount column is joined into the part column. Any clues?
My definitions:
class BOMPartInline(SortableInlineAdminMixin, admin.TabularInline): model = BOMPart fields = ("order", "amount", "part", "notice") autocomplete_fields = ("part",) formfield_overrides = { models.DecimalField: {"widget": forms.NumberInput(attrs={"step": 1})} } extra = 0
class BOMPart(models.Model): created_at = models.DateTimeField(auto_now_add=True, editable=False) order = models.PositiveIntegerField(default=0, blank=False, null=False) amount = models.DecimalField(max_digits=15, decimal_places=3) notice = models.CharField(max_length=200, blank=True) bom = models.ForeignKey( BOM, on_delete=models.CASCADE, related_name="parts", ) part = models.ForeignKey( Part, on_delete=models.RESTRICT, null=True, blank=True, ) class Meta: ordering = ["order"]
I'm using Django 3.2.6 with django-admin-sortable2 1.0 from pypi.
See the screenshot, the amount column is joined into the part column. Any clues?
My definitions: