add - WarehouseAllocationService
This commit is contained in:
@@ -59,6 +59,25 @@ class InventoryEntry(BaseModel):
|
||||
super(InventoryEntry, self).save(*args, **kwargs)
|
||||
|
||||
|
||||
class InventoryEntryAllocation(BaseModel):
|
||||
inventory_entry = models.ForeignKey(
|
||||
InventoryEntry,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='allocations',
|
||||
null=True
|
||||
)
|
||||
distribution = models.ForeignKey(
|
||||
product_models.QuotaDistribution,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='allocations',
|
||||
null=True
|
||||
)
|
||||
weight = models.PositiveBigIntegerField(default=0)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.weight} -> Distribution {self.distribution.id}"
|
||||
|
||||
|
||||
class InventoryQuotaSaleTransaction(BaseModel):
|
||||
rancher = models.ForeignKey(
|
||||
Rancher,
|
||||
|
||||
Reference in New Issue
Block a user