category va subcategory dropdownlariga filial nomi, search va filial filter qo'shildi
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,8 @@ class SubcategoryModel(AbstractBaseModel):
|
|||||||
image = models.ImageField(verbose_name=_("image"), upload_to="subcategories/", null=True, blank=True)
|
image = models.ImageField(verbose_name=_("image"), upload_to="subcategories/", null=True, blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.category.name} -> {self.name}"
|
filial_name = self.category.filial.name if self.category.filial else "Filial yo'q"
|
||||||
|
return f"{self.category.name} -> {self.name} ({filial_name})"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _baker(cls):
|
def _baker(cls):
|
||||||
|
|||||||
Reference in New Issue
Block a user