From 51ec0a6a229342c141b96b78defd2e8bd884a404 Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Wed, 12 Nov 2025 15:09:34 +0500 Subject: [PATCH] fix --- core/apps/orders/models/party.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/apps/orders/models/party.py b/core/apps/orders/models/party.py index f1ada8a..a1a604b 100644 --- a/core/apps/orders/models/party.py +++ b/core/apps/orders/models/party.py @@ -61,16 +61,16 @@ class Party(BaseModel): return f'P - {self.number}' def save(self, *args, **kwargs): - if self.status in ['NEW', 'CANCELLED', 'DRAFT']: - self.process = 0 - elif self.status == 'EXPECTED': - self.process = 25 - elif self.status == 'PROCESS': - self.process = 50 - elif self.status == 'PURCHASED': - self.process = 75 - elif self.status == 'PARTY_IS_MADE': - self.process == 100 + # if self.status in ['NEW', 'CANCELLED', 'DRAFT']: + # self.process = 0 + # elif self.status == 'EXPECTED': + # self.process = 25 + # elif self.status == 'PROCESS': + # self.process = 50 + # elif self.status == 'PURCHASED': + # self.process = 75 + # elif self.status == 'PARTY_IS_MADE': + # self.process == 100 percentage = 0 count = 0 for order in self.orders.all():