fix - wrong imported signals in warehouse app
This commit is contained in:
@@ -66,7 +66,7 @@ def create_org_stat_by_distribution(quota: Quota):
|
|||||||
inventory_received=dist.warehouse_entry,
|
inventory_received=dist.warehouse_entry,
|
||||||
inventory_entry_balance=dist.warehouse_balance,
|
inventory_entry_balance=dist.warehouse_balance,
|
||||||
sold_amount=dist.been_sold,
|
sold_amount=dist.been_sold,
|
||||||
stat_type="distributions",
|
stat_type="distribution",
|
||||||
)
|
)
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ class WarehouseConfig(AppConfig):
|
|||||||
name = 'apps.warehouse'
|
name = 'apps.warehouse'
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
import apps.warehouse.signals # noqa
|
import apps.warehouse.signals.signals_v1 # noqa
|
||||||
import apps.warehouse.signals.signals_v2 # noqa
|
import apps.warehouse.signals.signals_v2 # noqa
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ def warehouse_sold_and_balance(quota_distribution: QuotaDistribution):
|
|||||||
|
|
||||||
@receiver(post_init, sender=InventoryEntry)
|
@receiver(post_init, sender=InventoryEntry)
|
||||||
def inventory_entry_pre_save(sender, instance: InventoryEntry, **kwargs):
|
def inventory_entry_pre_save(sender, instance: InventoryEntry, **kwargs):
|
||||||
|
print("ssss")
|
||||||
if instance.pk:
|
if instance.pk:
|
||||||
instance._is_update = True
|
instance._is_update = True
|
||||||
instance._old_weight = instance.weight
|
instance._old_weight = instance.weight
|
||||||
|
|||||||
Reference in New Issue
Block a user