orders: add new fields to order model

This commit is contained in:
behruz-dev
2025-11-10 15:28:31 +05:00
parent 8a298b76f1
commit 1cd005c804
9 changed files with 90 additions and 26 deletions

View File

@@ -5,7 +5,9 @@ from core.apps.wherehouse.models.inventory import Inventory
@shared_task
def create_inventory(wherehouse, quantity, product, unity, price, project_folder, project, unity_price):
def create_inventory(
wherehouse, quantity, product, unity, price, project_folder, project, unity_price
):
inventory, created = Inventory.objects.get_or_create(
product_id=product,
wherehouse_id=wherehouse,
@@ -15,7 +17,7 @@ def create_inventory(wherehouse, quantity, product, unity, price, project_folder
price=price,
project_folder_id=project_folder,
project_id=project,
unit_price=unity_price
unit_price=unity_price,
)
)
if not created: