warehouse frontend

This commit is contained in:
hungdztrau123
2024-05-23 16:03:38 +07:00
parent 9d4d0b39a6
commit fa7283cff1
50 changed files with 1286 additions and 37 deletions

View File

@@ -129,7 +129,7 @@ class StoragePath(MatchingModel):
verbose_name = _("storage path")
verbose_name_plural = _("storage paths")
class Warehouse(ModelWithOwner):
class Warehouse(MatchingModel):
WAREHOUSE = "Warehouse"
SHELF = "Shelf"
@@ -140,13 +140,12 @@ class Warehouse(ModelWithOwner):
(BOXCASE, _("Boxcase")),
)
name = models.CharField(_("name"), max_length=256, unique=True)
type = models.CharField(max_length=20, null=True, blank=True,
choices=TYPE_WAREHOUSE,
default=WAREHOUSE,)
parent_warehouse = models.ForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name="parent_warehouses" )
parent_warehouse = models.ForeignKey('self', on_delete=models.CASCADE, null=True, blank=True )
class Meta:
class Meta(MatchingModel.Meta):
verbose_name = _("warehouse")
verbose_name_plural = _("warehouses")